iqm.pulla.utils.iqm_circuit_to_gate_implementation#
- iqm.pulla.utils.iqm_circuit_to_gate_implementation(circuit, qubit_mapping)#
Wrap a circuit to a single GateImplementation that can then be registered as an independent “gate”.
Returns a composite GateImplementation which, when called, produces a TimeBox with the circuit contents scheduled ASAP. The input
circuitmust contain only gates that are registered in IQM Pulse. The gate implementation does not need calibration data of its own: it uses the calibration of the registered gates.- Parameters:
circuit (Circuit) – circuit to wrap, typically a small subset of a larger circuit.
qubit_mapping (Annotated[dict[str, str], BeforeValidator(func=~iqm.station_control.interface.models.circuit._parse_legacy_qubit_mapping, json_schema_input_type=PydanticUndefined), PlainSerializer(func=~iqm.station_control.interface.models.circuit._serialize_as_legacy_qubit_mapping, return_type=PydanticUndefined, when_used=always), WithJsonSchema(json_schema={'anyOf': [{'type': 'array', 'items': {'type': 'object', 'required': ['logical_name', 'physical_name'], 'properties': {'logical_name': {'type': 'string'}, 'physical_name': {'type': 'string'}}, 'additionalProperties': False}}, {'type': 'null'}]}, mode=None)]) – Mapping from logical qubit names to physical qubit names.
- Returns:
A new class
CircuitAsCompositewhich can be registered as a new gate implementation.- Return type: