quspin.basis.coherent_state
- quspin.basis.coherent_state(a, n, dtype=<class 'numpy.float64'>)[source]
Creates a harmonic oscillator (HO) coherent state.
- Parameters:
- a: float
Expectation value of annihilation operator \(\langle a\rangle\) or, equivalently square root of the mean particle number.
- n: int
Cut-off on the number of HO eigenstates kept in the definition of the coherent state.
- dtype: ‘type’
Data type (e.g. numpy.float64) to construct the coherent state with. Default is np.float64.
- Returns:
- numpy.ndarray
Harmonic oscilaltor coherent state.
Examples
>>> coherent_state(a,n,dtype=np.float64)