sf.utils.cat_state

cat_state(a, phi=0, p=0, fock_dim=5)[source]

Returns the cat state

\[|cat\rangle = \frac{1}{\sqrt{2(1+e^{-2|\alpha|^2}\cos(\theta))}} \left(|\alpha\rangle +e^{i\theta}|-\alpha\rangle\right)\]

with the even cat state given for \(\theta=0\), and the odd cat state given for \(\theta=\pi\).

Parameters
  • a (float) – displacement magnitude \(|\alpha|\)

  • phi (float) – displacement angle \(\phi\)

  • p (float) – parity, where \(\theta=p\pi\). p=0 corresponds to an even cat state, and p=1 an odd cat state

  • fock_dim (int) – the size of the truncated Fock basis

Returns

the cat state

Return type

array