Quantum Discord: Separable Does Not Mean Classical
A separable pair can have zero discord on one side and nonzero discord on the other. Test local measurements in NumPy and see why the basis matters.
You can prepare a pair of qubits with a coin toss and local state preparation, never entangle them, and still find that measuring one side loses correlations. The surprise is not a hidden Bell pair. It is that separability and classicality answer different questions.
Quantum discord makes that distinction precise. It also forces you to say which side you measure.
A classical label attached to two different qubit states
Toss a fair coin. On heads, prepare A in |0> and B in |0>. On tails, prepare A in |1> and B in |+>, where |+> = (|0> + |1>)/sqrt(2).
If the coin result is not supplied separately, the joint density matrix is
rho_AB = 0.5 |0><0|_A tensor |0><0|_B
+ 0.5 |1><1|_A tensor |+><+|_B
This is a statistical mixture of product states, so it is separable by construction. Do not replace that mixture with a coherent superposition of its two product kets. That would be a different state.
A carries a perfectly distinguishable label: |0> or |1>. An unread Z measurement on A leaves the joint density matrix unchanged. Here, unread means we average over both outcomes rather than condition on one selected outcome.
B is different. Its two conditional states, |0> and |+>, are neither identical nor orthogonal. There is no single orthonormal basis in which both of their projectors are diagonal.
That asymmetry is the point of the example.
What information does a local measurement preserve?
The quantum mutual information measures total correlations:
I(A:B) = S(rho_A) + S(rho_B) - S(rho_AB)
S is the von Neumann entropy, calculated with base-two logarithms so the units are bits. For a rank-one projective measurement on B, define
J_B = S(rho_A) - sum_b p_b S(rho_A_given_b)
This is the information about A retained in B's classical outcome. The gap I(A:B)-J_B is nonnegative. Minimizing it over B's measurement bases gives one-sided quantum discord for this projective-measurement definition. More general POVM definitions are also used, so a numerical claim should specify the allowed measurements.
For rank-one projective measurements, the mutual information of the joint state after the unread measurement equals J_B. We can therefore calculate the gap by comparing mutual information before and after local dephasing.
This connection, the need to minimize over measurements, and the direction dependence appear in Ollivier and Zurek's original quantum-discord paper.
Try three measurements in NumPy
The code constructs the mixture directly, traces out either qubit, and computes entropy from the density matrix's eigenvalues. Its dephasing function applies both projectors and sums their contributions. It does not pick one outcome.
We compare a Z measurement on A with two measurements on B: Z, and the observable (Z-X)/sqrt(2). The latter has an axis halfway between +Z and -X on the Bloch sphere. Both observables have eigenvalues +1 and -1.
import numpy as np
I2 = np.eye(2)
X = np.array([[0.0, 1.0], [1.0, 0.0]])
Z = np.diag([1.0, -1.0])
zero = np.array([1.0, 0.0])
one = np.array([0.0, 1.0])
plus = (zero + one) / np.sqrt(2)
def projector(ket):
return np.outer(ket, ket.conj())
rho = 0.5 * projector(np.kron(zero, zero))
rho += 0.5 * projector(np.kron(one, plus))
def entropy(state):
eigenvalues = np.linalg.eigvalsh(state)
eigenvalues = eigenvalues[eigenvalues > 1e-12]
return -np.sum(eigenvalues * np.log2(eigenvalues))
def mutual_information(state):
# Matrix indices are (a, b, a_prime, b_prime).
tensor = state.reshape(2, 2, 2, 2)
reduced_A = np.trace(tensor, axis1=1, axis2=3)
reduced_B = np.trace(tensor, axis1=0, axis2=2)
return entropy(reduced_A) + entropy(reduced_B) - entropy(state)
def dephase(state, observable, side):
result = np.zeros_like(state)
for sign in [1, -1]:
P = (I2 + sign * observable) / 2
local_P = np.kron(P, I2) if side == "A" else np.kron(I2, P)
result += local_P @ state @ local_P.conj().T
return result
initial = mutual_information(rho)
print(f"Initial mutual information: {initial:.6f} bits")
for label, observable, side in [
("A: Z", Z, "A"),
("B: Z", Z, "B"),
("B: (Z-X)/sqrt(2)", (Z - X) / np.sqrt(2), "B"),
]:
after = dephase(rho, observable, side)
retained = mutual_information(after)
assert np.isclose(np.trace(after), 1.0)
assert np.linalg.eigvalsh(after).min() > -1e-12
print(f"{label}: retained={retained:.6f}, loss={initial-retained:.6f}")
assert np.allclose(dephase(rho, Z, "A"), rho)
commutator = projector(zero) @ projector(plus)
commutator -= projector(plus) @ projector(zero)
print(f"Conditional-projector commutator norm: {np.linalg.norm(commutator):.6f}")
Output:
Initial mutual information: 0.600876 bits
A: Z: retained=0.600876, loss=0.000000
B: Z: retained=0.311278, loss=0.289598
B: (Z-X)/sqrt(2): retained=0.399124, loss=0.201752
Conditional-projector commutator norm: 0.707107
The values are ideal density-matrix calculations, not hardware estimates. The small eigenvalue threshold only suppresses numerical roundoff in the entropy calculation.
Measuring A in Z preserves the whole state, not just its mutual information. That establishes zero discord when A is the measured side.
The two B measurements retain different amounts of information. The tilted basis does better than Z, but the code is not a general optimizer. The printed losses are measurement-specific gaps, not numbers that should automatically be reported as the optimized discord. Either tested loss is an upper bound on the minimum over projective bases.
Why the B-side discord really is nonzero
A loss in one or two chosen bases would not prove nonzero discord. A classical state can be disturbed if you measure it in the wrong basis.
For this example, there is a separate structural argument. A state has zero one-sided discord exactly when there is a complete rank-one local projective measurement on that side which leaves the joint state unchanged. Equivalently, it can be written as a mixture with mutually orthogonal classical labels on the measured subsystem. The review by Modi and colleagues explains this classical-quantum structure and its relation to separability.
Because A's labels occupy orthogonal blocks, any B dephasing that preserved our joint state would have to preserve both conditional projectors on B separately. But |0><0| and |+><+| do not commute, as the code confirms. They cannot both be diagonal in one B basis. No such nondisturbing B measurement exists.
Thus the state is separable, has zero discord when measuring A, and nonzero discord when measuring B. This zero-versus-nonzero distinction also holds under the usual POVM extension of discord, although optimized numerical values can depend on the measurement class.
The lesson is not that discord guarantees a computational speedup, or that classical communication secretly created entanglement. It is narrower and more useful: a mixture of product states need not behave like a pair of classical registers. If different classical labels point to incompatible quantum states on the other side, the direction and basis of your readout matter.