55 lines
3.4 KiB
Plaintext
55 lines
3.4 KiB
Plaintext
---
|
||
title: VarQRTE
|
||
description: API reference for qiskit.algorithms.VarQRTE
|
||
in_page_toc_min_heading_level: 1
|
||
python_api_type: class
|
||
python_api_name: qiskit.algorithms.VarQRTE
|
||
---
|
||
|
||
# VarQRTE
|
||
|
||
<Class id="qiskit.algorithms.VarQRTE" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.24/qiskit/algorithms/time_evolvers/variational/var_qrte.py" signature="VarQRTE(ansatz, initial_parameters, variational_principle=None, estimator=None, ode_solver=<class 'qiskit.algorithms.time_evolvers.variational.solvers.ode.forward_euler_solver.ForwardEulerSolver'>, lse_solver=None, num_timesteps=None, imag_part_tol=1e-07, num_instability_tol=1e-07)" modifiers="class">
|
||
Bases: `VarQTE`, [`RealTimeEvolver`](qiskit.algorithms.RealTimeEvolver "qiskit.algorithms.time_evolvers.real_time_evolver.RealTimeEvolver")
|
||
|
||
Variational Quantum Real Time Evolution algorithm.
|
||
|
||
**Parameters**
|
||
|
||
* **ansatz** ([*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit")) – Ansatz to be used for variational time evolution.
|
||
* **initial\_parameters** (*Mapping\[*[*Parameter*](qiskit.circuit.Parameter "qiskit.circuit.Parameter")*, float] | Sequence\[float]*) – Initial parameter values for an ansatz.
|
||
* **variational\_principle** ([*RealVariationalPrinciple*](qiskit.algorithms.time_evolvers.variational.RealVariationalPrinciple "qiskit.algorithms.time_evolvers.variational.RealVariationalPrinciple") *| None*) – Variational Principle to be used. Defaults to `RealMcLachlanPrinciple`.
|
||
* **estimator** ([*BaseEstimator*](qiskit.primitives.BaseEstimator "qiskit.primitives.BaseEstimator") *| None*) – An estimator primitive used for calculating expectation values of TimeEvolutionProblem.aux\_operators.
|
||
* **ode\_solver** (*Type\[OdeSolver] | str*) – ODE solver callable that implements a SciPy `OdeSolver` interface or a string indicating a valid method offered by SciPy.
|
||
* **lse\_solver** (*Callable\[\[np.ndarray, np.ndarray], np.ndarray] | None*) – Linear system of equations solver callable. It accepts `A` and `b` to solve `Ax=b` and returns `x`. If `None`, the default `np.linalg.lstsq` solver is used.
|
||
* **num\_timesteps** (*int | None*) – The number of timesteps to take. If `None`, it is automatically selected to achieve a timestep of approximately 0.01. Only relevant in case of the `ForwardEulerSolver`.
|
||
* **imag\_part\_tol** (*float*) – Allowed value of an imaginary part that can be neglected if no imaginary part is expected.
|
||
* **num\_instability\_tol** (*float*) – The amount of negative value that is allowed to be rounded up to 0 for quantities that are expected to be non-negative.
|
||
|
||
## Methods
|
||
|
||
<span id="qiskit-algorithms-varqrte-evolve" />
|
||
|
||
### evolve
|
||
|
||
<Function id="qiskit.algorithms.VarQRTE.evolve" signature="VarQRTE.evolve(evolution_problem)">
|
||
Apply Variational Quantum Time Evolution to the given operator.
|
||
|
||
**Parameters**
|
||
|
||
**evolution\_problem** ([*TimeEvolutionProblem*](qiskit.algorithms.TimeEvolutionProblem "qiskit.algorithms.time_evolvers.time_evolution_problem.TimeEvolutionProblem")) – Instance defining an evolution problem.
|
||
|
||
**Returns**
|
||
|
||
Result of the evolution which includes a quantum circuit with bound parameters as an evolved state and, if provided, observables evaluated on the evolved state.
|
||
|
||
**Raises**
|
||
|
||
**ValueError** – If `initial_state` is included in the `evolution_problem`.
|
||
|
||
**Return type**
|
||
|
||
*VarQTEResult*
|
||
</Function>
|
||
</Class>
|
||
|