qubit_remapper
get_remapped_ir
Get replacement IR where the qubit indices are remapped according to the provided mapping.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
circuit
|
Circuit
|
The input circuit from which the replacement IR is to be generated. |
required |
mapping
|
Mapping
|
Mapping of virtual qubit indices to physical qubit indices. |
required |
Returns:
| Type | Description |
|---|---|
IR
|
Replacement IR with remapped qubit indices. |
Source code in opensquirrel/passes/mapper/qubit_remapper.py
remap_ir
Remap the IR of the circuit according to the provided mapping.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
circuit
|
Circuit
|
The input circuit whose IR is to be remapped. |
required |
mapping
|
Mapping
|
Mapping of virtual qubit indices to physical qubit indices. |
required |