# qiskit.quantum_info.concurrence¶

concurrence(state)[source]

Calculate the concurrence of a quantum state.

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

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

where $$\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(\rho) = \max(0, \lambda_1 - \lambda_2 - \lambda_3 - \lambda_4)$

where $$\lambda _1 \ge \lambda _2 \ge \lambda _3 \ge \lambda _4$$ are the ordered eigenvalues of the matrix $$R=\sqrt{\sqrt{\rho }(Y\otimes Y)\overline{\rho}(Y\otimes Y)\sqrt{\rho}}$$.

প্যারামিটার

state (Statevector or DensityMatrix) -- a 2-qubit quantum state.

রিটার্নস

The concurrence.

রিটার্ন টাইপ

float

রেইজেস
• 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.