Skip to content

tket_layout_mapper

TketLayoutMapper

Maps virtual qubits/bits to physical indices for tket circuits.

create_identity_mapping

create_identity_mapping(circuit: Circuit) -> dict[str, dict[int, int]]

Create identity mapping for qubits and bits.

Returns:

  • dict[str, dict[int, int]]

    dict[str, dict[int, int]]: Identity mapping for qubits and bits.

create_mapping_from_compilation_unit

create_mapping_from_compilation_unit(compilation_unit: CompilationUnit, circuit: Circuit) -> dict[str, dict[int, int]]

Create mapping from a CompilationUnit and its circuit.

Returns:

  • dict[str, dict[int, int]]

    dict[str, dict[int, int]]: Mapping for qubits and bits.