sf.apps.qchem.dynamics.sample_tmsv

sample_tmsv(r, t, Ul, w, n_samples, loss=0.0)[source]

Generate samples for simulating vibrational quantum dynamics with a two-mode squeezed vacuum input state.

This function generates samples from a GBS device with two-mode squeezed vacuum input states. Given \(N\) squeezing parameters and an \(N\)-dimensional normal-to-local transformation matrix, a GBS device with \(2N\) modes is simulated. The TimeEvolution() operator acts only on the first \(N\) modes in the device. Samples are generated by measuring the number of photons in each of the \(2N\) modes.

Example usage:

>>> r = [[0.2, 0.1], [0.8, 0.2]]
>>> t = 10.0
>>> Ul = np.array([[0.707106781, -0.707106781],
...                [0.707106781, 0.707106781]])
>>> w = np.array([3914.92, 3787.59])
>>> n_samples = 5
>>> sample_tmsv(r, t, Ul, w, n_samples)
[[0, 0, 0, 0], [0, 0, 0, 0], [0, 1, 0, 1], [0, 1, 0, 1], [0, 2, 0, 2]]
Parameters
  • r (list[list[float]]) – list of two-mode squeezing gate parameters given as [amplitude, phase] for all modes

  • t (float) – time in femtoseconds

  • Ul (array) – normal-to-local transformation matrix

  • w (array) – normal mode frequencies \(\omega\) in units of \(\mbox{cm}^{-1}\)

  • n_samples (int) – number of samples to be generated

  • loss (float) – loss parameter denoting the fraction of lost photons

Returns

a list of samples

Return type

list[list[int]]