text:
# Method for implementation of universal quantum logic gates in a scalable Ising spin quantum computer

## I Introduction

Current proposals on a scalable solid-state spin quantum computer can be roughly divided into two main streams. The first one relies on a controllable interaction between the electron spins (see, for example, 1 ; 2 ). In such proposals a point contact gate switches interaction between the neighboring qubits. It was shown, in particular, that the switchable Heisenberg interaction alone can provide the universal quantum computation. The main advantage of the controllable interaction proposals is the high clock speed in the GHz range. The main technical challenge in such proposals is the precise control of the interaction. It was estimated that the interaction constant must be controllable with the accuracy $`10^4`$. Also the time of turning on (off) the interaction must be about 10-100 fs. The other challenge is a possible decoherence caused by the point contact.

The second stream relies on the permanent interaction between spins (see, for example 3 ; 3a ). In such proposals electromagnetic pulses provide implementation of quantum computation. The main advantage of these proposals is the use of well developed technique of electromagnetic pulses, and the absence of the electro-static gates. The main technical challenge for these proposals is the creation of a large gradient of the magnetic field. The other challenge is the decoherence caused by the sources of the magnetic field. The latest development of the micropattern wires technique provides the magnetic field gradients $`10^510^6`$ T/m 4 ; 5 . Even greater gradients $`10^7`$ T/m are expected if the micropattern wires will be replaced by the ferromagnetic plates 6 . This development provides new ground for the electromagnetic pulse proposals. The field gradient $`10^6`$ T/m corresponds to the magnetic field difference $`0.03`$ T for the distance 30 nm. In turn, the difference between the electron spin resonance (ESR) frequencies $`\mathrm{\Delta }\omega /2\pi `$ for this distance will be 840 MHz.

For the electromagnetic pulse proposals the most convenient interaction between qubits is, definitely, the Ising interaction 6a ; 6b . Normally, the Ising interaction is considered as non-typical for solids. However, if the frequency difference between the neighboring spins is greater than the spin-spin interaction, the spin-spin interaction (Heisenberg or dipole-dipole) becomes effectively the Ising interaction. This effect is well-known in liquid nuclear magnetic resonance (NMR) where the scalar coupling, which is equivalent to the Heisenberg interaction, becomes the Ising interaction due to the chemical shift of the NMR frequencies 7 ; 8 . The same effect takes place for the heteronuclear dipole-dipole interaction in solids. We should note, that the long-range dipole-dipole interaction in a spin chain can be effectively suppressed if the angle between the chain and the external magnetic field equals to the magic angle 7 ; 9 .

We believe that the large field gradients provide the resurgence of the interest to the Ising spin quantum computer. If the interaction between the neighboring paramagnetic spins is of the order of 10MHz and the ESR frequency difference is $`\mathrm{\Delta }\omega /2\pi =840`$ MHz, the spin-spin interaction becomes effectively the Ising interaction. As an example, we consider phosphorus impurity donors in silicon. In the first approximation, the exchange interaction constant for the donor electrons separated by the distance $`r`$ is given by Kane

$$J(r)=0.8\frac{e^2}{ϵa_0}\left(\frac{r}{a}_0\right)^{5/2}\mathrm{exp}(2r/a_0).$$

Here $`ϵ`$ is the dielectric constant of silicon, $`a_0`$ is the effective radius of the impurity atom, and $`e`$ is the electron charge. Taking $`ϵ=12`$, $`a_0=3`$ nm, and $`r=30`$ nm, we obtain $`J=5`$ MHz.

Currently, there are three main approaches for implementation of quantum logic gates using the electromagnetic pulses. The first approach is developed in experiments with liquid state NMR quantum computer (see, for, example, 7 ). To provide the conditional logic this approach takes advantage of the spin-spin interaction during the time-interval between the electromagnetic pulses. Thus, the Rabi frequency $`\mathrm{\Omega }`$ of the pulses \[$`\mathrm{\Omega }=\gamma B_1`$, where $`\gamma `$ is the gyromagnetic ratio and $`B_1`$ is the amplitude of the radio frequency (rf) field\] is much greater than the Ising interaction constant $`J`$, but the clock speed of the gate is $`J`$.

The second approach is intended to increase the clock speed by application of more powerful strongly modulated pulses which average to zero all undesired interactions between spins but drive the desired quantum transitions. The first experiments indicate the almost tenfold increase of the clock speed 10 .

The third approach is based on the application of the selective electromagnetic pulses with the Rabi frequency $`\mathrm{\Omega }<J`$ (see, for example, 9 ; BI1 ; BI2 ). These pulses drive a resonant spin depending on the states of its neighbors. The clock speed in this approach is determined by the Rabi frequency, $`\mathrm{\Omega }`$. While the third approach has a clear disadvantage in the clock speed, its advantage is the small power of the pulses: for a given angle of the spin rotation the power of the pulse is inversely proportional to its duration. The small power of the pulses is not important for the room temperature NMR quantum computer but can be important for a scalable solid-state quantum computer, which is expected to operate at low temperature. Besides, the powerful pulses can contribute to the decoherence rate.

Based on the above remarks, we believe that the development of the theoretical background for the quantum logic gate implementation using the selective electromagnetic pulses in the Ising spin quantum computer is an important task. In this paper, we present a scheme for implementation of universal quantum gates on an arbitrary superposition of quantum states in the Ising spin quantum computer.

The paper is organized as follows. The general problem to be solved is formulated in Sec. II. The Ising spin quantum computer model is described in Sec. III. The probability errors are minimized in Secs. IV and V. The phase errors are minimized in Secs. VI and VII. The universal gates are tested numerically in Sec. VIII by the exact numerical modeling of quantum dynamics of the system. In Sec. IX we summarize our results.

## II Formulation of the problem

The most important quantum algorithms exploit the property of quantum interference. In the result of implementation of these algorithms a small amount of “useful” states is amplified while all other states are suppressed. Hence, in order to implement a quantum logic a strict control over both moduli and phases of the amplitudes in superposition of states in the register of a quantum computer is necessary. For example, the quantum Control-Not (CN) gate CNi,k transforms a superpositional wave function as

$$\mathrm{CN}_{i,k}^{\mathrm{ideal}}\underset{j=0}{\overset{2^L1}{}}B_j|n_{L1}\mathrm{}n_i\mathrm{}n_k\mathrm{}n_0=\underset{j=0}{\overset{2^L1}{}}B_j|n_{L1}\mathrm{}n_i\mathrm{}n_in_k\mathrm{}n_0,$$
(1)
where $``$ means sum modulo 2, $`n_m=0,1`$, and $`L`$ is the number of qubits. The CN gate for remote qubits can be implemented using a series of CN gates for the neighboring qubits, CNi+1,i or CNi,i+1. (See Sec. VIII of this paper or, for example, Ref. perturbation .) Moreover, any quantum logic operation between remote qubits can be divided into elementary logic gates between neighboring qubits. Hence, in order to implement the universal quantum logic, it is sufficient to construct only the universal quantum gates between adjacent qubits.

Usually, in real quantum systems, instead of Eq. (1) one has

$$\mathrm{CN}_{i,k}^{\mathrm{real}}\underset{j=0}{\overset{2^L1}{}}B_j|n_{L1}\mathrm{}n_i\mathrm{}n_k\mathrm{}n_0=\underset{j=0}{\overset{2^L1}{}}B_{}^{}{}_{j}{}^{}|n_{L1}\mathrm{}n_i\mathrm{}n_in_k\mathrm{}n_0,$$
(2)
where the coefficients $`B_{}^{}{}_{j}{}^{}`$ in the right-hand side of Eq. (2) are slightly different from the coefficients $`B_j`$ in the right-hand side of Eq. (1). This introduces the error in the quantum algorithm. A source of the error can be external, like noise, or internal, like unwanted transitions driven by pulses of a protocol.

In this paper, we will consider only the latter errors. We will present protocols for implementation of basic quantum logic operations between the neighboring qubits which work for an arbitrary superposition of states in the Ising spin quantum computer. We use these operations to implement the CN gate between the end qubits, CN0,L-1 of the spin chain, and estimate the phase and probability errors.

## III Ising spin quantum computer

The simplest Hamiltonian for the Ising spin chain placed in an external magnetic field can be represented as

