Abstract
Noncommutativity of states and observables is a fundamental signature of quantum theory, and a minimal requirement for nonclassicality. We provide a universal necessary and sufficient condition for pairwise commutativity of quantum states ρ₁ and ρ₂: they commute if and only if tr(ρ₁²ρ₂²) = tr(ρ₁ ρ₂ ρ₁ ρ₂). For qubits the identity simplifies to an equality between polynomials of purities and of the two-state overlap tr(ρ₁ρ₂). These multivariate traces (known as Bargmann invariants) are directly measurable, allowing commutativity tests that bypass full state tomography. We point out possible applications to the analysis of POVM simulability and partial photonic distinguishability.