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, andp=1
an odd cat statefock_dim (int) – the size of the truncated Fock basis
- Returns
the cat state
- Return type
array
code/api/strawberryfields.utils.cat_state
Download Python script
Download Notebook
View on GitHub