Skip to main contentIBM Quantum Documentation
You are viewing the API reference for an old version of Qiskit SDK. Switch to latest version


class ImaginaryMcLachlanPrinciple(qgt=None, gradient=None)

GitHub(opens in a new tab)

Bases: qiskit.algorithms.time_evolvers.variational.variational_principles.imaginary_variational_principle.ImaginaryVariationalPrinciple

Class for an Imaginary McLachlan’s Variational Principle. It aims to minimize the distance between both sides of the Wick-rotated Schrödinger equation with a quantum state given as a parametrized trial state. The principle leads to a system of linear equations handled by a linear solver. The imaginary variant means that we consider imaginary time dynamics.


  • qgt (BaseQGT | None) – Instance of a the GQT class used to compute the QFI. If None provided, LinCombQGT is used.
  • gradient (BaseEstimatorGradient | None) – Instance of a class used to compute the state gradient. If None provided, LinCombEstimatorGradient is used.


AlgorithmError – If the gradient instance does not contain an estimator.

Methods Defined Here


ImaginaryMcLachlanPrinciple.evolution_gradient(hamiltonian, ansatz, param_values, gradient_params=None)

Calculates an evolution gradient according to the rules of this variational principle.


  • hamiltonian – Operator used for Variational Quantum Time Evolution.
  • ansatz – Quantum state in the form of a parametrized quantum circuit.
  • param_values – Values of parameters to be bound.
  • gradient_params – List of parameters with respect to which gradients should be computed. If None given, gradients w.r.t. all parameters will be computed.


An evolution gradient.


AlgorithmError – If a gradient job fails.

Was this page helpful?
Report a bug or request content on GitHub.