$$H_n=\underset{k=0}{\overset{L1}{}}\omega _kI_k^z2J\underset{k=0}{\overset{L2}{}}I_k^zI_{k+1}^z\frac{\mathrm{\Omega }_n}{2}\underset{k=0}{\overset{L1}{}}\{I_k^{}\mathrm{exp}[i(\nu _nt+\phi _n)]+h.c.\}=H_0+V_n(t).$$
(3)
Here $`\mathrm{}=1`$, $`I_k^z`$ is the operator of the $`z`$ component of $`k`$th spin $`1/2`$, $`I_k^\pm =I_k^x\pm I_k^y`$, $`\omega _k`$ is the Larmor frequency of the $`k`$th spin, $`J`$ is the interaction constant between the neighboring spins, $`\mathrm{\Omega }_n`$ is the Rabi frequency (frequency of precession around the resonant transversal field in the rotating frame), $`\nu _n`$ is the frequency of the pulse, and $`\phi _n`$ is the phase constant of the $`n`$th pulse, below called “phase”. The Hamiltonian (3) is written for one $`n`$th rectangular rf pulse. Below we omit the index $`n`$ which indicates the pulse number.

In the interaction representation, the solution of the Schrödinger equation can be written in the form

$$\mathrm{\Psi }(t)=\underset{p}{}C_p(t)|p\mathrm{exp}(iE_pt),$$
(4)
where $`E_p`$ and $`|p`$ are, respectively, the eigenvalues and eigenfunctions of the Hamiltonian $`H_0`$.

Under the condition $`\mathrm{\Omega }<J\omega `$ the pulse effectively affects only one $`k`$th spin in the chain perturbation  whose frequency $`\omega _k`$ is close (near-resonant transition) or equal (resonant transition) to the frequency of the pulse, $`\nu `$. In this approximation, the system of coupled differential equations for the coefficients $`C_p(t)`$ splits into $`2^{L1}`$ independent groups. Each group consists of two equations of the form

$$i\dot{C}_p=(\mathrm{\Omega }/2)\mathrm{exp}[i(\mathrm{\Delta }_{pm}t\phi )]C_m,$$
(5)
$$i\dot{C}_m=(\mathrm{\Omega }/2)\mathrm{exp}[i(\mathrm{\Delta }_{pm}t\phi )]C_p,$$

where the states $`|m`$ and $`|p`$ are related by the flip of $`k`$th spin, $`\mathrm{\Delta }_{pm}=E_pE_m\nu `$, and we suppose that $`E_p>E_m`$. The solution of Eq. (5) is

$$C_m(t_0+\tau )=\left[\mathrm{cos}(\lambda _{pm}\tau /2)+i(\mathrm{\Delta }_{pm}/\lambda )\mathrm{sin}(\lambda _{pm}\tau /2)\right]\times \mathrm{exp}[i\tau \mathrm{\Delta }_{pm}/2],$$
(6)
$$C_p(t_0+\tau )=i(\mathrm{\Omega }/\lambda _{pm})\mathrm{sin}(\lambda _{pm}\tau /2)\times \mathrm{exp}[it_0\mathrm{\Delta }_{pm}+i(\tau \mathrm{\Delta }_{pm}/2\phi )].$$

Here $`t_0`$ is the time of the beginning of the pulse, $`\lambda _{pm}=\sqrt{\mathrm{\Delta }_{pm}^2+\mathrm{\Omega }^2}`$, $`\tau `$ is the duration of the pulse, and the initial conditions are

$$C_m(t_0)=1,C_p(t_0)=0.$$

The solution for the transition from the upper state to the lower state is

$$C_m(t_0+\tau )=i(\mathrm{\Omega }/\lambda _{pm})\mathrm{sin}(\lambda _{pm}\tau /2)\times \mathrm{exp}[it_0\mathrm{\Delta }_{pm}i(\tau \mathrm{\Delta }_{pm}/2\phi )],$$

$$C_p(t_0+\tau )=\left[\mathrm{cos}(\lambda _{pm}\tau /2)i(\mathrm{\Delta }_{pm}/\lambda )\mathrm{sin}(\lambda _{pm}\tau /2)\right]\times \mathrm{exp}[i\tau \mathrm{\Delta }_{pm}/2],$$
(7)
$$C_m(t_0)=0,C_p(t_0)=1.$$

In the table below we present all states and their energies for the spin chain of three qubits with the Larmor frequencies $`\omega _0=w`$, $`\omega _1=w+\delta \omega `$, $`\omega _2=w+2\delta \omega `$ ($`w`$ is the Larmor frequency of the zeroth qubit) and with the Ising interaction constant between the neighboring qubits $`J`$,

$$\begin{array}{cccc}|0=|0_20_10_0,\hfill & E_0=\frac{3}{2}w\frac{3}{2}\delta \omega J,\hfill & |1=|001,\hfill & E_1=\frac{1}{2}w\frac{3}{2}\delta \omega ,\hfill \\ |2=|010,\hfill & E_2=\frac{1}{2}w\frac{1}{2}\delta \omega +J,\hfill & |3=|011,\hfill & E_3=\frac{1}{2}w\frac{1}{2}\delta \omega ,\hfill \\ |4=|100,\hfill & E_4=\frac{1}{2}w+\frac{1}{2}\delta \omega \hfill & |5=|101,\hfill & E_5=\frac{1}{2}w+\frac{1}{2}\delta \omega +J,\hfill \\ |6=|110,\hfill & E_6=\frac{1}{2}w+\frac{3}{2}\delta \omega \hfill & |7=|111,\hfill & E_7=\frac{3}{2}w+\frac{3}{2}\delta \omega J.\hfill \end{array}$$
(8)
We will use this table for illustrative examples in the following sections.

## IV The $`2\pi k`$-method

Suppose, for example, that before the action of the pulse we have the superposition of states $`|0`$ and $`|4`$ in Eq. (8). In order to organize, for example, the transition $`|4|6`$, associated with the flip of the first (middle) spin, we apply the $`\pi `$ pulse \[$`\mathrm{\Omega }\tau =\pi `$ in Eq. (6)\] with the resonant frequency $`\nu =E_6E_4=w+\delta \omega `$. We also have the near-resonant transition (or transition with small detuning from the exact resonance condition) $`|0|2`$ with the detuning $`\mathrm{\Delta }_{2,0}=E_2E_0\nu =2J`$ which creates the unwanted state with the probability \[see Eq. (6)\]

$$P_{2,0}=\left[\frac{\mathrm{\Omega }}{\lambda _{2,0}}\mathrm{sin}\left(\frac{\lambda _{2,0}\pi }{2\mathrm{\Omega }}\right)\right]^2,$$
(9)
where $`\lambda _{2,0}=\sqrt{\mathrm{\Delta }_{2,0}^2+\mathrm{\Omega }^2}=\sqrt{4J^2+\mathrm{\Omega }^2}`$. In order to suppress this transition we take the Rabi frequency in the form

$$\mathrm{\Omega }_k=\frac{2J}{\sqrt{4k^21}},k=1,2,\mathrm{}.$$
(10)
(See the $`2\pi k`$ method in Ref. 9 .) Then the argument of sinus in Eq. (9) turns to zero, and the unwanted near-resonant transition $`|0|2`$ is completely suppressed.

## V Generalized $`2\pi k`$ method

Next, we will show that one cannot suppress all possible near-resonant transitions using only one pulse. Since detunings for different transitions are different, one $`\pi `$ pulse in general case creates a relatively large error. In this section, we will demonstrate how to compensate this error using additional correcting pulse. This procedure can be characterized as a generalized $`2\pi k`$ method since this protocol suppresses all near-resonant transitions for all quantum states in a superposition.

Suppose that we have three quantum states, $`|0`$, $`|4`$, and $`|5`$ in a register of a quantum computer. Using the resonant pulse we produce the resonant transition $`|0|2`$ by flipping the first qubit. We also have two near-resonant transitions: $`|4|6`$ with the detuning $`\mathrm{\Delta }_{6,4}=2J`$ and $`|5|7`$ with $`\mathrm{\Delta }_{7,5}=4J`$. In order to suppress both transitions the Rabi frequency $`\mathrm{\Omega }`$ should satisfy the system of two equations

$$\left|\frac{\mathrm{\Delta }_{6,4}}{\mathrm{\Omega }}\right|=\sqrt{4k^21},\left|\frac{\mathrm{\Delta }_{7,5}}{\mathrm{\Omega }}\right|=\sqrt{4K^21},$$

