qml.devices.default_gaussian.fock_expectation¶
- fock_expectation(cov, mu, params, hbar=2.0)[source]¶
Calculates the expectation and variance of a Fock state probability.
- Parameters
cov (array) – 2N×2N covariance matrix
mu (array) – length-2N vector of means
params (Sequence[int]) – the Fock state to return the expectation value for
hbar (float) – (default 2) the value of ℏ in the commutation relation [ˆx,ˆp]=iℏ
- Returns
the Fock state expectation and variance
- Return type
tuple