sf.apps.qchem.dynamics.sample_fock

sample_fock(input_state, t, Ul, w, n_samples, cutoff, loss=0.0)[source]

Generate samples for simulating vibrational quantum dynamics with an input Fock state.

Example usage:

>>> input_state = [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
>>> cutoff = 5
>>> sample_fock(input_state, t, Ul, w, n_samples, cutoff)
[[0, 2], [0, 2], [1, 1], [0, 2], [0, 2]]
Parameters
  • input_state (list) – input Fock state

  • 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

  • cutoff (int) – cutoff dimension for each mode

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

Returns

a list of samples

Return type

list[list[int]]