Portuguese
Idiomas
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

# TrotterQRTE¶

class TrotterQRTE(product_formula=None, estimator=None, num_timesteps=1)[código fonte]

Quantum Real Time Evolution using Trotterization. Type of Trotterization is defined by a `ProductFormula` provided.

Examples

```from qiskit.opflow import PauliSumOp
from qiskit.quantum_info import Pauli, SparsePauliOp
from qiskit import QuantumCircuit
from qiskit.algorithms import TimeEvolutionProblem
from qiskit.algorithms.time_evolvers import TrotterQRTE
from qiskit.primitives import Estimator

operator = PauliSumOp(SparsePauliOp([Pauli("X"), Pauli("Z")]))
initial_state = QuantumCircuit(1)
time = 1
evolution_problem = TimeEvolutionProblem(operator, time, initial_state)
# LieTrotter with 1 rep
estimator = Estimator()
trotter_qrte = TrotterQRTE(estimator=estimator)
evolved_state = trotter_qrte.evolve(evolution_problem).evolved_state
```
Parâmetros
• product_formula (ProductFormula | None) – A Lie-Trotter-Suzuki product formula. If `None` provided, the Lie-Trotter first order product formula with a single repetition is used. `reps` should be 1 to obtain a number of time-steps equal to `num_timesteps` and an evaluation of `TimeEvolutionProblem.aux_operators` at every time-step. If `reps` is larger than 1, the true number of time-steps will be `num_timesteps * reps`.

• num_timesteps (int) – The number of time-steps the full evolution time is devided into (repetitions of `product_formula`)

• estimator (BaseEstimator | None) – An estimator primitive used for calculating expectation values of `TimeEvolutionProblem.aux_operators`.

Methods

 `evolve` Evolves a quantum state for a given time using the Trotterization method based on a product formula provided. `supports_aux_operators` Whether computing the expectation value of auxiliary operators is supported.

Attributes

estimator

Returns an estimator.

num_timesteps

Returns the number of timesteps.

product_formula

Returns a product formula.