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 Ik;π1,π2,,πn for the state ρ, defined as Tr(ρkΠ), where Π permutes all k copies of the i:th subsystem using π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: I3;(123),(12)(ρ)= 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].