where $`k`$ and $`K`$ must be integer numbers. Dividing the second equation over the first one and taking into consideration that $`|\mathrm{\Delta }_{7,5}/\mathrm{\Delta }_{6,4}|=2`$ we obtain the relation $`K^2=4k^23/4`$. From this equation one can see that if $`k`$ is integer then $`K`$ cannot be an integer number. Hence, if we suppress, for example, the transition $`|4|6`$, then we get an error for the transition $`|5|7`$, and vice versa.

To proceed, we introduce the following notations. The pulse $`P_i^{00}`$ indicates the $`\pi `$ pulse with the frequency $`\nu _i^{00}`$ which is resonant for the transition associated with the flip of $`i`$th spin when both its neighbors are in the states $`|0`$. In a similar way, we define the pulses $`P_i^{10}`$ and $`P_i^{11}`$. The pulse $`P_1^{00}`$ will be resonant, for example, for the transitions $`|0|2`$ and $`|2|0`$ \[see Eq. (8)\]. We define $`T_i^{00}`$ as the transition (not necessarily resonant) associated with the flip of $`i`$th spin when both its neighbors are in the states $`|0`$. For example, the pulse $`P_1^{00}`$ gives rise to the resonant transitions $`T_1^{00}`$ and two types of the near-resonant transitions, $`T_1^{10}`$ and $`T_1^{11}`$. In general case of an arbitrary number of qubits, one notation, for example, $`T_i^{00}`$, means the transitions for all quantum states with the identical groups $`|\mathrm{}0_{i+1}0_i0_{i1}\mathrm{}`$ and $`|\mathrm{}0_{i+1}1_i0_{i1}\mathrm{}`$. So, now we discuss the types of transitions, but not the transitions between definite states. We should note that $`\nu _i^{10}=\nu _i^{01}`$, so that we use the same notation, $`P_i^{10}`$, for the pulses $`P_i^{10}`$ and $`P_i^{01}`$.

Now we continue the discussion on the $`2\pi k`$ method. All near-resonant transitions $`T_i^{00}`$ and $`T_i^{11}`$, caused by the pulse $`P_i^{10}`$, can be suppressed using only one pulse, since the moduli of detunings are the same and equal to $`\mathrm{\Delta }2J`$. In this case, we take

$$\frac{\mathrm{\Delta }}{\mathrm{\Omega }_1}=\sqrt{4k^21},$$
(11)
where $`k`$ is the integer number.

As was shown above, pulses $`P_i^{00}`$ and $`P_i^{11}`$ generate errors because the detunings for transitions $`T_i^{00}`$, $`T_i^{10}`$ and $`T_i^{11}`$ are different. To correct this error, we suppress the unwanted transition $`T_i^{11}`$ for the pulse $`P_i^{00}`$ and the unwanted transition $`T_i^{00}`$ for the pulse $`P_i^{11}`$ with the moduli of detunings $`\mathrm{\Delta }_22\mathrm{\Delta }=4J`$ by the $`2\pi k`$ method with the Rabi frequency $`\mathrm{\Omega }_2`$ satisfying the expression

$$\left|\frac{\mathrm{\Delta }_2}{\mathrm{\Omega }_2}\right|=\sqrt{4k_2^21}.$$
(12)
Below we take $`k_2=k`$ and $`\mathrm{\Omega }_2=2\mathrm{\Omega }`$, $`\mathrm{\Omega }_1=\mathrm{\Omega }`$, where $`\mathrm{\Omega }`$ is a parameter. Thus, we choose the value of the Rabi frequency for the pulses $`P_i^{11}`$ and $`P_i^{00}`$ twice larger than the value of the Rabi frequency for the pulse $`P_i^{10}`$.

The pulses $`P_i^{00}`$ and $`P_i^{11}`$ with the parameters (12) generate errors in the result of the transitions $`T_i^{10}`$. In Appendix A, we demonstrate that the additional pulse with the frequency $`\nu _i^{10}`$ can be used to correct this error. The real and imaginary parts of the amplitude of the created unwanted state are corrected by the proper choice of the duration and the phase of the correcting pulse. The correcting pulse does not generate errors since the moduli of detunings for unwanted transitions, $`T_i^{00}`$ and $`T_i^{11}`$, are the same, so that these transitions can be suppressed simultaneously.

## VI Unwanted phases

In spite of the fact that all pulses described above are probability-corrected, they generate unwanted phases which should also be compensated by the protocol. In this section, we calculate all unwanted phases which appear in the quantum computer in the result of action of the rf pulses.

Even in the case when all unwanted near-resonant transitions are suppressed, the unwanted phases appear because for definite transitions $`\mathrm{\Delta }_{pm}0`$ in Eqs. (6) and (7). The problem to compensate those phases becomes complicated, since each pulse generates different phases for different states. In this section we will show that the unwanted phases can be compensated by choosing the proper phases of the pulses of the protocol. Each logic operation requires its own set of phases of the pulses. However, if one has a set of phase-compensated universal gates, introduced below, one can realize a quantum logic using these gates as building blocks.

Further analysis is conducted in terms of the probability-corrected pulses, $`Q_i^{mn}(\phi )`$, where $`m,n=0,1,`$ $`i=0,1,\mathrm{}L1`$, and $`\phi `$ is the phase of the pulse. The pulse $`Q_i^{10}(\phi )`$ indicates one $`\pi `$ pulse. It coincides with the pulse $`P_i^{10}`$, introduced above. The combined probability-corrected pulse, $`Q_i^{00}(\phi )`$ \[or $`Q_i^{11}(\phi )`$\], consists of one $`\pi `$ pulse $`P_i^{00}`$, ($`P_i^{11}`$), and one correcting pulse. The correcting pulse does not implement quantum logic, it only removes unwanted states from the register of quantum computer.

In the Table I we present the phases (see Appendix B) acquired by different states (which can be in a superposition in a register of quantum computer) generated in the result of the different kinds of the probability-corrected pulses, $`Q_i^{mn}(\phi )`$.

## VII Phase and probability-corrected universal gates

In the Ising spin quantum computer the parameters which allow one to compensate the unwanted phases are the phases of the rf pulses. From Eq. (6) one can see that the phase $`\phi `$ of the pulse changes the phase of the wave function. In this section we provide the phase and probability correct protocols for realization of universal quantum gates on arbitrary superposition of states in the Ising spin scalable quantum computer.

Our task is to construct phase-corrected quantum gates from the elementary probability-corrected three-qubit elementary gates, $`Q_i^{mn}(\phi )`$, $`m,n=0,1`$, $`i=0,1,\mathrm{},L1`$. These gates act on the target qubit $`q_i`$, for given configurations of its nearest neighbors, $`q_{i1}`$ and $`q_{i+1}`$. We thus define the operations $`Q_i^{mn}(\phi )`$ in terms of their effects on the states, $`|\mathrm{}q_{i+1}q_iq_{i1}\mathrm{}`$ as

* for $`Q_i^{01}(\phi )Q_i^{10}(\phi )`$,

$`|\mathrm{}0_{i+1}q_i0_{i1}\mathrm{}\mathrm{exp}i[(1)^{q_i}(\theta )]|0_{i+1}q_i0_{i1}\mathrm{},`$ (13)
$`|\mathrm{}0_{i+1}q_i1_{i1}\mathrm{}\mathrm{exp}i\left[\pi /2+(1)^{q_i}(\phi )\right]|\mathrm{}0_{i+1}\overline{q_i}1_{i1}\mathrm{},`$
$`|\mathrm{}1_{i+1}q_i0_{i1}\mathrm{}\mathrm{exp}i\left[\pi /2+(1)^{q_i}(\phi )\right]|\mathrm{}1_{i+1}\overline{q_i}0_{i1}\mathrm{},`$
$`|\mathrm{}1_{i+1}q_i1_{i1}\mathrm{}\mathrm{exp}i[(1)^{q_i}(\theta )]|\mathrm{}1_{i+1}q_i1_{i1}\mathrm{},`$
* for $`Q_i^{00}(\phi )`$,

$`|\mathrm{}0_{i+1}q_i0_{i1}\mathrm{}\mathrm{exp}i\left[\pi /2+(1)^{q_i}(\phi +\gamma )\right]|\mathrm{}0_{i+1}\overline{q_i}0_{i1}\mathrm{},`$ (14)
$`|\mathrm{}0_{i+1}q_i1_{i1}\mathrm{}\mathrm{exp}i\left[\pi +(1)^{q_i}(\theta /2+\mathrm{\Theta })\right]|\mathrm{}0_{i+1}q_i1_{i1},`$
$`|\mathrm{}1_{i+1}q_i0_{i1}\mathrm{}\mathrm{exp}i\left[\pi +(1)^{q_i}(\theta /2+\mathrm{\Theta })\right]|\mathrm{}1_{i+1}q_i0_{i1}\mathrm{},`$
$`|\mathrm{}1_{i+1}q_i1_{i1}\mathrm{}\mathrm{exp}i\left[(1)^{q_i}(\theta +\gamma )\right]|\mathrm{}0_{i+1}q_i0_{i1}\mathrm{},`$
* for $`Q_i^{11}(\phi )`$,

