- class qiskit.algorithms.TrotterQRTE(product_formula=None, expectation=None, quantum_instance=None)#
Deprecated: Quantum Real Time Evolution using Trotterization.
The TrotterQRTE class has been superseded by the
qiskit.algorithms.time_evolvers.trotterization.TrotterQRTEclass. This class will be deprecated in a future release and subsequently removed after that.
Type of Trotterization is defined by a ProductFormula provided.
from qiskit.opflow import X, Z, Zero from qiskit.algorithms import EvolutionProblem, TrotterQRTE from qiskit import BasicAer from qiskit.utils import QuantumInstance operator = X + Z initial_state = Zero time = 1 evolution_problem = EvolutionProblem(operator, 1, initial_state) # LieTrotter with 1 rep backend = BasicAer.get_backend("statevector_simulator") quantum_instance = QuantumInstance(backend=backend) trotter_qrte = TrotterQRTE(quantum_instance=quantum_instance) evolved_state = trotter_qrte.evolve(evolution_problem).evolved_state
Deprecated since version 0.24.0: The class
qiskit.algorithms.evolvers.trotterization.trotter_qrte.TrotterQRTEis deprecated as of qiskit-terra 0.24.0. It will be removed no earlier than 3 months after the release date. Instead, use the class
qiskit.algorithms.time_evolvers.trotterization.TrotterQRTE. See https://qisk.it/algo_migration for a migration guide.
product_formula (ProductFormula | None) – A Lie-Trotter-Suzuki product formula. The default is the Lie-Trotter first order product formula with a single repetition.
expectation (ExpectationBase | None) – An instance of ExpectationBase which defines a method for calculating expectation values of EvolutionProblem.aux_operators.
Returns an expectation used in the algorithm.
Returns a product formula used in the algorithm.
Returns a quantum instance used in the algorithm.
Evolves a quantum state for a given time using the Trotterization method based on a product formula provided. The result is provided in the form of a quantum circuit. If auxiliary operators are included in the
evolution_problem, they are evaluated on an evolved state using a backend provided.
Time-dependent Hamiltonians are not yet supported.
evolution_problem (EvolutionProblem) – Instance defining evolution problem. For the included Hamiltonian,
PauliSumOpare supported by TrotterQRTE.
Evolution result that includes an evolved state as a quantum circuit and, optionally, auxiliary operators evaluated for a resulting state on a backend.
- Return type: