# NMR quantum computation with indirectly coupled gates

## Abstract

An NMR realization of a two-qubit quantum gate which processes quantum information indirectly via couplings to a spectator qubit is presented in the context of the Deutsch-Jozsa algorithm. This enables a successful comprehensive NMR implementation of the Deutsch-Jozsa algorithm for functions with three argument bits and demonstrates a technique essential for multi-qubit quantum computation.

Nuclear magnetic resonance (NMR) spectroscopy has emerged at the forefront of experimental quantum computation investigations . Key concepts such as fundamental gates  and error correction  have been demonstrated using NMR spectroscopy. However, comprehensive algorithm realizations have only been accomplished for the Deutsch-Jozsa algorithm for functions with one and two bit arguments  and for Grover’s algorithm with a two bit register . In these instances crucial two-qubit gates were realized “directly” via the coupling between the corresponding nuclear spins. For a quantum computer with a larger numbers of qubits, the associated requirement of appreciable coupling between any pair of spins raises difficulties. First, it may not be possible to find any molecule with this coupling configuration. Second, it demands increasingly complex schemes for managing the evolution of spectator spins during execution of any two-qubit gate . However, efficient “indirect” realization of any two-qubit gate via a chain of couplings through intermediate spins is possible . This relaxes the coupling requirements and a “linear” coupling configuration, for which the pattern of couplings is $`ABCD\mathrm{}`$ suffices for quantum computation. In this Letter we report a comprehensive three qubit NMR realization of the Deutsch-Jozsa algorithm for functions with three bit arguments, using indirect realizations of two-qubit gates and a linear coupling configuration for information processing. The method that we present is general and readily scalable to larger numbers of qubits.

The Deutsch problem  considers $`f:\{0,1\}^N\{0,1\}`$ that are constant or balanced. A balanced function returns $`0`$ as many times as $`1`$ after evaluation over its entire range. Given any $`f`$ which is either balanced or constant the problem is to determine its type. For classical algorithms that solve the Deutsch problem with certainty the number of evaluations of $`f`$ grows exponentially with $`N`$. A quantum algorithm requires a single evaluation of $`f`$ and yet solves the problem with certainty . Previous NMR demonstrations  used the Cleve version , requiring an $`N`$ qubit control register for storing function arguments, plus a $`1`$ qubit function register for function evaluation. Our recent modification to the algorithm (see Fig. 1) only needs the $`N`$ qubit control register . It was also shown that for each admissible (i. e. constant or balanced) function for $`N2`$ the evolution step is a product of single qubit operations. For an isolated spin $`\frac{1}{2}`$ nucleus any single qubit operation amounts to a rotation of the magnetization vector; this can be implemented classically. Thus for $`N2`$ the algorithm can be executed classically. Previous comprehensive NMR implementations of the algorithm fall within this classical regime . However, for $`N3`$ there exist balanced functions for which qubits in the control register become entangled; this is indisputably quantum mechanical. $`N=3`$ is then the critical point at which quantum mechanical features become essential in the Deutsch-Jozsa algorithm.

Two-qubit, entangling operations only appear during the function evaluation step, $`\widehat{U}_f`$. However, for $`f`$ constant, $`\widehat{U}_f=\widehat{I}`$ and the algorithm can be executed classically. To assess quantum behaviour the corresponding gate for balanced $`f`$ must be investigated. Balanced functions can be characterized by the choices of $`2^{N1}`$ arguments out of $`2^N`$ possibilities for which $`0`$ is returned. For $`N=3`$ this gives $`\left(\genfrac{}{}{0pt}{}{8}{4}\right)=70`$ balanced functions. Admissible functions may be represented via power series expansions in the argument bits, $`x_i`$ where $`i=0,1,2`$. That $`x_i^2=x_i`$ for $`x_i\{0,1\}`$ implies that for any admissible function,

$$f(x_2,x_1,x_0)=\underset{i>j0}{\overset{2}{}}a_{ij}x_ix_j\underset{i=0}{\overset{2}{}}a_ix_ia$$
(1)   
where addition is modulo 2 and $`a_{ij},a_i,a\{0,1\}`$. The disappearance of a cubic term in Eq. (1) is a property of balanced and constant functions. This provides a preliminary decomposition:

$$\widehat{U}_f=\underset{i>j0}{\overset{2}{}}\left(\widehat{U}^{ij}\right)^{a_{ij}}\underset{k=0}{}\left(\widehat{U}^k\right)^{a_k}$$
(2)   
where

