iqm.pulse.gates.register_implementation#
- iqm.pulse.gates.register_implementation(operations, gate_name, impl_name, impl_class, set_as_default=False, overwrite=False, quantum_op_specs=None)#
Register a new gate implementation, and a new gate (operation) if needed.
- Parameters:
operations (dict[str, QuantumOp]) – Known operations, mapping gate names to QuantumOps
gate_name (str) – The gate name to register
impl_name (str) – The name for this implementation
impl_class (type[GateImplementation]) – The implementation class
set_as_default (bool) – Whether to set as default implementation
overwrite (bool) – If True, allows replacing existing operation/implementation
quantum_op_specs (QuantumOp | dict | None) – Specs for creating new quantum op if needed
- Raises:
ValueError – If operation/implementation exists and overwrite=False
- Return type:
None