Dual-rail encoding names a qubit by which physical path carries the photon. In this toy ledger, logical zero means one count in the upper rail and none in the lower rail, while logical one reverses those counts. Real optical qubits also require checks for photon loss, path alignment, detector efficiency, dark counts, and finite-count uncertainty.
An optical qubit basis can be taught as a checked upper-versus-lower rail label. Exact arithmetic here means exact results for the stated model inputs; measured inputs still carry uncertainty and significant-figure limits.
highlighted = computed this step
Logical zero occupies the upper rail
The basis binding for logical zero is upper count 1 and lower count 0.
∣0⟩rail:Nupper=1
Logical one occupies the lower rail
The basis binding for logical one is upper count 0 and lower count 1.