$`|\mathrm{}0_{i+1}q_i0_{i1}\mathrm{}\mathrm{exp}i\left[(1)^{q_i}(\theta \gamma )\right]|\mathrm{}0_{i+1}q_i0_{i1}\mathrm{},`$ (15)
$`|\mathrm{}0_{i+1}q_i1_{i1}\mathrm{}\mathrm{exp}i\left[\pi +(1)^{q_i}(\theta /2\mathrm{\Theta })\right]|\mathrm{}0_{i+1}q_i1_{i1}\mathrm{},`$
$`|\mathrm{}1_{i+1}q_i0_{i1}\mathrm{}\mathrm{exp}i\left[\pi +(1)^{q_i}(\theta /2\mathrm{\Theta })\right]|\mathrm{}1_{i+1}q_i0_{i1}\mathrm{},`$
$`|\mathrm{}1_{i+1}q_i1_{i1}\mathrm{}\mathrm{exp}i\left[\pi /2+(1)^{q_i}(\phi \gamma )\right]|\mathrm{}1_{i+1}\overline{q_i}1_{i1}\mathrm{}.`$

One can see that each $`Q_i^{mn}`$ pulse introduces three different kinds of phases into different states. These phases arise from different types of resonant and near-resonant transitions initiated by the pulses.

### VII.1 Not gate

Each pulse has one externally controllable phase, $`\phi `$, which can influence different subsets of states. Using combinations of three pulses on qubit $`i`$, one can introduce at most three independent phases to correct different unwanted phases generated for different states in the register of a quantum computer.

For the Not gate, the correct transformation for the amplitudes of the states can be implemented by the sequence $`Q_i^{11}(\phi _3)Q_i^{01}(\phi _2)Q_i^{00}(\phi _1)`$. (The order of implementation of the operators is from the right to the left.) The transformation which results from this sequence of operations is,

$`|\mathrm{}0_{i+1}q_i0_{i1}\mathrm{}\mathrm{exp}i\left[\pi /2+(1)^{q_i}\left(\phi _1+2\gamma +2\theta \right)\right]|\mathrm{}0_{i+1}\overline{q_i}0_{i1}\mathrm{},`$ (16)
$`|\mathrm{}0_{i+1}q_i1_{i1}\mathrm{}\mathrm{exp}i\left[\pi /2+(1)^{q_i}(\phi _2+\theta +2\mathrm{\Theta })\right]|\mathrm{}0_{i+1}\overline{q_i}1_{i1}\mathrm{},`$
$`|\mathrm{}1_{i+1}q_i0_{i1}\mathrm{}\mathrm{exp}i\left[\pi /2+(1)^{q_i}(\phi _2+\theta +2\mathrm{\Theta })\right]|\mathrm{}1_{i+1}\overline{q_i}0_{i1}\mathrm{},`$
$`|\mathrm{}1_{i+1}q_i1_{i1}\mathrm{}\mathrm{exp}i\left[\pi /2+(1)^{q_i}\left(\phi _3+2\theta \right)\right]|\mathrm{}1_{i+1}\overline{q_i}1_{i1}\mathrm{}.`$
It is easy to see, that the implementation of the Not gate requires the following set of phases: $`\phi _1=2\gamma +2\theta `$, $`\phi _2=\theta +2\mathrm{\Theta }`$ and $`\phi _3=2\theta `$. The overall phase factor is equal to $`\pi /2`$.

### VII.2 Control-Not gate

For qubits with homogeneous coupling between them, the correct CNa,b gate, where $`a`$ is the number of the control qubit and $`b=a\pm 1`$ is the number of the target qubit, can be implemented by the following sequence,

$`\mathrm{CN}_{a,b}`$ $`=`$ $`Q_a^{11}(0)Q_a^{10}(0)Q_a^{00}(\phi _8)Q_b^{01}(0)Q_b^{01}(\phi _7)Q_b^{00}(\phi _6)`$ (17)
$`Q_a^{11}(\phi _5)Q_a^{10}(\phi _4)Q_a^{00}(\phi _3)Q_b^{01}(0)Q_b^{01}(\phi _2)Q_b^{11}(\phi _1),`$
where the phases $`\phi _n`$, are computed in Appendix C,

| $`\phi _1=5\theta 2\gamma `$, | $`\phi _2=\frac{5}{2}\theta \mathrm{\Theta }+\gamma `$, | $`\phi _3=\frac{3}{4}\pi +2\theta 4\mathrm{\Theta }+2\gamma `$, | $`\phi _4=\frac{3}{4}\pi `$, |
| --- | --- | --- | --- |
| $`\phi _5=\frac{3}{4}\pi `$, | $`\phi _6=2\mathrm{\Theta }`$, | $`\phi _7=\frac{5}{2}\theta +\mathrm{\Theta }\gamma `$, | $`\phi _8=2\theta 4\mathrm{\Theta }+2\gamma `$. |

In order to illustrate the action of the CN gate, in the Table II we show how each pulse of the gate CNi+1,i modifies the phase (initially equal to zero) of the state $`|\mathrm{}0_{i+2}1_{i+1}0_i0_{i1}\mathrm{}`$ due to the Table I. In a similar way, one can show that other states acquire the same phase $`\pi /4`$ after the action of the CN gate, while their phases in the middle of the CN gate protocol can be different.

### VII.3 Not and Control-Not gate on edge qubits

In order to make our set of elementary quantum logic operations complete, we also present the protocols for the logic gates on the edge qubits. The Not gate is implemented by the sequence of two pulses:

$$\mathrm{Not}_i=Q_i^1(\theta )Q_i^0(\theta ),$$
(18)
where $`i=0,L1`$. In Eq. (18) we suppose that the notation $`Q_i^m(\phi )`$, $`m=0,1`$, with one upper index means one $`\pi `$ pulse with the corresponding resonant frequency and the phase $`\phi `$. The overall phase for the gate (18) is $`\pi /2`$. The gate CNa,b with the edge target qubit $`b`$ $`(b=0\mathrm{or}L1)`$ is

$$\mathrm{CN}_{a,b}=Q_a^{11}(0)Q_a^{10}(0)Q_a^{00}(0)Q_a^{11}\left(\frac{1}{4}\pi \right)Q_a^{10}\left(\frac{1}{4}\pi \right)Q_a^{00}\left(\frac{1}{4}\pi \right)Q_b^0(0)Q_b^0(\theta )Q_b^1(2\theta ),$$
(19)
with the overall phase $`\frac{\pi }{4}`$. The gate CNa,b, with the edge control qubit $`a`$ $`(a=0\mathrm{or}L1)`$, is

$$\mathrm{CN}_{a,b}=Q_a^1(0)Q_a^0(0)Q_b^{10}(0)Q_b^{10}(0)Q_b^{00}(6\theta +2\mathrm{\Theta }2\gamma )Q_a^1(\frac{3}{4}\pi +\frac{5}{2}\theta \mathrm{\Theta }+\gamma )\times $$
(20)
$$Q_a^0\left(\frac{3}{4}\pi \frac{5}{2}\theta +\mathrm{\Theta }\gamma \right)Q_b^{10}(0)Q_b^{10}(5\theta 2\mathrm{\Theta }+2\gamma )Q_b^{11}\left(2\mathrm{\Theta }\right),$$

with the overall phase $`\frac{\pi }{4}`$.

### VII.4 A single qubit rotations around $`x`$ axis for an arbitrary angle

We denote the pulses for rotation of $`i`$th spin around $`x`$ axis for the angle $`\rho \pi /2`$ as $`Q_{i\rho }^{mn}(\phi )`$, $`m,n=0,1`$, $`i=1,\mathrm{},L2`$ for intermediate qubits, and $`Q_{i\rho }^m(\phi )`$, $`i=0,L1`$ for the edge qubits. Note that the case $`\rho =1`$ was analyzed before. From the $`2\pi k`$-condition for $`\mathrm{\Omega }_\rho `$ one obtains

