VQEClient¶
- class VQEClient(ansatz, optimizer=None, initial_point=None, provider=None, backend=None, shots=1024, measurement_error_mitigation=False, callback=None, store_intermediate=False)[source]¶
Bases:
MinimumEigensolver
The Qiskit Optimization VQE Runtime Client to call the VQE runtime as a MinimumEigensolver.
This program is equivalent to the
VQEClient
in Qiskit Nature, but here also serves as basis for the Qiskit Optimization’sQAOAClient
.- Parameters:
ansatz (
QuantumCircuit
) – A parameterized circuit used as Ansatz for the wave function.optimizer (
Union
[Optimizer
,Dict
[str
,Any
],None
]) – An optimizer or dictionary specifying a classical optimizer. If a dictionary, only SPSA and QN-SPSA are supported. The dictionary must contain a keyname
for the name of the optimizer and may contain additional keys for the settings. E.g.{'name': 'SPSA', 'maxiter': 100}
. Per default, SPSA is used.backend (
Optional
[Backend
]) – The backend to run the circuits on.initial_point (
Optional
[ndarray
]) – An optional initial point (i.e. initial parameter values) for the optimizer. IfNone
a random vector is used.provider (
Optional
[Provider
]) – Provider that supports the runtime feature.shots (
int
) – The number of shots to be usedmeasurement_error_mitigation (
bool
) – Whether or not to use measurement error mitigation.callback (
Optional
[Callable
[[int
,ndarray
,float
,float
],None
]]) – a callback that can access the intermediate data during the optimization. Four parameter values are passed to the callback as follows during each evaluation by the optimizer for its current set of parameters as it works towards the minimum. These are: the evaluation count, the optimizer parameters for the ansatz, the evaluated mean and the evaluated standard deviation.store_intermediate (
bool
) – Whether or not to store intermediate values of the optimization steps. Per default False.
Attributes
Return the ansatz.
Returns the backend.
Returns the callback.
Returns the initial point.
Returns whether or not to use measurement error mitigation.
Return the dictionary describing the optimizer.
Return the program ID.
Return the provider.
Return the number of shots.
Returns whether or not to store intermediate information of the optimization.
Methods
compute_minimum_eigenvalue
(operator[, ...])Calls the VQE Runtime to approximate the ground state of the given operator.
program_inputs
(operator[, aux_operators])Return the inputs for the runtime program.
Whether computing the expectation value of auxiliary operators is supported.