Solution (source code)

= Solution

In a small <trapped-ion quantum computer>, use two long-lived internal states of each <ion>, for example a pair of <hyperfine structure>[hyperfine] ground states or a narrow optical transition, as $|0\rangle,|1\rangle$. Electric trapping fields confine a short <ion> string, <laser cooling> reduces its motion, and <optical pumping> initializes the internal states. State-dependent <fluorescence> supplies readout: one <qubit> level participates in a bright cycling transition and the other is dark.

A resonant microwave, Raman or optical drive performs a single-qubit <Rabi oscillation>[Rabi rotation]. The drive phase fixes a rotation axis in the Bloch equatorial plane and its pulse area fixes the angle; detuning or phase-frame control supplies Z rotations. Individual spatial or <frequency> addressing selects the intended <ion>.

For a two-qubit gate, couple internal states to shared quantized vibrational modes. Resolved <motional sidebands> let one <ion>'s spin influence the collective oscillator and then the second <ion>'s spin. For example, bichromatic red- and blue-sideband drives produce a spin-dependent force; a closed motional phase-space trajectory returns the oscillator to its initial state while accumulating an <quantum entanglement>[entangling] interaction proportional to $X_iX_j$. Together with single-qubit rotations this implements a <CNOT gate>[CNOT]. The short chain has well-separated <normal mode>[normal-mode frequencies], and <resolved sideband cooling>[sideband cooling] and the <Lamb-Dicke regime> suppress unwanted motion and make coherent bus control practical.