The Phase-Flip Channel
Real quantum hardware is never perfectly isolated. The environment continuously disturbs qubit phases, a process called dephasing. The phase-flip channel is the simplest mathematical model of this effect.
Kraus operators and the phase-flip channel
A quantum channel is a completely positive, trace-preserving (CPTP) map. One natural representation uses Kraus operators , which satisfy . The action on a density matrix is
For the phase-flip channel with error probability the two Kraus operators are
Substituting and expanding gives
With probability nothing happens; with probability the qubit suffers a error (a phase flip). You can verify the trace-preservation condition directly: .
What does a Z error do?
The gate is diagonal in the computational basis:
It leaves unchanged and maps . For a general state the result is . There is no change to measurement probabilities in the basis, but the relative phase between and flips sign.
This is catastrophic for a qubit stored in the basis. The equal-superposition state
becomes
The two states and are orthogonal — they are perfectly distinguishable in the basis, so a single phase flip is detectable and correctable in principle.
Dephasing destroys off-diagonal coherence
Working in the density-matrix picture makes the destruction of coherence explicit. Write the pure state in matrix form:
Applying the channel with arbitrary :
The diagonal entries (populations) are unchanged, but the off-diagonal entries (coherences) are multiplied by . At the coherences vanish entirely and the qubit is maximally mixed, . This is the hallmark of decoherence: the system retains its energy but loses all quantum superposition.
Connection to real hardware
On a physical device dephasing accumulates continuously. The characteristic timescale is (or its Ramsey counterpart ). In the discrete model studied here, increases with the time a qubit spends idle. Keeping gate sequences short — or encoding information in decoherence-free subspaces — is the standard mitigation strategy.
Try it
The exercise below asks you to simulate a single phase-flip event acting on . Build the 1-qubit circuit that prepares and then applies the error, leaving the qubit in . The grader compares the full statevector, so the order matters.
After running your circuit, inspect the statevector: the amplitude of should be and the amplitude of should be , confirming the phase flip.
Sign in on the full site to ask questions and join the discussion.