$`\theta _\rho `$ $`=\pi \sqrt{k^2\rho ^2/4},`$ $`\alpha _\rho `$ $`={\displaystyle \frac{\pi }{2}}\sqrt{k^2+3\rho ^2/4},`$ (21)
$`\mathrm{tan}\mathrm{\Theta }_\rho `$ $`=2{\displaystyle \frac{\theta _\rho }{\alpha _\rho }}\mathrm{tan}\alpha _\rho ,`$ $`\mathrm{tan}\beta _\rho `$ $`={\displaystyle \frac{\pi }{2\alpha _\rho }}\mathrm{tan}\alpha _\rho \mathrm{cos}\mathrm{\Theta }_\rho `$ (22)
and

$$\gamma _\rho =\sqrt{(\pi k)^2(\pi +\beta _\rho )^2},$$
(23)
where we took the same integer value, $`k_\rho =k`$, as before. The pulse $`Q_{i\rho }^{10}(\phi )`$ is the single pulse with the Rabi frequency $`\mathrm{\Omega }_{1,\rho }=\mathrm{\Delta }\rho /\sqrt{4k^2\rho ^2}\mathrm{\Omega }_\rho `$, duration $`\tau _\rho =\rho \pi /\mathrm{\Omega }_\rho `$, frequency $`\nu _i^{10}`$, and phase $`\phi `$. Note, that the Rabi frequency, $`\mathrm{\Omega }_\rho `$, decreases with $`\rho `$ decreasing. The pulse $`Q_{i\rho }^{11}(\phi )`$ \[or $`Q_{i\rho }^{00}(\phi )`$\] is composed of the pulse with the Rabi frequency $`\mathrm{\Omega }_{2,\rho }=2\mathrm{\Omega }_\rho `$, duration $`\tau =\rho \pi /\mathrm{\Omega }_{2,\rho }`$, frequency $`\nu _i^{11}`$ ($`\nu _i^{00}`$), and the phase $`\phi `$, and a correcting pulse with the Rabi frequency $`\mathrm{\Omega }_{c,\rho }=\mathrm{\Delta }(\beta _\rho +\pi )/\gamma _\rho `$, duration $`\tau _{c,\rho }=2\gamma _\rho /\mathrm{\Delta }`$, frequency $`\nu _i^{10}`$, and the phase $`\phi _{c,\rho }^{11}=\theta _\rho +\phi \mathrm{\Delta }t_0\mathrm{\Theta }_\rho `$ ($`\phi _{c,\rho }^{00}=\theta _\rho +\phi +\mathrm{\Delta }t_0+\mathrm{\Theta }_\rho `$). The phases generated by the pulses for $`Q_{i\rho }^{mn}(\phi )`$ are the same as the ones indicated in the Table I, if we replace $`\theta `$ with $`\theta _\rho `$, $`\mathrm{\Theta }`$ with $`\mathrm{\Theta }_\rho `$, and $`\gamma `$ with $`\gamma _\rho `$. The resonant transitions for an arbitrary angle create a superposition of states. In the Table 3 we specify the phases of both, excited and initial states after the transition.

The probability and phase correct rotation of a single qubit can be implemented by the operators:

$$\begin{array}{cc}\hfill U_j^\rho (\phi )|\mathrm{}0_j\mathrm{}& =\mathrm{cos}(\rho \pi /2)|\mathrm{}0_j\mathrm{}+ie^{i\phi }\mathrm{sin}(\rho \pi /2)|\mathrm{}1_j\mathrm{},\hfill \\ \hfill U_j^\rho (\phi )|\mathrm{}1_j\mathrm{}& =\mathrm{cos}(\rho \pi /2)|\mathrm{}1_j\mathrm{}+ie^{i\phi }\mathrm{sin}(\rho \pi /2)|\mathrm{}0_j\mathrm{}.\hfill \end{array}$$
(24)
The operators $`U_j^\rho (\phi )`$ can be build using the following sequence of pulses $`Q_{i\rho }^{mn}(\phi )`$:

for intermediate qubits:

$$\begin{array}{c}U_j^\rho (\phi )=Q_{j\rho }^{10}(\phi )Q_j^{00}(2(\gamma +2\theta +\phi +\gamma _\rho +\theta _\rho ))Q_j^{00}(0)Q_{j\rho }^{00}(4\gamma 8\theta +\phi 2\gamma _\rho 2\theta _\rho )\hfill \\ \hfill \times Q_j^{11}(2(\gamma +2\theta +\gamma _\rho +\theta _\rho ))Q_j^{11}(0)Q_{j\rho }^{11}(4\theta +\phi )Q_j^{10}(0)Q_j^{10}(0);\end{array}$$
(25)
for the edge qubits:

$$U_j^\rho (\phi )=Q_{j\rho }^1(\phi )Q_{j\rho }^0(\phi +2\theta _\rho )Q_j^1(\theta _\rho )Q_j^0(\theta _\rho )Q_j^1(0)Q_j^0(0),$$
(26)
with the overall phase $`\pi `$.

## VIII Numerical results

In the above sections we were concerned only with the errors generated in the result of the near-resonant transitions with frequencies close to the frequency of the external field, when $`E_pE_m\nu J`$. These transitions are associated with the flip of the resonant $`k`$th spin whose the Larmor frequency, $`\omega _k`$, is close to the frequency of the external field, $`\omega _k\nu `$. In general case, the near-resonant transitions generate large errors. In the preceding sections the procedure is described how to suppress all these transitions. However, since the external rf field affects all spins in the system, there are non-resonant transitions associated with flips of other non-resonant $`k^{}`$th spins. Because the non-resonant transitions $`|p^{}|m^{}`$ have large detuning, $`E_p^{}E_m^{}\nu \delta \omega |kk^{}|`$, their probabilities are small and proportional to $`\mu ^2/|kk^{}|^2`$, where perturbation ; BI3

$$\mu =(\mathrm{\Omega }/2\delta \omega ).$$
(27)
For typical parameters $`\mu 10^4`$. Since in the system there are only non-resonant transitions (and all near-resonant transitions are suppressed), for a definite protocol $`\mu `$ is the only parameter which defines the errors in our quantum computer. This is demonstrated in the numerical simulations below.

In order to demonstrate the action of the logic gates on superpositional states, described in this paper, we simulated the exact quantum dynamics perturbation  of the system with the Hamiltonian (3) during implementation of the CN gate (1) between the edge qubits of the spin chain, CN0,L-1, where the $`0`$th qubit is the control qubit and the $`(L1)`$th qubit is the target qubit. (In a similar way one can implement any other CN gate CNi,j, where $`i,j=0,\mathrm{},L1`$ and $`ij`$, for example CNL-1,0.) Using the Swap operations,

$$\mathrm{S}_{i,i+1}=\mathrm{S}_{i+1,i}=\mathrm{CN}_{i,i+1}\mathrm{CN}_{i+1,i}\mathrm{CN}_{i,i+1}=\mathrm{CN}_{i+1,i}\mathrm{CN}_{i,i+1}\mathrm{CN}_{i+1,i},$$
(28)
we move the control $`0`$th qubit to the $`L2`$th position, implement the CN gate $`\mathrm{CN}_{L2,L1}`$, and using the same Swap gates we return the control qubit to its initial $`0`$th position. The whole procedure can be written in the form (read from the right to the left)

$$\mathrm{CN}_{0,L1}=\mathrm{S}_{0,1}\mathrm{S}_{1,2}\mathrm{}\mathrm{S}_{L4,L3}\mathrm{S}_{L3,L2}\mathrm{CN}_{L2,L1}\mathrm{S}_{L2,L3}\mathrm{S}_{L3,L4}\mathrm{}\mathrm{S}_{2,1}\mathrm{S}_{1,0}.$$
(29)
For simulations we initialized the system in the superpositional state (1) with randomly chosen real positive values of the coefficients $`B_j`$, subject only to the normalization condition $`_{j=0}^{2^L1}B_j^2=1`$. Since all $`B_j`$ are real and positive the phases of all states of the superposition are the same and equal to zero. (We should note that our protocols work for any set of initial phases.)

