QDrift#

class qiskit.opflow.evolutions.QDrift(reps=1)[source]#

Bases: TrotterizationBase

Deprecated: The QDrift Trotterization method, which selects each each term in the Trotterization randomly, with a probability proportional to its weight. Based on the work of Earl Campbell in https://arxiv.org/abs/1811.08017.

Deprecated since version 0.24.0: The class qiskit.opflow.evolutions.trotterizations.qdrift.QDrift is deprecated as of qiskit-terra 0.24.0. It will be removed no earlier than 3 months after the release date. For code migration guidelines, visit https://qisk.it/opflow_migration.

Parameters:

reps (int) -- The number of times to repeat the Trotterization circuit.

Attributes

reps#

The number of repetitions to use in the Trotterization, improving the approximation accuracy.

Methods

convert(operator)[source]#

Convert a SummedOp into a ComposedOp or CircuitOp representing an approximation of e^-i*``op_sum``.

Parameters:

operator (OperatorBase) -- The SummedOp to evolve.

Returns:

The Operator approximating op_sum's evolution.

Raises:

TypeError -- A non-SummedOps Operator is passed into convert.

Return type:

OperatorBase