iqm.pulla.utils.iqm_circuit_to_gate_implementation

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 circuit must 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 (dict[str, str]) – Mapping from logical qubit names to physical qubit names.

Returns:

A new class CircuitAsComposite which can be registered as a new gate implementation.

Return type:

type[CompositeGate]