qml.measurements.get_mcm_predicates

get_mcm_predicates(conditions)[source]

Function to make mid-circuit measurement predicates mutually exclusive.

The conditions are predicates to the if and elif branches of qml.cond. This function updates all the MeasurementValues in conditions such that reconciling the correct branch is never ambiguous.

Parameters

conditions (Sequence[MeasurementValue]) – Sequence containing predicates for if and all elif branches of a function decorated with cond().

Returns

Updated sequence of mutually exclusive predicates.

Return type

Sequence[MeasurementValue]