$`\widehat{U}^{ij}|x`$ $`:=`$ $`\left(1\right)^{x_ix_j}|x\text{, and}`$ (3)   
$`\widehat{U}^i|x`$ $`:=`$ $`\left(1\right)^{x_i}|x.`$ (4)   
are the quadratic term gate and linear term gate, respectively. The constant term merely provides an identity operation. Quadratic and linear term gates all commute and can be rearranged at will. In terms of fundamental gates, $`\widehat{U}^i=\widehat{R}_{\widehat{𝐳}}^i(180)`$ where superscripts index the qubit to which the $`180^{}`$ single qubit rotation is applied. Similarly, $`\widehat{U}^{ij}=\widehat{R}_{\widehat{𝐲}}^j(90)\widehat{U}_{\text{CN}}^{ij}\widehat{R}_{\widehat{𝐲}}^j(90)`$ where $`\widehat{U}_{\text{CN}}^{ij}`$ is a controlled-NOT gate with control $`i`$ and target $`j`$. Thus the algorithm can be implemented classically for functions with no quadratic terms. However, a quadratic term gate can produce entangled states from unentangled states for qubits $`i`$ and $`j`$ via its constituent controlled-NOT gate. There are no classical operations involving magnetization vectors of two spins that produce entanglement. Therefore, for $`N=3`$ it is in the quadratic term gates that quantum mechanical features appear. The arrangements of linear and quadratic term gates that constitute $`\widehat{U}_f`$ for any admissible $`f`$ can be classified via similarity under permutations of control register qubits. Equations \[(2)-(4)\] imply that this can be accomplished by classifying admissible functions via similarity under argument bit permutations and/or addition of a constant term. Accordingly there are ten classes of balanced functions; a representative of each is provided in Table I. Function evaluation steps for any members of a given class differ only by a permutation of the control register qubits to which they are applied. Thus a realization of the $`N=3`$ Deutsch algorithm is comprehensive if the algorithm is applied to at least one representative from each class of admissible functions. All possible quadratic term gates are required for the classes represented by $`f_9`$ and $`f_{10}`$. Therefore, for $`N=3`$ the algorithm requires two-qubit gates between all pairs of qubits and is suitable for testing quantum information processing with a linear coupling configuration.

Currently the most accessible experimental technology for quantum computing is NMR spectroscopy of spin $`\frac{1}{2}`$ nuclei of appropriate molecules in solution . Any molecule containing three distinguishable, coupled spin $`\frac{1}{2}`$ nuclei in an external magnetic field provides the three qubits needed to solve the $`N=3`$ Deutsch problem. To a good approximation the Hamiltonian for a room temperature solution state sample is $`\widehat{H}=_{i=0}^2\frac{\omega _i}{2}\widehat{\sigma }_z^i+\frac{\pi }{2}_{i>j0}^2J_{ij}\widehat{\sigma }_z^i\widehat{\sigma }_z^j`$, where $`\omega _i`$ are the Zeeman frequencies, $`J_{ij}`$ the scalar coupling constants, and $`\widehat{\sigma }_z^i`$ Pauli operators . Superscripts label the spins and identify them with the corresponding argument bits. A literal translation of the algorithm into NMR operations would begin with initialization via a pseudo-pure state preparation scheme . The evolution stage can be implemented by building single qubit and controlled-NOT gates from standard sequences of spin selective RF pulses and periods of evolution under $`\widehat{H}`$ . Measurement can effectively be accomplished via tomography, which requires repeated execution of the initialization and evolution stages, each time varying the readout pulse before acquisition . It is, however, possible to apply the evolution stage directly to a thermal equilibrium initial state and successfully solve the Deutsch problem with an expectation value measurement . Analysis of the system state after the function evaluation step demonstrates this for the $`N=3`$ Deutsch algorithm. Using the product operator formalism, the deviation part of the thermal equilibrium equilibrium density operator for a weakly coupled homonuclear NMR system is proportional to $`\widehat{\rho }_{th}=\widehat{I}_z^2+\widehat{I}_z^1+\widehat{I}_z^0`$ . The initial rotation with phase $`\varphi =\frac{\pi }{2}`$ transforms this to $`\widehat{I}_x^2\widehat{I}_x^1\widehat{I}_x^0`$. Then $`\widehat{U}_f`$ produces the states listed in Table I. Signal acquisition immediately after application of $`\widehat{U}_f`$ and with no additional readout pulses provides a spectrum, the $`f`$-spectrum, whose form depends on $`f`$. A fiducial spectrum is obtained in the same fashion but with $`\widehat{U}_f`$ replaced by $`\widehat{I}`$; here the system’s pre-acquisition state is $`\widehat{I}_x^2\widehat{I}_x^1\widehat{I}_x^0`$. Comparison with $`\widehat{\rho }_f`$ for admissible functions (see Table I) indicates that for each there is either a $`0`$ or a $`\pi `$ phase difference between each line each line of the $`f`$-spectrum and its counterpart in the fiducial spectrum. More precisely for applicable functions:

