qiskit.quantum_info.Operator.apply_permutation¶
- Operator.apply_permutation(perm, front=False)[source]¶
Modifies operator’s data by composing it with a permutation.
- Parameters
perm (list) – permutation pattern, describing which qubits occupy the positions 0, 1, 2, etc. after applying the permutation.
front (bool) – When set to
True
the permutation is applied before the operator, when set toFalse
the permutation is applied after the operator.
- Returns
The modified operator.
- Return type
- Raises
QiskitError – if the size of the permutation pattern does not match the dimensions of the operator.