qubit_reindexer
get_reindexed_circuit
get_reindexed_circuit(
replacement_gates: Iterable[Gate],
qubit_indices: list[int],
bit_register_size: int = 0,
) -> Circuit
Reindex the qubit indices of the given (replacement) gates in a circuit.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
replacement_gates
|
Iterable[Gate]
|
The gates to be reindexed. |
required |
qubit_indices
|
list[int]
|
The new qubit indices. |
required |
bit_register_size
|
int
|
The size of the bit register. |
0
|
Returns:
| Type | Description |
|---|---|
Circuit
|
The reindexed circuit. |