QEomVQE¶
- class QEomVQE(operator, var_form, optimizer, num_orbitals, num_particles, initial_point=None, max_evals_grouped=1, callback=None, qubit_mapping='parity', two_qubit_reduction=True, is_eom_matrix_symmetric=True, active_occupied=None, active_unoccupied=None, se_list=None, de_list=None, z2_symmetries=None, untapered_op=None, aux_operators=None, quantum_instance=None)[source]¶
QEomVQE algorithm
- Parameters
operator (
LegacyBaseOperator
) – qubit operatorvar_form (
Union
[QuantumCircuit
,VariationalForm
]) – parameterized variational form.optimizer (
Optimizer
) – the classical optimization algorithm.num_orbitals (
int
) – total number of spin orbitals, has a min. value of 1.num_particles (
Union
[List
[int
],int
]) – number of particles, if it is a list, the first number is alpha and the second number if beta.initial_point (
Optional
[ndarray
]) – optimizer initial point, 1-D vectormax_evals_grouped (
int
) – max number of evaluations performed simultaneouslycallback (
Optional
[Callable
[[int
,ndarray
,float
,float
],None
]]) – a callback that can access the intermediate data during the optimization. Internally, four arguments are provided as follows the index of evaluation, parameters of variational form, evaluated mean, evaluated standard deviation.qubit_mapping (
str
) – qubit mapping typetwo_qubit_reduction (
bool
) – two qubit reduction is applied or notis_eom_matrix_symmetric (
bool
) – is EoM matrix symmetricactive_occupied (
Optional
[List
[int
]]) – list of occupied orbitals to include, indices are 0 to n where n is num particles // 2active_unoccupied (
Optional
[List
[int
]]) – list of unoccupied orbitals to include, indices are 0 to m where m is (num_orbitals - num particles) // 2se_list (
Optional
[List
[List
[int
]]]) – single excitation list, overwrite the setting in active spacede_list (
Optional
[List
[List
[int
]]]) – double excitation list, overwrite the setting in active spacez2_symmetries (
Optional
[Z2Symmetries
]) – represent the Z2 symmetriesuntapered_op (
Optional
[LegacyBaseOperator
]) – if the operator is tapered, we need untapered operator during building element of EoM matrixaux_operators (
Optional
[List
[LegacyBaseOperator
]]) – Auxiliary operators to be evaluated at each eigenvaluequantum_instance (
Union
[QuantumInstance
,BaseBackend
,None
]) – Quantum Instance or Backend
- Raises
ValueError – invalid parameter
Attributes
Returns aux operators
Returns backend.
The expectation value algorithm used to construct the expectation measurement from the observable.
Returns initial point
Returns operator
The optimal parameters for the variational form.
Returns optimizer
Returns quantum instance.
Return a numpy random.
Prepare the setting of VQE as a string.
Returns variational form
Methods
set parameterized circuits to None
Computes minimum eigenvalue.
QEomVQE.construct_circuit
(parameter)Generate the ansatz circuit and expectation value measurement, and return their runnable composition.
QEomVQE.find_minimum
([initial_point, …])Optimize to find the minimum cost value.
Get the circuit with the optimal parameters.
Get the minimal cost or energy found by the VQE.
Get the simulation outcome of the optimal circuit.
Helper function to get probability vectors for a set of params
get probabilities for counts
Preparing the setting of VQE into a string.
QEomVQE.run
([quantum_instance])Execute the algorithm with selected backend.
QEomVQE.set_backend
(backend, **kwargs)Sets backend with configuration.
Whether computing the expectation value of auxiliary operators is supported.