qml.capture.create_operator_primitive

create_operator_primitive(operator_type)[source]

Create a primitive corresponding to an operator type.

Called when defining any Operator subclass, and is used to set the Operator._primitive class property.

Parameters

operator_type (type) – a subclass of qml.operation.Operator

Returns

A new jax primitive with the same name as the operator subclass. None is returned if jax is not available.

Return type

Optional[jax.core.Primitive]