qit.invariant.state_inv

qit.invariant.state_inv(rho: State, k: int, perms: Sequence[Sequence[int]]) complex

Local unitary polynomial invariants of quantum states.

Computes the permutation invariant \(I_{k; \pi_1, \pi_2, \ldots, \pi_n}\) for the state \(\rho\), defined as \(\trace(\rho^{\otimes k} \Pi)\), where \(\Pi\) permutes all k copies of the i:th subsystem using \(\pi_i\).

Parameters
  • rho (State) – quantum state with n subsystems

  • k (int) – order of the invariant, k >= 1

  • perms (Sequence[Sequence[int]]) – Permutations. len(perms) == n, each element must be a full k-permutation (or an empty sequence denoting the identity permutation).

Returns

invariant

Return type

complex

Example: \(I_{3; (123),(12)}(\rho) =\) state_inv(rho, 3, [(1, 2, 0), (1, 0, 2)])

This function can be very inefficient for some invariants, since it does no partial traces etc. which might simplify the calculation.

Uses the algorithm in [15].