In Figs. 1(a,b) we show the deviation of phases for different states, $`\phi _j\mathrm{\Phi }`$, $`j=0,\mathrm{},2^L1`$ \[here $`\mathrm{\Phi }`$ is the total phase and $`\phi _j=\mathrm{arctan}[\mathrm{Im}(B_{}^{}{}_{j}{}^{})/\mathrm{Re}(B_{}^{}{}_{j}{}^{}))]`$, where Im and Re stand for the imaginary and real parts of the amplitude $`B_{}^{}{}_{j}{}^{}`$ in Eq. (2)\], from the total phase $`\mathrm{\Phi }`$ after implementation of the CN0,L-1 gate for two values of $`\delta \omega `$ \[and correspondent values of $`\mu `$ in Eq. (27)\]. From comparison of Fig. 1(a) with Fig. 1(b) one can see that decreasing twice the value of $`\mu `$ leads to decrease of the error in the phases of all states by the factor two. This supports the fact, mentioned in the beginning of this section, that for our protocols $`\mu `$ is the only parameter which defines the errors in the quantum computer. Physically, this means that only the non-resonant transitions contribute to the errors and all near-resonant transitions are completely suppressed.

In Fig. 2 we plot the phase error as a function of time. The phase error is defined as a the maximum max$`|\phi _j\mathrm{\Phi }|`$, $`j=0,\mathrm{},2^L1`$. In Figs. 1(a,b) the phase error is equal to the distance between the two dashed lines. During implementation of each elementary CN gate between the neighboring qubits (using 12 pulses for intermediate qubits) the phases of different states of the superposition are different, but after implementation of each gate CNi,i+1 or CNi+1,i the phases are equalized, since our CN gates between the neighboring qubits are probability and phase-corrected. That is why in Fig. 2 the phase error is plotted with the interval of 12 pulses for intermediate qubits and 9 or 10 pulses for the edge qubits. As follows from the results of the calculations, the phase error is mostly generated by the pulses $`Q_j^{00}`$ and $`Q_j^{11}`$. From Fig. 2 one can see that the phase error grows linearly with the number of these pulses. For larger number of qubits in the chain the error is larger, because the implementation of the protocol requires larger number of pulses. \[The total number of pulses $`Q_j^{mn}`$ is $`2\times 36\times (L2)5`$.\]

The probability errors for the gate CN0,L-1 are defined as the moduli of the difference $`P_j(L)=\left||B_j|^2|B_{}^{}{}_{j}{}^{}|^2\right|`$, where the coefficients $`B_j`$ and $`B_{}^{}{}_{j}{}^{}`$ in Eq. (2) are computed for the systems of $`L`$ qubits. The values of $`P_j(L)`$ are shown in in Fig. 3, and the relative errors $`P_j(L)/|B_j|^2`$, are plotted in Fig. 4 for different states of the superposition. From Fig. 3 one can see that the absolute values of probability errors $`P_j(L)`$ decrease with $`L`$ increasing, since the initial occupation probabilities are smaller for larger values of $`L`$ (because of the normalization condition $`_{j=0}^{2^L1}|B_j|^2=1`$). On the other hand, as Fig. 4 demonstrates, the relative probabilities of error increase with $`L`$ increasing because of increasing the number of pulses in the protocol.

## IX Conclusion

In this paper the first attempt is made to develop the protocols for implementation of the universal quantum gates on an arbitrary superposition of quantum states in a multi-spin quantum computer. The quantum gates are constructed for a homogeneous spin chain (the spins and interactions between them are identical). In spite of the fact that such a computer is not realized experimentally (because of severe technological challenges), it provides a relatively simple model with basic features common for many solid-state scalable quantum computer proposals.

We solved the general problems which one should face working with superpositional states in different types of quantum computers characterized by the constant (not switchable) interaction between qubits (for example in Kane’s quantum computer Kane ). Since the transition frequencies required to flip the $`j`$th qubit in the states $`|\mathrm{}0_{j+1}q_j0_{j1}\mathrm{}`$, $`|\mathrm{}1_{j+1}q_j0_{j1}\mathrm{}`$ (or $`|\mathrm{}0_{j+1}q_j1_{j1}\mathrm{}`$), and $`|\mathrm{}1_{j+1}q_j1_{j1}\mathrm{}`$ ($`q_j=0,1`$) are different, one inevitably will create an error by flipping the $`j`$th qubit. For an Ising spin quantum computer we corrected this error using additional correcting pulse which removes unwanted states from the register of quantum computer, created in the result of the unwanted transitions.

Another important problem solved in this paper is a minimization of the phase errors. Even in the situation, when the probability errors are minimized, each pulse of the protocol produces different phases for different quantum states of the superposition. In the Ising spin quantum computer the phases can be equalized by proper choice of phases of the rf pulses. Each protocol (for CN gate, one-qubit rotation, and others) has its own set of phases.

The phase and probability errors studied in this paper, decrease when the Rabi frequency, $`\mathrm{\Omega }`$, decreases or the frequency difference between the neighboring qubits, $`\delta \omega `$, increases. In particular, all errors tend to zero when $`\mathrm{\Omega }0`$ or $`\delta \omega \mathrm{}`$.

Our simulations show that the phase error less than 0.1 radians for the studied protocols can be achieved for the ratio $`\delta \omega /J>10^4`$. In our example with phosphorus impurity donors in silicon (see Introduction) the ratio $`\delta \omega /J`$ is about 170. We will mention three ways to increase this ratio. The first way is to increase $`\delta \omega `$ using even greater gradients of the magnetic field suggested in 6 . The second way is to decrease the interaction constant $`J`$. This can be easily achieved by either increase of the distance between the impurity atoms or using the atoms with smaller effective radius. However decrease of $`J`$ will reduce the clock speed of a quantum computer below MHz region. The third way is to develop more sophisticated sequences of electromagnetic pulses, which further suppress the phase error caused by non-resonant transitions.

###### Acknowledgements.

We are thankful to T. Seligman for useful discussions. This work was supported by the Department of Energy (DOE) under Contract No. W-7405-ENG-36, by the National Security Agency (NSA), and by the Advanced Research and Development Activity (ARDA). The work of C.P. was supported by Dirección General de Estudios de Posgrado (DGEP). C.P. is thankful to the Center for Nonlinear Studies at the Los Alamos National Laboratory for hospitality.

## Appendix A Correcting pulse

Suppose that only the state $`|m=|\mathrm{}1_{i+1}0_i0_{i1}`$ is initially populated, $`C_m(t_0)=1`$. We apply the pulse $`P_i^{11}`$ with the frequency $`\nu _i^{11}=\omega _i2J`$, where $`\omega _i`$ is the Larmor frequency of the $`i`$th qubit. The detuning for the transition $`|m|p=|\mathrm{}1_{i+1}1_i0_{i1}`$ is $`\mathrm{\Delta }_{pm}=E_pE_m\nu _i^{11}=\mathrm{\Delta }`$, where $`\mathrm{\Delta }=2J`$. From Eq. (6) after the pulse with the frequency $`\nu _i^{11}`$ and phase $`\mathrm{\Phi }`$ we have

$$C_m=[\mathrm{cos}\alpha (k)+if(k)\mathrm{sin}\alpha (k)]e^{i\theta (k)/2}$$
(30)
$$C_p=ig(k)\mathrm{sin}\alpha (k)e^{i[\theta (k)/2\mathrm{\Phi }+\mathrm{\Delta }t_0]}.$$

The Rabi frequency $`\mathrm{\Omega }_2`$ of this pulse is chosen to suppress the transitions $`T_i^{00}`$. In this case the quantities $`\alpha `$, $`\theta `$, $`f`$, and $`g`$, defined below, are the functions of only one parameter $`k`$. From the $`2\pi k`$-condition one has

$$\frac{\mathrm{\Delta }_2}{\mathrm{\Omega }_2}=\sqrt{4k_2^21},\mathrm{\Delta }_2=2\mathrm{\Delta }.$$
(31)
We choose

$$\mathrm{\Omega }_2=2\mathrm{\Omega },k_2=k.$$
(32)
For the transition $`T_i^{10}`$ one has $`\mathrm{\Delta }_{pm}=\mathrm{\Delta }`$ in Eq. (30), so that

$$\alpha (k)=\frac{\tau _2}{2}\sqrt{\mathrm{\Delta }^2+\mathrm{\Omega }_2^2}=\frac{\pi }{2}\sqrt{\left(\frac{\mathrm{\Delta }}{\mathrm{\Omega }_2}\right)^2+1}=\frac{\pi }{2}\sqrt{k^2+3/4},$$
(33)
where $`\tau _2=\pi /\mathrm{\Omega }_2`$ is the duration of the first pulse. The other quantities are

