|q⟩ Bad Qubits

advanced · Programming · Tensor Networks & Simulation Methods

Checkpoint: Estimate Simulability

This checkpoint pulls the module together: given the entanglement structure of a state, estimate the bond dimension an exact matrix product state would need — the single number that decides whether a classical tensor-network simulation is feasible.

The rule you will apply

The exact MPS bond dimension across a cut equals the Schmidt rank at that cut: the number of non-zero Schmidt coefficients λα\lambda_\alpha when you write

ψ=αλαuαLvαR.|\psi\rangle = \sum_{\alpha} \lambda_\alpha\, |u_\alpha\rangle_L \otimes |v_\alpha\rangle_R .

A coefficient that is (numerically) zero contributes nothing and does not count. The overall bond dimension a faithful MPS needs is the largest Schmidt rank over all cuts of the chain. If that number stays small as the system grows, the state is efficiently simulable; if it grows exponentially, it is not.

The state in this problem

Consider a 4-qubit state cut down the middle, into the left pair {0,1}\{0,1\} and the right pair {2,3}\{2,3\}. Suppose its Schmidt decomposition across that cut has the squared Schmidt coefficients (the eigenvalues of the reduced density matrix)

{λα2}={0.5,  0.5,  0,  0}.\{\lambda_\alpha^2\} = \{\,0.5,\; 0.5,\; 0,\; 0\,\} .

Two of the four possible Schmidt terms carry weight; the other two vanish. So the Schmidt rank — and hence the exact bond dimension across this cut — is 22. The entanglement entropy is S=αλα2log2λα2=(0.5log20.5+0.5log20.5)=1S = -\sum_\alpha \lambda_\alpha^2 \log_2 \lambda_\alpha^2 = -(0.5\log_2 0.5 + 0.5\log_2 0.5) = 1 bit, consistent with S=log2χ=log22=1S = \log_2 \chi = \log_2 2 = 1.

Your task

The reduced-density-matrix eigenvalues across the middle cut are given to you as an array. Count how many are non-negligible (above a tolerance such as 10910^{-9}) and return that count — the exact bond dimension χ\chi for this cut. For the spectrum above the answer is 22.

Try it

Compute and return the bond dimension. The grader checks the returned number.

Run your code to see the quantum state.

After running, you should return the integer 22: a state with two non-zero Schmidt coefficients across a cut needs an MPS bond dimension of exactly 22 there.

Sign in on the full site to ask questions and join the discussion.