From 35f2a055bfaf941ef784baff36442256f43f3688 Mon Sep 17 00:00:00 2001 From: woodsp Date: Thu, 30 Jan 2020 15:59:08 -0500 Subject: [PATCH 1/2] Add refs from former docs to AQGD --- qiskit/aqua/components/optimizers/aqgd.py | 31 +++++++++++++++-------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/qiskit/aqua/components/optimizers/aqgd.py b/qiskit/aqua/components/optimizers/aqgd.py index a4bcb6f56b..f122c658de 100644 --- a/qiskit/aqua/components/optimizers/aqgd.py +++ b/qiskit/aqua/components/optimizers/aqgd.py @@ -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. """ @@ -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) From 8f48b2e238b268266aba421b6e19086f9a43cf1f Mon Sep 17 00:00:00 2001 From: woodsp Date: Thu, 30 Jan 2020 16:18:51 -0500 Subject: [PATCH 2/2] Add names to custom dict for spelling --- .pylintdict | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.pylintdict b/.pylintdict index d750538496..74f2c348ff 100644 --- a/.pylintdict +++ b/.pylintdict @@ -35,6 +35,7 @@ barkoutsos basebackend baseoperator bb +bergholm bfgs bitstr bitstring @@ -162,6 +163,7 @@ formatter fortran fourier ftol +fujii fullname func gambetta @@ -174,6 +176,7 @@ gde geq getattr getter +gogolin gfortran globals graycode @@ -223,6 +226,7 @@ isinstance iso isub iteratively +izaac jac jacobian jordan @@ -231,8 +235,10 @@ jt jth jw kaicher +killoran kingma kitaev +kitagawa kronecker kth kumar @@ -273,6 +279,7 @@ minibatches minibatching mintert minwidth +mitarai mle moc mohij @@ -296,6 +303,7 @@ ncx nd ndarray ndarray's +negoro nelder nevals nfev @@ -417,6 +425,7 @@ sca scf scikit schemas +schuld scipy sd sdg