qml.measurements.MeasurementValue¶
-
class
MeasurementValue
(measurements, processing_fn)[source]¶ Bases:
Generic
[pennylane.measurements.mid_measure.T
]A class representing unknown measurement outcomes in the qubit model.
Measurements on a single qubit in the computational basis are assumed.
- Parameters
measurements (list[MidMeasureMP]) – The measurement(s) that this object depends on.
processing_fn (callable) – A lazily transformation applied to the measurement values.
Attributes
A dictionary representing all possible outcomes of the MeasurementValue.
Returns a list of wires corresponding to the mid-circuit measurements.
-
branches
¶ A dictionary representing all possible outcomes of the MeasurementValue.
-
name
= 'MeasurementValue'¶
-
wires
¶ Returns a list of wires corresponding to the mid-circuit measurements.
Methods
concretize
(measurements)Returns a concrete value from a dictionary of hashes with concrete values.
map_wires
(wire_map)Returns a copy of the current
MeasurementValue
with the wires of each measurement changed according to the given wire map.-
concretize
(measurements)[source]¶ Returns a concrete value from a dictionary of hashes with concrete values.
-
map_wires
(wire_map)[source]¶ Returns a copy of the current
MeasurementValue
with the wires of each measurement changed according to the given wire map.- Parameters
wire_map (dict) – dictionary containing the old wires as keys and the new wires as values
- Returns
new
MeasurementValue
instance with measurement wires mapped- Return type