sf.utils.coherent_state

coherent_state(a, basis='fock', fock_dim=5, hbar=2.0)[source]

Returns the coherent state

This can be returned either in the Fock basis,

\[|\alpha\rangle = e^{-|\alpha|^2/2} \sum_{n=0}^\infty \frac{\alpha^n}{\sqrt{n!}}|n\rangle\]

or as a Gaussian:

\[\mu = (\text{Re}(\alpha),\text{Im}(\alpha)),~~~\sigma = I\]

where \(\alpha\) is the displacement.

Parameters
  • a (complex) – the displacement

  • basis (str) – If ‘fock’, calculates the initial state in the Fock basis. If ‘gaussian’, returns the vector of means and the covariance matrix.

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

  • hbar (float) – (default 2) the value of \(\hbar\) in the commutation relation \([\x,\p]=i\hbar\)

Returns

the coherent state

Return type

array