- class TrotterQRTE(product_formula=None, expectation=None, quantum_instance=None)¶
Pending deprecation: 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
ProductFormula]) – A Lie-Trotter-Suzuki product formula. The default is the Lie-Trotter first order product formula with a single repetition.
ExpectationBase]) – An instance of ExpectationBase which defines a method for calculating expectation values of EvolutionProblem.aux_operators.
Evolves a quantum state for a given time using the Trotterization method based on a product formula provided.
Whether computing the expectation value of auxiliary operators is supported.