$$\theta (k)=\mathrm{\Delta }\tau _2=\frac{\mathrm{\Delta }\pi }{\mathrm{\Omega }_2}=\frac{\pi }{2}\sqrt{4k^21},$$
(34)
$$f(k)=\frac{\mathrm{\Delta }}{\sqrt{\mathrm{\Delta }^2+\mathrm{\Omega }_2^2}}=\sqrt{\frac{k^21/4}{k^2+3/4}},$$
(35)
$$g(k)=\frac{\mathrm{\Omega }_2}{\sqrt{\mathrm{\Delta }^2+\mathrm{\Omega }_2^2}}=\frac{1}{\sqrt{k^2+3/4}}$$
(36)
After the correcting pulse with the frequency $`\nu _i^{10}`$, phase $`\phi _c^{11}`$ (here the superscript indicates that the first pulse has the form $`P_i^{11}`$), and the duration $`\tau _c`$, one has

$$C_m(t)=C_m\mathrm{cos}\beta +iC_p\mathrm{sin}\beta e^{i\phi _c^{11}},$$
(37)
$$C_p(t)=C_p\mathrm{cos}\beta +iC_m\mathrm{sin}\beta e^{i\phi _c^{11}},$$

where

$$t=t_0+\tau _c,\beta =\frac{\mathrm{\Omega }_c\tau _c}{2}.$$
(38)
From the conditions $`\mathrm{Re}\{C_p(t)\}=0`$ and $`\mathrm{Im}\{C_p(t)\}=0`$, where Re and Im stand for, respectively, the real and imaginary parts of $`C_p(t)`$, one obtains the following equations:

$$\mathrm{tan}\mathrm{\Theta }=f\mathrm{tan}\alpha ,\phi _c^{11}=\theta +\mathrm{\Phi }\mathrm{\Delta }t_0\mathrm{\Theta },\mathrm{tan}\beta =g\mathrm{tan}\alpha \mathrm{cos}\mathrm{\Theta },$$
(39)
where we do not indicate dependence of parameters on $`k`$. The second and third equations in (39) define, respectively, the phase $`\phi _c^{11}`$ and the duration of the correcting pulse required to correct the error.

If one considers the transitions generated by the pulse $`P_i^{11}`$ in the opposite direction $`|\mathrm{}1_{i+1}1_i0_{i1}\mathrm{}|\mathrm{}1_{i+1}0_i0_{i1}\mathrm{}`$, one should just change the signs as \[see Eqs. (6) and (7)\]

$$ff\theta \theta ,\mathrm{\Phi }\mathrm{\Phi },\mathrm{\Delta }t_0\mathrm{\Delta }t_0,\phi _c\phi _c$$
(40)
in Eq. (39). After this transformation both sides of the second Eq. (39) change their sign, so that the expressions for the parameters of the correcting pulse, $`\phi _c^{11}`$ and $`\beta `$, do not change. Hence, one can suppress both unwanted transitions, $`|\mathrm{}1_{i+1}0_i0_{i1}\mathrm{}|\mathrm{}1_{i+1}1_i0_{i1}\mathrm{}`$ and $`|\mathrm{}1_{i+1}1_i0_{i1}\mathrm{}|\mathrm{}1_{i+1}0_i0_{i1}\mathrm{}`$, simultaneously.

For the transitions generated by the pulse $`P_i^{00}`$ one should change the sign of $`\mathrm{\Delta }`$, so that the expression for the phase $`\phi _c^{00}`$ of the correcting pulse takes the form

$$\phi _c^{00}=\theta +\mathrm{\Phi }+\mathrm{\Delta }t_0+\mathrm{\Theta },$$
(41)
where $`\mathrm{\Theta }`$ is defined in the first equation (39).

For $`k>1`$ the value of $`\beta `$ is small and negative. We take the duration of the pulse $`\beta ^{}=\beta +\pi `$, so that $`C_m(t)`$ in Eq. (37) changes its sign, and $`C_p(t)`$ is again equal to zero. After the correcting pulse one has

$$C_m(t)=\mathrm{exp}(i\theta /2i\mathrm{\Theta }),C_p(t)=0.$$
(42)
One can suppress the non-resonant transitions, $`T_i^{00}`$ and $`T_i^{11}`$ generated by the correcting pulse with moduli of detunings $`\mathrm{\Delta }`$, choosing the value of $`\mathrm{\Omega }_c`$ satisfying $`2\pi k`$-condition,

$$\frac{\lambda _c\tau _c}{2}=\pi k_c,\lambda _c=\sqrt{\mathrm{\Delta }^2+\mathrm{\Omega }_c^2},\tau _c=\frac{2\beta ^{}}{\mathrm{\Omega }_c},$$
(43)
where $`k_c`$ is the integer number. From Eq. (43) one has

$$\frac{\mathrm{\Delta }}{\mathrm{\Omega }_c}=\sqrt{\left(\frac{\pi k_c}{\beta ^{}}\right)^21}.$$
(44)
Below we take $`k_c=k`$. Since $`\beta ^{}\pi `$, one has $`\mathrm{\Omega }_c2\mathrm{\Omega }_1\mathrm{\Omega }_2`$ where $`\mathrm{\Omega }_1`$ and $`\mathrm{\Omega }_2`$ are defined in Eqs. (11) and (12).

## Appendix B Unwanted phases

We calculate here unwanted phases generated by the probability-corrected pulses $`Q_i^{01}(\phi )`$, $`Q_i^{00}(\phi )`$, and $`Q_i^{11}(\phi )`$. From the first equation in (42) the pulse $`Q_i^{11}`$ generates the phase $`\pi \theta /2\mathrm{\Theta }`$ for the states $`|\mathrm{}1_{i+1}0_i0_{i1}\mathrm{}`$ and $`|\mathrm{}0_{i+1}0_i1_{i1}\mathrm{}`$. From Eq. (40) the same pulse generates the phases $`\pi +\theta /2+\mathrm{\Theta }`$ for the states $`|\mathrm{}1_{i+1}1_i0_{i1}\mathrm{}`$ and $`|\mathrm{}0_{i+1}1_i1_{i1}\mathrm{}`$. In a similar way one can deduce the phases generated by the pulse $`Q_i^{00}(\phi )`$ for the states $`|\mathrm{}1_{i+1}q_i0_{i1}\mathrm{}`$ and $`|\mathrm{}0_{i+1}q_i1_{i1}\mathrm{}`$, where $`q_i=0,1`$.

Now, based on the results of Appendix A, we calculate the phase generated by the pulse $`Q_i^{11}(\phi )`$ for the state $`|\mathrm{}0_{i+1}0_i0_{i1}\mathrm{}`$. Since detuning for the transition $`|\mathrm{}0_{i+1}0_i0_{i1}\mathrm{}|\mathrm{}0_{i+1}1_i0_{i1}\mathrm{}`$ is positive and equal to $`\mathrm{\Delta }_2=2\mathrm{\Delta }`$, from Eq. (6) the first $`\pi `$ pulse \[of the combined pulse $`Q_i^{11}(\phi )`$\] generates the phase $`\mathrm{\Delta }_2/\mathrm{\Omega }_2=\mathrm{\Delta }/\mathrm{\Omega }=\theta `$. The duration of the correcting pulse with the frequency $`\nu _i^{10}`$ is defined by the third equation in Eqs. (43), and the detuning is $`\mathrm{\Delta }`$. From Eq. (6) the phase acquired by the state $`|\mathrm{}0_{i+1}0_i0_{i1}\mathrm{}`$ in the result of action of the correcting pulse is

$$\frac{\mathrm{\Delta }\tau _c}{2}=\beta ^{}\frac{\mathrm{\Delta }}{\mathrm{\Omega }_c}=\sqrt{(\pi k_c)^2\beta ^2}\gamma ,$$
(45)
where we used Eq. (44). After the action of two pulses, which constitute the probability corrected pulse $`Q_i^{11}(\phi )`$, the phase acquired by the state $`|\mathrm{}0_{i+1}0_i0_{i1}\mathrm{}`$ is $`\theta \gamma `$. We should note that for both pulses (main and correcting) the transition $`|\mathrm{}0_{i+1}0_i0_{i1}\mathrm{}|\mathrm{}0_{i+1}1_i0_{i1}\mathrm{}`$ is suppressed by the $`2\pi k`$ condition. In a similar way one can deduce other phases for other pulses in the Table I.

## Appendix C Protocol for the CN gate

