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\times 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 \(\hbar\) in the commutation relation \([\x,\p]=i\hbar\)

Returns

contains the photon number expectation and variance

Return type

tuple

Contents

Using PennyLane

Release news

Development

API

Internals