pub fn concurrence(state: &QuantumState) -> Result<f64, QuantumInfoError>Expand description
Calculate the concurrence of a two-qubit state.
For pure states |ψ⟩ = α|00⟩ + β|01⟩ + γ|10⟩ + δ|11⟩: C = 2|αδ - βγ|
For mixed states: C(ρ) = max(0, λ₁ - λ₂ - λ₃ - λ₄) where λᵢ are the square roots of eigenvalues of ρ(σ_y⊗σ_y)ρ*(σ_y⊗σ_y) in decreasing order.
§Arguments
state- Two-qubit quantum state
§Returns
The concurrence C ∈ [0, 1]