iqm.pulse.gates.register_implementation#
- iqm.pulse.gates.register_implementation(operations, op_name, impl_name, impl_class, *, set_as_default=False, overwrite=False)#
Register a new GateImplementation.
- Parameters:
operations (dict[str, QuantumOp]) – Known operations, to which the new implementation is added.
op_name (str) – Name of the operation under which the implementation is registered.
impl_name (str) – Name of the implementation to register.
impl_class (type[GateImplementation]) – Implementation class to register.
set_as_default (bool) – Whether to set as the default implementation for
op_name
.overwrite (bool) – If True, allows replacing an existing implementation.
- Raises:
ValueError –
op_name
does not exist inoperations
.ValueError – The implementation exists and
overwrite==False
.
- Return type:
None