Permutations

A number of permutations-related functions.

Permutations

toqito.perms.antisymmetric_projection(dim, …) Produce the projection onto the antisymmetric subspace [WikAsym].
toqito.perms.perfect_matchings(num, int, …) Give all perfect matchings of num objects.
toqito.perms.perm_sign(perm, List[int]]) Compute the “sign” of a permutation [WikParPerm].
toqito.perms.permutation_operator(dim, int], …) Produce a unitary operator that permutes subsystems.
toqito.perms.permute_systems(input_mat, …) Permute subsystems within a state or operator.
toqito.perms.swap(rho, sys, dim, …) Swap two subsystems within a state or operator.
toqito.perms.swap_operator(dim, int], is_sparse) Produce a unitary operator that swaps two subsystems.
toqito.perms.symmetric_projection(dim, …) Produce the projection onto the symmetric subspace [CJKLZ14].
toqito.perms.unique_perms(elements) Determine the number of unique permutations of a list.