Skip to main content Module entanglement Copy item path Source DensityMatrix2x2 2x2 density matrix. EntanglementRenderer Renderer for entanglement visualization. GHZState N-particle GHZ state: (|00…0> + |11…1>)/sqrt(2). QubitState Single qubit state: |psi> = alpha|0> + beta|1>. TwoQubitState Two-qubit state: amplitudes for |00>, |01>, |10>, |11>. bell_state Create a Bell state.
0: Phi+ = (|00> + |11>)/sqrt(2)
1: Phi- = (|00> - |11>)/sqrt(2)
2: Psi+ = (|01> + |10>)/sqrt(2)
3: Psi- = (|01> - |10>)/sqrt(2) chsh_correlation CHSH correlation: S = E(a1,b1) - E(a1,b2) + E(a2,b1) + E(a2,b2).
Each angle specifies a measurement axis in the XZ plane.
Returns |S|, which violates Bell inequality when > 2. concurrence Concurrence: entanglement measure for two-qubit pure states.
C = 2|ad - bc| where state = a|00> + b|01> + c|10> + d|11>. measure_qubit Measure one qubit of a two-qubit state.
Returns (outcome, collapsed state of the other qubit). partial_trace Partial trace: trace out one qubit to get the density matrix of the other.