Skip to content
This repository was archived by the owner on Dec 7, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .pylintdict
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ barkoutsos
basebackend
baseoperator
bb
bergholm
bfgs
bitstr
bitstring
Expand Down Expand Up @@ -162,6 +163,7 @@ formatter
fortran
fourier
ftol
fujii
fullname
func
gambetta
Expand All @@ -174,6 +176,7 @@ gde
geq
getattr
getter
gogolin
gfortran
globals
graycode
Expand Down Expand Up @@ -223,6 +226,7 @@ isinstance
iso
isub
iteratively
izaac
jac
jacobian
jordan
Expand All @@ -231,8 +235,10 @@ jt
jth
jw
kaicher
killoran
kingma
kitaev
kitagawa
kronecker
kth
kumar
Expand Down Expand Up @@ -273,6 +279,7 @@ minibatches
minibatching
mintert
minwidth
mitarai
mle
moc
mohij
Expand All @@ -296,6 +303,7 @@ ncx
nd
ndarray
ndarray's
negoro
nelder
nevals
nfev
Expand Down Expand Up @@ -417,6 +425,7 @@ sca
scf
scikit
schemas
schuld
scipy
sd
sdg
Expand Down
31 changes: 20 additions & 11 deletions qiskit/aqua/components/optimizers/aqgd.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,22 @@


class AQGD(Optimizer):
"""Analytic Quantum Gradient Descent (AQGD) optimizer class.
Performs optimization by gradient descent where gradients
are evaluated "analytically" using the quantum circuit evaluating
"""Analytic Quantum Gradient Descent (AQGD) optimizer.

Performs gradient descent optimization with a momentum term and analytic gradients
for parametrized quantum gates, i.e. Pauli Rotations. See, for example:

* K. Mitarai, M. Negoro, M. Kitagawa, and K. Fujii. (2018).
Quantum circuit learning. Phys. Rev. A 98, 032309.
https://arxiv.org/abs/1803.00745

* Maria Schuld, Ville Bergholm, Christian Gogolin, Josh Izaac, Nathan Killoran. (2019).
Evaluating analytic gradients on quantum hardware. Phys. Rev. A 99, 032331.
https://arxiv.org/abs/1811.11184

for further details on analytic gradients of parametrized quantum gates.

Gradients are computed "analytically" using the quantum circuit when evaluating
the objective function.
"""

Expand All @@ -41,19 +54,15 @@ def __init__(self,
disp: bool = False,
momentum: float = 0.25) -> None:
"""
Constructor.

Performs Analytical Quantum Gradient Descent (AQGD).

Args:
maxiter: Maximum number of iterations, each iteration evaluation gradient.
eta: The coefficient of the gradient update. Increasing this value
results in larger step sizes: param = previous_param - eta * deriv
results in larger step sizes: param = previous_param - eta * deriv
tol: The convergence criteria that must be reached before stopping.
Optimization stops when: absolute(loss - previous_loss) < tol
disp: Set to true to display convergence messages.
Optimization stops when: absolute(loss - previous_loss) < tol
disp: Set to True to display convergence messages.
momentum: Bias towards the previous gradient momentum in current update.
Must be within the bounds: [0,1)
Must be within the bounds: [0,1)

"""
validate_range_exclusive_max('momentum', momentum, 0, 1)
Expand Down