mm.lab.abstract.FockMeasurement¶
- class mrmustard.lab.abstract.FockMeasurement(outcome, modes, cutoffs)[source]¶
Bases:
Measurement
A Fock measurement projecting onto a Fock measurement pattern.
It works by representing the state in the Fock basis and then applying a stochastic channel matrix
P(meas|n)
to the Fock probabilities (belief propagation).It outputs the measurement probabilities and the remaining post-measurement state (if any) in the Fock basis.
Attributes
returns the modes being measured
returns the number of modes being measured
Returns outcome of the measurement.
The set of parameters for this transformation.
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
Methods
primal
(other)performs the measurement procedure according to the representation of the incoming state
recompute_stochastic_channel
(cutoffs)Recomputes the stochastic channel.
Returns True if the stochastic channel has to be recomputed.
- primal(other)¶
performs the measurement procedure according to the representation of the incoming state
- Return type:
Union
[State
,float
]