sf.apps.qchem.dynamics.evolution

evolution(modes)[source]

Generates a custom sf operation for performing the transformation \(U(t) = U_l e^{-i\hat{H}t/\hbar} U_l^\dagger\) on a given state.

The custom operation returned by this function can be used as part of a Strawberry Fields Program just like any other operation from the ops module. Its arguments are:

  • t (float): time in femtoseconds

  • Ul (array): normal-to-local transformation matrix \(U_l\)

  • w (array): normal mode frequencies \(\omega\) in units of \(\mbox{cm}^{-1}\) that compose the Hamiltonian \(\hat{H} = \sum_i \hbar \omega_i a_i^\dagger a_i\)

Example usage:

>>> modes = 2
>>> transform =  evolution(modes)
>>> p = sf.Program(modes)
>>> with p.context as q:
>>>     sf.ops.Fock(1) | q[0]
>>>     sf.ops.Fock(2) | q[1]
>>>     transform(t, Ul, w) | q
Parameters

modes (int) – number of modes

Returns

an sf operation for enacting the dynamics transformation

Return type:

op