Circuit.renumber_qudits
- Circuit.renumber_qudits(qudit_permutation)[source]
Permute the qudits in the circuit.
- Parameters:
qudit_permutation (
Sequence[int]
) – A map from qudit indices to qudit indices.- Raises:
IndexError – If any of the indices are out of range.
ValueError – If the qudit_permutation is not the same size as the circuit.
ValueError – If the qudit_permutation is not a valid permutation.