Loading [MathJax]/jax/output/HTML-CSS/jax.js

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

Contents

Using PennyLane

Release news

Development

API

Internals