Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK and does not exist in the latest version. We recommend you migrate to the latest version. See the release notes for more information.

qiskit.chemistry.algorithms.AdaptVQE

class AdaptVQE(transformation, solver, threshold=1e-05, delta=1, max_iterations=None)

GitHub

A ground state calculation employing the AdaptVQE algorithm.

Parameters

  • transformation (FermionicTransformation) – a fermionic driver to operator transformation strategy.
  • solver (MinimumEigensolverFactory) – a factory for the VQE solver employing a UCCSD variational form.
  • threshold (float) – the energy convergence threshold. It has a minimum value of 1e-15.
  • delta (float) – the finite difference step size for the gradient computation. It has a minimum value of 1e-5.
  • max_iterations (Optional[int]) – the maximum number of iterations of the AdaptVQE algorithm.

__init__

__init__(transformation, solver, threshold=1e-05, delta=1, max_iterations=None)

Parameters

  • transformation (FermionicTransformation) – a fermionic driver to operator transformation strategy.
  • solver (MinimumEigensolverFactory) – a factory for the VQE solver employing a UCCSD variational form.
  • threshold (float) – the energy convergence threshold. It has a minimum value of 1e-15.
  • delta (float) – the finite difference step size for the gradient computation. It has a minimum value of 1e-5.
  • max_iterations (Optional[int]) – the maximum number of iterations of the AdaptVQE algorithm.

Methods

__init__(transformation, solver[, …])type transformationFermionicTransformation
evaluate_operators(state, operators)Evaluates additional operators at the given state.
returns_groundstate()Whether the eigensolver returns the ground state or only ground state energy.
solve(driver[, aux_operators])Computes the ground state.

Attributes

solverReturns the minimum eigensolver or factory.
transformationReturns the transformation used to obtain a qubit operator from the molecule.

evaluate_operators

evaluate_operators(state, operators)

Evaluates additional operators at the given state.

Parameters

  • state (Union[str, dict, Result, list, ndarray, Statevector, QuantumCircuit, Instruction, OperatorBase]) – any kind of input that can be used to specify a state. See also StateFn for more details.
  • operators (Union[WeightedPauliOperator, OperatorBase, list, dict]) – either a single, list or dictionary of WeightedPauliOperator``s or any kind of operator implementing the ``OperatorBase.

Return type

Union[float, List[float], Dict[str, List[float]]]

Returns

The expectation value of the given operator(s). The return type will be identical to the format of the provided operators.

returns_groundstate

returns_groundstate()

Whether the eigensolver returns the ground state or only ground state energy.

Return type

bool

solve

solve(driver, aux_operators=None)

Computes the ground state.

Parameters

  • driver (BaseDriver) – a chemistry driver.
  • aux_operators (Union[List[FermionicOperator], List[BosonicOperator], None]) – Additional auxiliary FermionicOperator instances to evaluate at the ground state.

Raises

AquaError – if a solver other than VQE or a variational form other than UCCSD is provided or if the algorithm finishes due to an unforeseen reason.

Return type

Union[ElectronicStructureResult, VibronicStructureResult]

Returns

An AdaptVQEResult which is an ElectronicStructureResult but also includes runtime information about the AdaptVQE algorithm like the number of iterations, finishing criterion, and the final maximum gradient.

solver

Returns the minimum eigensolver or factory.

Return type

Union[MinimumEigensolver, MinimumEigensolverFactory]

transformation

Returns the transformation used to obtain a qubit operator from the molecule.

Return type

Transformation

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