Checkpoint: Work with Density Matrices
This checkpoint chains together the whole module: build a joint density matrix, take a partial trace, and read off both a purity and an expectation value from the reduced state.
What you are computing
Start from the partially entangled pure state
Its joint density matrix is . Tracing out the second qubit gives a diagonal reduced state — the squared Schmidt coefficients on the diagonal:
From you extract two numbers seen throughout the module:
Checks to keep you honest
- The reduced state is mixed because the original is entangled, so the purity must be strictly below 1 (and above ).
- Because is diagonal, is simply the difference of its diagonal entries — here .
- If you accidentally forget to trace out and instead compute the purity of the full , you will get exactly (the joint state is pure) — a useful sanity check that you traced correctly.
Try it
Carry out all three steps — build , trace out , then compute the purity and of — and return their sum .
Run your code to see the quantum state.
Sign in on the full site to ask questions and join the discussion.