iqm.qrisp_iqm.passes.routing.core.permutation_tools.permute_array#
- iqm.qrisp_iqm.passes.routing.core.permutation_tools.permute_array(address_to_citizen: ndarray, path: ndarray) ndarray#
Permute an address-to-citizen array along a given swap path.
- Parameters:
address_to_citizen (np.ndarray) – Address-to-citizen mapping.
path (np.ndarray) – Swap path.
- Returns:
The permuted array.
- Return type:
np.ndarray