iqm.iqm_client.validation.validate_circuit_moves#
- iqm.iqm_client.validation.validate_circuit_moves(architecture: DynamicQuantumArchitecture, circuit: Circuit, qubit_mapping: 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)] | None = None, validate_moves: MoveGateValidationMode = MoveGateValidationMode.STRICT, *, must_close_sandwiches: bool = True) None#
Raise an error if the MOVE gates in the circuit are not valid in the given architecture.
- Parameters:
architecture (DynamicQuantumArchitecture) – Quantum architecture to check against.
circuit (Circuit) – Quantum circuit to validate.
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)] | None) – Mapping of logical qubit names to physical qubit names. Can be set to
Noneif thecircuitalready uses physical qubit names.validate_moves (MoveGateValidationMode) – Option for bypassing full or partial MOVE gate validation.
must_close_sandwiches (bool) – Iff True, MOVE sandwiches cannot be left open when the circuit ends.
- Raises:
CircuitValidationError – validation failed
- Return type:
None