# How do physical implementations of Z gate selectively affect $\lvert1\rangle$ basis vector?

The Pauli Z gate inverts the phase of $$\lvert1\rangle$$ while leaving $$\lvert0\rangle$$ unaffected.

When I think about how $$\lvert1\rangle$$ and $$\lvert0\rangle$$ are physically realized, however, as in the Physical Implementations section here, there tends to be a physical symmetry between the physical realizations of the two.

It would seem, then, that a Z gate would need to be realized as some experiment which selectively delays the tuning of only spin-up electrons or nuclei, for example. Given the physical symmetry I expect between physical realizations of $$\lvert1\rangle$$ and $$\lvert0\rangle$$, this seems counterintuitive.

Is the fact that a physical $$\lvert0\rangle$$ cannot have phase delay, and a physical $$\lvert1\rangle$$ can, a matter of convention? If not, why can't I describe a single $$\lvert0\rangle$$ in a multi-qubit system as phase delayed relative to the others? E.g., $$(I \otimes Z)\lvert10\rangle$$ seems to be a perfectly reasonable experiment that delays my right qubit relative to my left, why is only the converse experiment allowed?

Is it, in fact, the case that the $$Z$$ gate is implemented as an experiment that only affects, e.g., spin-up nuclei but not spin-down nuclei? As background, I'd find an overview of how phase is physically implemented very helpful.

You're exactly right about the physical symmetry of $$|0\rangle$$ and $$|1\rangle$$. If I handed you a spin-1/2 particle in complete vacuum, the question of whether its in $$|0\rangle$$ or $$|1\rangle$$ is meaningless without a preferred coordinate system. So there needs to be some physically preferred direction to even set up computation.

Now say I have the ability to turn on an external magnetic field $$\vec{B}$$. When its turned on, its direction automatically sets a preferred coordinate system, and $$|0\rangle$$ and $$|1\rangle$$ are now defined as alignments of spins parallel or antiparallel to the field. Physically, this is because a spin-1/2 particle with some dipole moment $$\vec{\mu}$$ interacts with the field $$\vec{B}$$ according to the Hamiltonian

$$H = - \vec{\mu} \cdot \vec{B}$$

which really just tells us how much energy our particles will have in the external field. Then, we'll choose a convention that $$|0\rangle$$ is the low-energy state (say $$E_0=0$$ for simplicity) and we're ready to compute!

In this case a Z-gate would just be flipping on the external field for some known time $$\tau$$, which corresponds to a time-evolution of $$e^{-i H \tau/\hbar}$$. This has the effect:

\begin{align} |0\rangle &\rightarrow |0\rangle \\ |1\rangle &\rightarrow -|1\rangle \end{align}

Not only does this describe spin qubits, but also simple superconducting qubits like charge qubits. Charge qubits were originally called "Cooper Pair Box" because they work by trapping a cooper pair (of charge $$2e$$) on a superconducting island separated from the grounded material by some distance. In a toy geometry, we'll say this distance is $$x$$, so that the trapped CP creates an electric dipole $$|\vec{d}| = 2ex$$. Now just add an external field to interact with this dipole and you're ready to apply quantum gates.