iqm.iqm_client.validation.validate_qubit_mapping#
- iqm.iqm_client.validation.validate_qubit_mapping(architecture: DynamicQuantumArchitecture, circuits: list[Circuit | _Circuit | str], 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) None#
Validate the given qubit mapping.
- Parameters:
architecture (DynamicQuantumArchitecture) – Quantum architecture to check against.
circuits (list[Circuit | _Circuit | str]) – Circuits to be checked.
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 allcircuitsalready use physical qubit names. Note that thequbit_mappingis used for allcircuits.
- Raises:
CircuitValidationError – There was something wrong with
circuits.- Return type:
None