Skip to main contentIBM Quantum Documentation
You are viewing the API reference for an old version of Qiskit SDK. Switch to latest version



GitHub(opens in a new tab)

Calculate the concurrence of a quantum state.

The concurrence of a bipartite Statevector ψ|\psi\rangle is given by

C(ψ)=2(1Tr[ρ02])C(|\psi\rangle) = \sqrt{2(1 - Tr[\rho_0^2])}

where ρ0=Tr1[ψ ⁣ψ]\rho_0 = Tr_1[|\psi\rangle\!\langle\psi|] is the reduced state from by taking the partial_trace() of the input state.

For density matrices the concurrence is only defined for 2-qubit states, it is given by:

C(ρ)=max(0,λ1λ2λ3λ4)C(\rho) = \max(0, \lambda_1 - \lambda_2 - \lambda_3 - \lambda_4)

where λ1λ2λ3λ4\lambda _1 \ge \lambda _2 \ge \lambda _3 \ge \lambda _4 are the ordered eigenvalues of the matrix R=ρ(YY)ρ(YY)ρR=\sqrt{\sqrt{\rho }(Y\otimes Y)\overline{\rho}(Y\otimes Y)\sqrt{\rho}}.


state (Statevector orDensityMatrix) – a 2-qubit quantum state.


The concurrence.

Return type



  • QiskitError – if the input state is not a valid QuantumState.
  • QiskitError – if input is not a bipartite QuantumState.
  • QiskitError – if density matrix input is not a 2-qubit state.
Was this page helpful?
Report a bug or request content on GitHub.