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.VQEUCCSDFactory

class VQEUCCSDFactory(quantum_instance, optimizer=None, initial_point=None, expectation=None, include_custom=False, method_singles='both', method_doubles='ucc', excitation_type='sd', same_spin_doubles=True)

GitHub

A factory to construct a VQE minimum eigensolver with UCCSD ansatz wavefunction.

Parameters

  • quantum_instance (QuantumInstance) – The quantum instance used in the minimum eigensolver.
  • optimizer (Optional[Optimizer]) – A classical optimizer.
  • initial_point (Optional[ndarray]) – An optional initial point (i.e. initial parameter values) for the optimizer. If None then VQE will look to the variational form for a preferred point and if not will simply compute a random one.
  • expectation (Optional[ExpectationBase]) – The Expectation converter for taking the average value of the Observable over the var_form state function. When None (the default) an ExpectationFactory is used to select an appropriate expectation based on the operator and backend. When using Aer qasm_simulator backend, with paulis, it is however much faster to leverage custom Aer function for the computation but, although VQE performs much faster with it, the outcome is ideal, with no shot noise, like using a state vector simulator. If you are just looking for the quickest performance when choosing Aer qasm_simulator and the lack of shot noise is not an issue then set include_custom parameter here to True (defaults to False).
  • include_custom (bool) – When expectation parameter here is None setting this to True will allow the factory to include the custom Aer pauli expectation.
  • method_singles (str) – specify the single excitation considered. ‘alpha’, ‘beta’, ‘both’ only alpha or beta spin-orbital single excitations or both (all of them).
  • method_doubles (str) – specify the single excitation considered. ‘ucc’ (conventional ucc), succ (singlet ucc), succ_full (singlet ucc full), pucc (pair ucc).
  • excitation_type (str) – specify the excitation type ‘sd’, ‘s’, ‘d’ respectively for single and double, only single, only double excitations.
  • same_spin_doubles (bool) – enable double excitations of the same spin.

__init__

__init__(quantum_instance, optimizer=None, initial_point=None, expectation=None, include_custom=False, method_singles='both', method_doubles='ucc', excitation_type='sd', same_spin_doubles=True)

Parameters

  • quantum_instance (QuantumInstance) – The quantum instance used in the minimum eigensolver.
  • optimizer (Optional[Optimizer]) – A classical optimizer.
  • initial_point (Optional[ndarray]) – An optional initial point (i.e. initial parameter values) for the optimizer. If None then VQE will look to the variational form for a preferred point and if not will simply compute a random one.
  • expectation (Optional[ExpectationBase]) – The Expectation converter for taking the average value of the Observable over the var_form state function. When None (the default) an ExpectationFactory is used to select an appropriate expectation based on the operator and backend. When using Aer qasm_simulator backend, with paulis, it is however much faster to leverage custom Aer function for the computation but, although VQE performs much faster with it, the outcome is ideal, with no shot noise, like using a state vector simulator. If you are just looking for the quickest performance when choosing Aer qasm_simulator and the lack of shot noise is not an issue then set include_custom parameter here to True (defaults to False).
  • include_custom (bool) – When expectation parameter here is None setting this to True will allow the factory to include the custom Aer pauli expectation.
  • method_singles (str) – specify the single excitation considered. ‘alpha’, ‘beta’, ‘both’ only alpha or beta spin-orbital single excitations or both (all of them).
  • method_doubles (str) – specify the single excitation considered. ‘ucc’ (conventional ucc), succ (singlet ucc), succ_full (singlet ucc full), pucc (pair ucc).
  • excitation_type (str) – specify the excitation type ‘sd’, ‘s’, ‘d’ respectively for single and double, only single, only double excitations.
  • same_spin_doubles (bool) – enable double excitations of the same spin.

Methods

__init__(quantum_instance[, optimizer, …])type quantum_instanceQuantumInstance
get_solver(transformation)Returns a VQE with a UCCSD wavefunction ansatz, based on transformation.
supports_aux_operators()Returns whether the eigensolver generated by this factory supports auxiliary operators.

Attributes

excitation_typeGetter of the excitation_type setting for the excitation_type setting.
expectationGetter of the expectation.
include_customGetter of the include_custom setting for the expectation setting.
initial_pointGetter of the initial point.
method_doublesGetter of the method_doubles setting for the method_doubles setting.
method_singlesGetter of the method_singles setting for the method_singles setting.
optimizerGetter of the optimizer.
quantum_instanceGetter of the quantum instance.
same_spin_doublesGetter of the same_spin_doubles setting for the same_spin_doubles setting.

excitation_type

Getter of the excitation_type setting for the excitation_type setting.

Return type

str

expectation

Getter of the expectation.

Return type

ExpectationBase

get_solver

get_solver(transformation)

Returns a VQE with a UCCSD wavefunction ansatz, based on transformation. This works only with a FermionicTransformation.

Parameters

transformation (Transformation) – a fermionic qubit operator transformation.

Return type

MinimumEigensolver

Returns

A VQE suitable to compute the ground state of the molecule transformed by transformation.

Raises

AquaError – in case a Transformation of wrong type is given.

include_custom

Getter of the include_custom setting for the expectation setting.

Return type

bool

initial_point

Getter of the initial point.

Return type

ndarray

method_doubles

Getter of the method_doubles setting for the method_doubles setting.

Return type

str

method_singles

Getter of the method_singles setting for the method_singles setting.

Return type

str

optimizer

Getter of the optimizer.

Return type

Optimizer

quantum_instance

Getter of the quantum instance.

Return type

QuantumInstance

same_spin_doubles

Getter of the same_spin_doubles setting for the same_spin_doubles setting.

Return type

bool

supports_aux_operators

supports_aux_operators()

Returns whether the eigensolver generated by this factory supports auxiliary operators.

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