(i) $`f`$ is constant if and only if the $`f`$-spectrum is identical to the fiducial spectrum and

(ii) $`f`$ is balanced if and only if there is a $`\pi `$ phase difference between at least one line of the $`f`$-spectrum and its counterpart in the fiducial spectrum.

This criterion requires that each spin is coupled to at least one other spin. If any spin is completely uncoupled then the entire $`f`$-spectra for $`f_9`$ and $`f_{10}`$ disappears; the comparison would be impossible. However, if each spin is coupled to at least one other then for $`N=3`$ at least one is coupled to the other two. This ensures that at least one of the doubly antiphase multiplets for $`f_9`$ and $`f_{10}`$ survives, giving a line in the $`f`$-spectrum with a $`\pi `$ phase difference relative to its fiducial spectrum counterpart. For $`f_7`$ and $`f_8`$ at least one of the antiphase multiplets (for spin 2 or spin 0) must survive; again this provides a line whose phase differs by $`\pi `$. For $`f_4`$, $`f_5`$ and $`f_6`$ the entire spin 0 multiplet in the $`f`$-spectrum displays a $`\pi `$ phase difference relative to its fiducial spectrum counterpart. The same is true for spin 2 in the cases $`f_1`$, $`f_2`$ and $`f_3`$.

The fiducial spectrum can be phased so that its constituent lines all appear upright. Thus, the answer to the $`N=3`$ Deutsch problem may be determined by inspecting the $`f`$-spectrum for inverted lines. Each balanced function produces at least one inversion. For constant functions all lines are upright. This provides a solution state NMR scheme for conclusively answering the $`N=3`$ Deutsch problem with just one application of the evolution stage (here equivalent to the unmodified version followed by a $`\widehat{R}_{\widehat{𝐧}}(90)`$ readout) to the thermal equilibrium input state.

A saturated solution of $`{}_{}{}^{13}\text{C}`$ labeled alanine in $`\text{D}_2\text{O}`$ provided the qubits. We label the carboxyl carbon, spin $`2`$, the $`\alpha `$ carbon, 1 and the methyl carbon, $`0`$. Protons were decoupled using a standard heteronuclear decoupling technique. Scalar couplings are $`J_{21}=56`$Hz, $`J_{10}=36`$Hz and $`J_{20}=1.3`$Hz. Relaxation times are $`T_1(2)=11.5`$s, $`T_1(1)=1.2`$s, and $`T_1(0)=0.7`$s and $`T_2(2)=1.3`$s, $`T_2(1)=0.41`$s, and $`T_2(0)=0.81`$s where the argument labels the spin. Spin selective rotations were implemented via Gaussian shaped pulses of duration $`0.7`$ms for spins 0 and 1 and $`0.5`$ms for spin 2. No hard pulses were used. Linear term gates can be implemented via spin selective phase shifts on the output spectrum by placing them after the quadratic term gates and immediately prior to acquisition. Thus certain $`f`$-spectra differ by spin selective phase shifts only. These are: (i) $`f_1`$, $`f_2`$ and $`f_3`$, (ii) $`f_4`$, $`f_5`$, and $`f_6`$, (iii) $`f_7`$ and $`f_8`$ and (iv) $`f_9`$ and $`f_{10}`$. The crux of the experiment is in the realization of the quadratic term gates. This is accomplished via the rotation and delay construction of controlled-NOT gates . Selective refocusing sequences  effectively eliminate all but one coupling term in $`\widehat{H}`$, thus providing appropriate evolution during the delay. The resulting quadratic term gate simplifies to

$$\widehat{U}^{ij}=\left[1/2J_{ij}\right]^{ij}\left[90\right]_z^i\left[90\right]_z^j$$
(5)   
where $`\left[\theta \right]_n^j`$ indicates a rotation of spin $`i`$ about the axis $`n`$ through angle $`\theta `$ and $`\left[t\right]^{ij}`$ evolution under the scalar coupling between spins $`i`$ and $`j`$ for period $`t`$. For alanine this is satisfactory for $`\widehat{U}^{21}`$ and $`\widehat{U}^{10}`$. However, for $`\widehat{U}^{20}`$ it is inadequate since $`1/2J_{20}=0.42`$s which is comparable to the smallest $`T_2`$. An alternative is to process the information via spin 1 and use only the linear coupling configuration ( spin 2 - spin 1 -spin 0). An indirect realization is $`\widehat{U}_{\text{CN}}^{20}=\widehat{U}_{\text{SW}}^{01}\widehat{U}_{\text{CN}}^{21}\widehat{U}_{\text{SW}}^{01},`$ where $`\widehat{U}_{\text{SW}}^{01}`$ is the SWAP gate  between qubits $`1`$ and $`0`$. After simplification,

$`\widehat{U}^{20}`$ $`=`$ $`\left[90\right]_y^1\left[90\right]_y^0\left[1/2J_{10}\right]^{10}\left[90\right]_x^1\left[90\right]_x^0`$ (9)   
$`\left[1/2J_{10}\right]^{10}\left[90\right]_y^1\left[1/2J_{21}\right]^{21}\left[90\right]_x^1`$   
$`\left[1/2J_{10}\right]^{10}\left[90\right]_y^1\left[90\right]_x^0\left[1/2J_{10}\right]^{10}`$   
$`\left[90\right]_x^1\left[90\right]_y^0\left[90\right]_z^2\left[90\right]_z^3.`$   
This gives a pulse sequence of duration $`0.071s`$ (excluding $`\widehat{𝐳}`$ rotations that are equivalent to phase shifts in the output spectrum) that is significantly faster than that using $`\left[1/2J_{20}\right]^{20}`$. During $`\left[1/2J_{10}\right]^{10}`$ and $`\left[1/2J_{21}\right]^{21}`$ evolution periods the selective refocusing scheme effectively removes the scalar coupling between spins 2 and 0. Throughout this implementation of the algorithm information is processed using only the spin2 - spin 1 -spin 0 linear coupling configuration and not the spin 2 -spin 0 coupling. However, the latter must be taken into account in the interpretation of the output spectra.

The experiments were performed at room temperature using a BRUKER 500-DRX spectrometer and an inverse detection probe. For each representative function listed in Table I signal acquisition takes place immediately after implementation of $`\widehat{U}_f`$. Figure 2 provides selected experimental spectra that are phased so that $`\widehat{I}_x^j`$ product operator terms correspond to upright multiplets. The line orientations agree with those predicted from $`\widehat{\rho }_f`$ and provide correct solutions to the Deutsch problem. An estimate of errors for the most complicated case, $`f_9`$, may be obtained by applying a selective $`90^{}`$ readout pulse about the $`\widehat{𝐱}`$ axis immediately after $`\widehat{U}_f`$. Ideally the readout spin multiplet should remain while the others disappear. The average amplitudes of the residual signals for the latter lie between $`14\%`$ and $`31\%`$ of the average amplitude of the corresponding lines with no readout. The ability to extract the Deutsch problem solution for $`N>3`$ via pure phase information in the output spectrum, in contrast to amplitude information, appears to have mitigated such errors. It is not yet clear how this advantage may be extended beyond $`N=3`$. The number of selective rotations required for $`f_9`$ points to imperfections within selective pulses as one likely source of error. In particular, it must be noted that possible effects of scalar coupling evolution during application of selective rotations were ignored. Indeed, for the indirectly coupled realization of $`\widehat{U}^{20}`$ the total duration of all the selective rotations is comparable to $`1/2J_{21}`$. To the best of our knowledge this issue has not been addressed satisfactorily. A further possible source of error are inhomogeneities in the RF magnetic fields used for selective rotations.

To conclude, we have provided a comprehensive NMR realization of the $`N=3`$ Deutsch-Jozsa algorithm, at the same time demonstrating quantum information processing via a linear configuration of couplings and indirect realizations of two-qubit gates. The use of appropriate SWAP gates allows for the extension of our method to quantum computation with larger numbers of qubits.

This work was supported, in part, by the DARPA and the ONR. We would also like to thank Gary Sanders for useful discussion.

Figure 1

Figure 2