and polarization qubits of Alice’s photon, rotating the resulting polarization qubit (with the HWP in Fig. 6) to the $|T_{\rm in}\rangle$ state, and then using another SWAP to switch this state into the momentum qubit. This procedure leaves Alice’s BB84 polarization state unaffected, although her photon, which will ultimately propagate on to Bob, is no longer in a single spatial mode. Eve completes the first stage of her attack by sending Alice’s photon through a P-CNOT gate, which will accomplish the state transformations given in Eqs. (\[Hin\_out\])–(\[minus\_in\_out\]), and then routing it to Bob. If Bob employs active basis selection (Fig. 6), then in each bit interval he will use an electro-optic modulator—as a controllable HWP—plus a polarizing beam splitter to set the randomly-selected polarization basis for his measurement. The functioning of this basis-selection setup is unaffected by Alice’s photon no longer being in a single spatial mode. The reason that we call Fig. 6 a physical simulation, rather than a true attack, lies in the measurement box. Here, Eve has invaded Bob’s turf, and inserted SWAP gates, half-wave plates, polarizing beam splitters, and additional photodetectors, so that she can forward to Bob measurement results corresponding to photon counting on the 