qml.devices.default_gaussian.photon_number¶
- photon_number(cov, mu, params, hbar=2.0)[source]¶
Calculates the mean photon number for a given one-mode state.
- Parameters
cov (array) – 2×2 covariance matrix
mu (array) – length-2 vector of means
params (None) – no parameters are used for this expectation value
hbar (float) – (default 2) the value of ℏ in the commutation relation [ˆx,ˆp]=iℏ
- Returns
contains the photon number expectation and variance
- Return type
tuple