Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK and does not exist in the latest version. We recommend you migrate to the latest version. See the release notes for more information.

qiskit.quantum_info.concurrence

concurrence(state)

GitHub

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}}.

Parameters

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

Returns

The concurrence.

Return type

float

Raises

  • 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.