mm.physics.fock.sample_homodyne

mrmustard.physics.fock.sample_homodyne(state, quadrature_angle=0.0)[source]

Given a single-mode state, it generates the pdf of \(\tr [ \rho |x_\phi><x_\phi| ]\) where rho is the reduced density matrix of the state.

Parameters:
  • state (Tensor) – ket or density matrix of the state being measured

  • quadrature_angle (float) – angle of the quadrature distribution

Returns:

outcome and probability of the outcome

Return type:

tuple(float, float)