qml.capture.create_measurement_mcm_primitive

create_measurement_mcm_primitive(measurement_type, name)[source]

Create a primitive corresponding to the input type where the abstract inputs are classical mid circuit measurement results.

Called by default when defining any class inheriting from MeasurementProcess, and is used to set the MeasurementProcesss._mcm_primitive property.

Parameters
  • measurement_type (type) – a subclass of MeasurementProcess

  • name (str) – the preferred string name for the class. For example, "expval". "_mcm" is appended to this name for the name of the primitive.

Returns

A new jax primitive. None is returned if jax is not available.

Return type

Optional[jax.core.Primitive]