qml.devices.MCMConfig

class MCMConfig(mcm_method=None, postselect_mode=None)[source]

Bases: object

A class to store mid-circuit measurement configurations.

mcm_method

Which mid-circuit measurement strategy to use.

postselect_mode

Configuration for handling shots with mid-circuit measurement postselection.

mcm_method = None

Which mid-circuit measurement strategy to use. Use deferred for the deferred measurements principle and “one-shot” if using finite shots to execute the circuit for each shot separately. If not specified, the device will decide which method to use.

postselect_mode = None

Configuration for handling shots with mid-circuit measurement postselection. If "hw-like", invalid shots will be discarded and only results for valid shots will be returned. If "fill-shots", results corresponding to the original number of shots will be returned. If not specified, the device will decide which mode to use.

Contents

Using PennyLane

Release news

Development

API

Internals