= Solution
{c}
Track the $-i$ factors only when the corresponding transition is addressed. They are common within the addressed two-state subspace, but become physically relevant relative <phases> between computational <basis> states. Using a semicolon to separate the shared motional <number state>, the complete paths are
$$
\begin{aligned}
|gg;0\rangle&\longrightarrow|gg;0\rangle\longrightarrow|gg;0\rangle\longrightarrow|gg;0\rangle,\\
|ge;0\rangle&\longrightarrow|ge;0\rangle\longrightarrow|ge;0\rangle\longrightarrow|ge;0\rangle,\\
|eg;0\rangle&\longrightarrow-i|gg;1\rangle\longrightarrow-i|gg;1\rangle\longrightarrow-|eg;0\rangle,\\
|ee;0\rangle&\longrightarrow-i|ge;1\rangle\longrightarrow+i|ge;1\rangle\longrightarrow|ee;0\rangle.
\end{aligned}
$$
The middle arrow comprises both Y pulses. In the last row those individual steps are $-i|ge;1\rangle\to-|gf;0\rangle\to+i|ge;1\rangle$. The two X pulses contribute $(-i)^2=-1$ for either initially excited control; the Y pair supplies a second minus sign only when the second ion is also excited.
The shared motion returns to its <ground state> for all four inputs, and the auxiliary internal state is empty. <Quantum superposition> therefore gives the <two-qubit gate>
$$
\boxed{G=\operatorname{diag}(1,1,-1,1)=Z_a C_Z,\qquad
C_Z=\operatorname{diag}(1,1,1,-1).}
$$
Discarding the X-pulse factors would incorrectly identify $G$ with a <Controlled-Z gate> itself.
Back to article page