Our aim is to implement the CN gate between neighboring qubits, $`CN_{a,b}`$, using only operations which affect the control and the target qubits, $`q_a`$ and $`q_b`$, respectively. Thus, for complete generality we need to consider the states of the control and target qubits, as well as their neighbors. The CN gate in a homogeneous spin chain without phase correction can be implemented by the following sequence

$$Q_a^{11}(\phi _8)Q_a^{10}(\phi _7)Q_a^{00}(\phi _6)Q_b^{00}(\phi _5)Q_a^{11}(\phi _4)Q_a^{10}(\phi _3)Q_a^{00}(\phi _2)Q_b^{11}(\phi _1).$$
(46)
This sequence can be described as follows: (in terms of the transformations for the amplitudes, we note that the phases of the various states will not be equal) (i) a controlled flip of $`q_b`$ if both of its neighbors are in the “1” state, (ii) a Not operation on $`q_a`$, (iii) a controlled flip of $`q_b`$ if both of it’s neighbors are in the “0” state, and finally (iv) another Not operation on $`q_a`$ which returns it to its initial state.

The transformation resulting from (46) is (we indicate in this Appendix only four relevant qubits of the spin chain),

$`|0000e^{i[\gamma \theta /2+\mathrm{\Theta }\phi _2+\phi _6]}|0000,`$ (47)
$`|0001e^{i[+\gamma +\theta /2\mathrm{\Theta }\phi _2+\phi _6]}|0001,`$
$`|0010e^{i[+\gamma +\theta /2\mathrm{\Theta }\phi _3+\phi _7]}|0010,`$
$`|0011e^{i[\gamma \theta /2+\mathrm{\Theta }\phi _3+\phi _7]}|0011,`$
$`|0100e^{i[\pi /2+\gamma +3\theta /2\mathrm{\Theta }+\phi _3+\phi _5\phi _6]}|0110,`$
$`|0101e^{i[\pi /2+\gamma +\theta /2+\mathrm{\Theta }+\phi _1+\phi _2\phi _6]}|0111,`$
$`|0110e^{i[\pi /2\gamma 3\theta /2+\mathrm{\Theta }+\phi _2\phi _5\phi _7]}|0100,`$
$`|0111e^{i[\pi /2\gamma \theta /2\mathrm{\Theta }\phi _1+\phi _3\phi _7]}|0101,`$
$`|1000e^{i[\gamma \theta /2+\mathrm{\Theta }\phi _3+\phi _7]}|1000,`$
$`|1001e^{i[+\gamma +\theta /2\mathrm{\Theta }\phi _3+\phi _7]}|1001,`$
$`|1010e^{i[+\gamma +\theta /2\mathrm{\Theta }\phi _4+\phi _8]}|1010,`$
$`|1011e^{i[\gamma \theta /2+\mathrm{\Theta }\phi _4+\phi _8]}|1011,`$
$`|1100e^{i[\pi /2\gamma \theta /2+3\mathrm{\Theta }+\phi _4+\phi _5\phi _7]}|0110,`$
$`|1101e^{i[\pi /2+\gamma +\theta /2+\mathrm{\Theta }+\phi _1+\phi _3\phi _7]}|1111,`$
$`|1110e^{i[\pi /2+\gamma +\theta /23\mathrm{\Theta }+\phi _3\phi _5\phi _8]}|1100,`$
$`|1111e^{i[\pi /2\gamma \theta /2\mathrm{\Theta }\phi _1+\phi _4\phi _8]}|1101.`$
However, when this sequence of gates is used, it is impossible to make the phases on all of the states equal. This can easily be seen by examining, for example, the first two transformations in Eq. (47). Here, it’s impossible to equalize the phases on the two final states, for arbitrary values of $`\theta `$, $`\mathrm{\Theta }`$, and $`\gamma `$. Thus, in order to produce a phase-corrected CN gate, it’s necessary to add extra pulses which can introduce more controllable phases $`\phi _j`$.

A sequence that we have found to work is,

$`CN_{i,i+1}`$ $`=`$ $`Q_i^{11}(\phi _{10})Q_i^{10}(\phi _9)Q_i^{00}(\phi _8)\underset{}{Q_{i+1}^{01}(0)Q_{i+1}^{01}(\phi _7)}Q_{i+1}^{00}(\phi _6)`$ (48)
$`Q_i^{11}(\phi _5)Q_i^{10}(\phi _4)Q_i^{00}(\phi _3)\underset{}{Q_{i+1}^{01}(0)Q_{i+1}^{01}(\phi _2)}Q_{i+1}^{11}(\phi _1),`$
where the braces indicate additional operations not found in Eq. (46). The transformation which results from this sequence is,

$`|0000e^{i[\pi \gamma 5\theta /2+\mathrm{\Theta }\phi _3\phi _7+\phi _8]}|0000,`$ (49)
$`|0001e^{i[\pi +\gamma +5\theta /2\mathrm{\Theta }\phi _2\phi _3+\phi _8]}|0001,`$
$`|0010e^{i[\pi +\gamma +5\theta /2\mathrm{\Theta }\phi _4+\phi _7+\phi _9]}|0010,`$
$`|0011e^{i[\pi \gamma 5\theta /2+\mathrm{\Theta }+\phi _2\phi _4+\phi _9]}|0011,`$
$`|0100e^{i[3\pi /2+\gamma \theta /2+\phi _2+\phi _4+\phi _6\phi _8]}|0110,`$
$`|0101e^{i[3\pi /2+\gamma +5\theta /2+\mathrm{\Theta }+\phi _1+\phi _3\phi _7\phi _8]}|0111,`$
$`|0110e^{i[3\pi /2\gamma +\theta /2+\mathrm{\Theta }\phi _2+\phi _3\phi _6\phi _9]}|0100,`$
$`|0111e^{i[3\pi /2\gamma 5\theta /2\mathrm{\Theta }\phi _1+\phi _4+\phi _7\phi _9]}|0101,`$
$`|1000e^{i[\pi \gamma 5\theta /2+\mathrm{\Theta }\phi _4\phi _7+\phi _9]}|1000,`$
$`|1001e^{i[\pi +\gamma +5\theta /2\mathrm{\Theta }\phi _2\phi _4+\phi _9]}|1001,`$
$`|1010e^{i[\pi \gamma 5\theta /2+\mathrm{\Theta }\phi _5+\phi _7+\phi _{10}]}|1010,`$
$`|1011e^{i[\pi +\gamma +5\theta /2\mathrm{\Theta }+\phi _2\phi _5+\phi _{10}]}|1011,`$
$`|1100e^{i[3\pi /2\gamma 5\theta /2+3\mathrm{\Theta }+\phi _2+\phi _5+\phi _6\phi _9]}|0110,`$
$`|1101e^{i[3\pi /2+\gamma +5\theta /2+\mathrm{\Theta }+\phi _1+\phi _4\phi _7\phi _9]}|1111,`$
$`|1110e^{i[3\pi /2+\gamma +5\theta /23\mathrm{\Theta }\phi _2+\phi _4\phi _6\phi _{10}]}|1100,`$
$`|1111e^{i[3\pi /2\gamma 5\theta /2\mathrm{\Theta }\phi _1+\phi _5+\phi _7\phi _{10}]}|1101.`$
This transformation introduces more than enough independent variables, $`\phi _j`$, to equalize all phases. To find the correct values for the $`\phi _j`$’s we set all the phases above equal to the same number, and solve the resulting system of equations. The solution in the form

$`\phi _1=2\gamma 5\theta ,\phi _2=\gamma +{\displaystyle \frac{5\theta }{2}}\mathrm{\Theta },\phi _3={\displaystyle \frac{3\pi }{4}}+2\gamma +2\theta 4\mathrm{\Theta }+2\phi _9\phi _{10},`$
$`\phi _4={\displaystyle \frac{3\pi }{4}}+\phi _9,\phi _5={\displaystyle \frac{3\pi }{4}}+\phi _{10},\phi _6=2\mathrm{\Theta }+\phi _9\phi _{10},\phi _7=\gamma {\displaystyle \frac{5\theta }{2}}+\mathrm{\Theta },`$
$`\phi _8=2\gamma +2\theta 4\mathrm{\Theta }+2\phi _9\phi _{10},`$ (50)
equalizes the phases of all states to $`\pi /4`$. There are only eight independent $`\phi _j`$’s in these equations, so that $`\phi _9`$ and $`\phi _{10}`$ can be set to zero. Thus, the pulse sequence (48) with the phases (C) implements a phase corrected CN gate.