Evolution¶
- class Evolution(num_modes, operator, time=1.0, *, synthesis=None, atomic=False)¶
Bases:
BosonicGateImplements the time evolution of a bosonic operator.
Given a bosonic
operator\(H\) and an evolutiontime\(t\), this gate implements the unitary\[U = e^{-i t H}.\]For \(U\) to be unitary, \(H\) must be Hermitian. This is the caller’s responsibility and is not verified;
is_hermitian()can check it.Note
Breaking this gate down in bosonic space (into a circuit of smaller
Evolutiongates) is optional, and it is what thesynthesisattribute governs. The gate can equally be handed straight to the boson-to-qubit stage, which maps and synthesizes it whole, however many terms itsoperatorholds. Seesynthesis.When it is decomposed (by
decompose(), for instance)synthesisdecides how. It defaults toBosonicLieTrotter, which splits the evolution group-by-group when theoperatorhasgroupsassigned (see Group operator terms: use the operator structure), and term-by-term otherwise (exact only when the individual factors mutually commute). Another method can be chosen, for a whole circuit, with theB2BSynthesistranspiler pass;BosonicQDrift, for example, replaces the evolution with a randomized sample of its terms. The gates it emits areatomic, sosynthesisno longer applies to them.Note
This gate carries no occupation cutoff. It is defined purely in terms of the bosonic operator, whose Fock space is infinite-dimensional. The truncation is introduced later, by the boson-to-qubit encoding chosen during transpilation – which is precisely what lets one ansatz be evaluated at several truncation levels without rebuilding it. See
occupation_encoding().Initializing an instance of this gate can be done with the arguments listed below.
- Parameters:
num_modes (int) – the number of bosonic modes on which this gate acts.
operator (OperatorTrait) – the Hermitian operator \(H\) under which to time evolve the acted-upon bosonic modes.
time (float) – the evolution time \(t\) entering the exponent of \(e^{-i t H}\). A negative value evolves backwards in time.
synthesis (B2BSynthesisPlugin | None) – the boson-to-boson synthesis method with which to decompose this gate, when it gets decomposed at all. If
None(the default), aBosonicLieTrotterinstance is used.atomic (bool) – whether this gate is a fully decomposed factor which must not be broken down any further in bosonic space. See
BosonicGate.atomic.
Attributes
- operator¶
The operator under which to time evolve the acted-upon bosonic modes.
Methods
- inverse(annotated=False)¶
Returns the inverse of this gate, \(e^{+i t H}\).
- Parameters:
annotated (bool) – ignored. The inverse of this gate is another
Evolution, so it never needs to be anAnnotatedOperation.- Returns:
An
Evolutiongate evolving the same operator for the negated time.- Return type: