qml.capture.create_measurement_wires_primitive¶
- create_measurement_wires_primitive(measurement_type, name)[source]¶
Create a primitive corresponding to the input type where the abstract inputs are the wires.
Called by default when defining any class inheriting from
MeasurementProcess
, and is used to set theMeasurementProcesss._wires_primitive
property.- Parameters
measurement_type (type) – a subclass of
MeasurementProcess
name (str) – the preferred string name for the class. For example,
"expval"
."_wires"
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]
code/api/pennylane.capture.create_measurement_wires_primitive
Download Python script
Download Notebook
View on GitHub