measure¶
Contains function measure()
for measuring states
-
class
qualg.measure.
MeasurementResult
(outcome, probability, post_meas_state)¶ -
property
outcome
¶ Alias for field number 0
-
property
post_meas_state
¶ Alias for field number 2
-
property
probability
¶ Alias for field number 1
-
property
-
qualg.measure.
measure
(state, kraus_ops)¶ Measures a state with a given list of Kraus operators describing a POVM.
- Parameters
state (
State
) – The state to be measured.kraus_ops (dict) – Dictionary containing the Kraus operators describing the POVM as values and the outcomes as keys.
- Returns
The namedtuple returned contains: * outcome: The outcome of the measurement, i.e. the key of the Kraus operator. * probability: The probability of the outcome. * post_meas_state: The post-measurement state.
- Return type
Warning
There is no check that the given Kraus operators are actually a valid POVM.