mm.lab.Heterodyne

class mrmustard.lab.Heterodyne(x=0.0, y=0.0, modes=None)[source]

Bases: Generaldyne

Heterodyne measurement on given modes.

This class is just a thin wrapper around the Coherent. If neither x or y is provided then values will be sampled.

Parameters:
  • x (optional float or List[float]) – the x-displacement of the coherent state, defaults to None

  • y (optional or List[float]) – the y-displacement of the coherent state, defaults to None

  • modes (List[int]) – the modes of the coherent state

modes

returns the modes being measured

num_modes

returns the number of modes being measured

outcome

Returns outcome of the measurement.

parameter_set

The set of parameters for this transformation.

postselected

returns whether the measurement is postselected, i.e, a outcome has been provided

modes

returns the modes being measured

num_modes

returns the number of modes being measured

outcome
parameter_set

The set of parameters for this transformation.

postselected

returns whether the measurement is postselected, i.e, a outcome has been provided

primal(other)

performs the measurement procedure according to the representation of the incoming state

primal(other)

performs the measurement procedure according to the representation of the incoming state

Return type:

Union[State, float]