{'fraction_non_alphanumeric': 0.03468802661239139, 'fraction_numerical': 0.008644650165233187, 'mean_word_length': 4.360255733474104, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Introduction to NMR Quantum Information Processing

After a general introduction to nuclear magnetic resonance (NMR), we give the basics of implementing quantum algorithms. We describe how qubits are realized and controlled with RF pulses, their internal interactions, and gradient fields. A peculiarity of NMR is that the internal interactions (given by the internal Hamiltonian) are always on. We discuss how they can be effectively turned off with the help of a standard NMR method called ``refocusing''. Liquid state NMR experiments are done at room temperature, leading to an extremely mixed (that is, nearly random) initial state. Despite this high degree of randomness, it is possible to investigate QIP because the relaxation time (the time scale over which useful signal from a computation is lost) is sufficiently long. We explain how this feature leads to the crucial ability of simulating a pure (non-random) state by using ``pseudopure'' states. We discuss how the ``answer'' provided by a computation is obtained by measurement and how this measurement differs from the ideal, projective measurement of QIP. We then give implementations of some simple quantum algorithms with a typical experimental result. We conclude with a discussion of what we have learned from NMR QIP so far and what the prospects for future NMR QIP experiments are.

Using quantum physics to represent and manipulate information makes possible surprising improvements in the efficiency with which some problems can be solved. But can these improvements be realized experimentally? If we consider the history of implementing theoretical ideas about classical information and computation, we find that initially, small numbers of simple devices were used to explore the advantages and the difficulties of information processing. For example, in 1933 Atanasoff and his colleagues at the Iowa State College were able to implement digital calculations using about 300 vacuum tubes (see [1], the entry for "computing, modern history of"). Although the device was never practical because its error rate was too large, it was probably the first instance of a programmable computer using vacuum tubes and it opened the way for more stable and reliable devices. Progress toward implementing quantum information processors is also initially confined to limited capacity and error-prone devices.
There are numerous proposals for implementing quantum information processing (QIP) prototypes. To date (2002), only three of them have been used to successfully manipulate more than one qubit: cavity quantum electrodynamics (cavity QED), ion traps and nuclear magnetic resonance (NMR) with molecules in a liquid (liquid state NMR). The difficulty of realizing QIP devices can be attributed to an intrinsic conflict between two of the most important requirements: On the one hand, it is necessary for the device to be well isolated from, and therefore interact only weakly with, its environment; otherwise, the crucial quantum correlations on which the advantages of QIP are based are destroyed. On the other hand, it is necessary for the different parts of the device to interact strongly with each other and for some of them to be coupled strongly with the measuring device, which is needed to read out "answers". That few physical systems have these properties naturally is apparent from the absence of obvious quantum effects in the macroscopic world.
One system whose properties constitute a reasonable compromise between the two requirements consists of the nuclear spins in a molecule in the liquid state. The spins, particularly those with spin 1 2 , provide a natural representation of quantum bits. They interact weakly but reliably with each other and the effects of the environment are often small enough. The spins can be controlled with radio-frequency (RF) pulses and observed with measurements of the magnetic fields that they generate. Liquid state NMR has so far been used to demonstrate control of up to seven physical qubits.
It is important to remember that the idea of QIP is less than two decades old, and, with the notable exception of quantum cryptography, experimental proposals and efforts aimed at realizing modern QIP began only in the last five years of the 20'th century. Increasingly advanced experiments are being implemented. But from an information processing point of view, we are a long way from using quantum technology to solve an independently posed problem not solvable on a standard personal computer-a typical "classical" computer. In order to get to the point where such problems can be solved by QIP, current experimental efforts are devoted to understanding the behavior of and the methods for controlling various quantum systems, as well as ways of overcoming their limitations. The work on NMR QIP has focused on the control of quantum systems by algorithmically implementing quantum transformations as precisely as possible. Within the limitations of the device, this approach has been surprisingly successful, thanks to the many scientists and engineers who have perfected NMR spectrometers over the past 50 years.
After a general introduction to NMR, we give the basics of implementing quantum algorithms. We describe how qubits are realized and controlled with RF pulses, their internal interactions, and gradient fields. A peculiarity of NMR is that the internal interactions (given by the internal Hamiltonian) are always on. We discuss how they can be effectively turned off with the help of a standard NMR method called "refocusing". Liquid state NMR experiments are done at room temperature, leading to an extremely mixed (that is, nearly random) initial state. Despite this high degree of randomness, it is possible to investigate QIP because the relaxation time (the time scale over which useful signal from a computation is lost) is sufficiently long. We explain how this feature leads to the crucial ability of simulating a pure (non-random) state by using "pseudopure" states. We discuss how the "answer" provided by a computation is obtained by measurement and how this measurement differs from the ideal, projective measurement of QIP. We then give implementations of some simple quantum algorithms with a typical experimental result. We conclude with a discussion of what we have learned from NMR QIP so far and what the prospects for future NMR QIP experiments are. For an elementary, device-independent introduction to quantum information and definitions of the states and operators used here, see [2].

.1 NMR Basics
Many atomic nuclei have a magnetic moment, which means that, like small bar magnets, they respond to and can be detected by their magnetic fields. Although single nuclei are impossible to detect directly by these means with currently available technology, if sufficiently many are available so that their contributions to the magnetic field add, they can be observed as an ensemble. In liquid-state NMR, the nuclei belong to atoms forming a molecule, a very large number of which are dissolved in a liquid. An example is 13 C-labeled trichloroethylene (TCE) (Fig. 1). The hydrogen nucleus (that is the proton) of each TCE molecule has a relatively strong magnetic moment. When the sample is placed in a powerful external magnetic field, each proton's spin prefers to align itself with the field. It is possible to induce the spin direction to "tip" off-axis by means of RF pulses, at which point the effect of the static field is to induce a rapid precession of the proton spins. In this introduction, precession refers to a rotation of a spin direction around the main axis, here the z-axis as determined by the external magnetic field. The precession frequency ω is often called the Larmor frequency and is linearly related to the strength B of the external field: ω = µB, where µ is the magnetic moment. For the proton, the magnetic moment is 42.7Mhz /T . (Mhz stands for "megahertz", which is a frequency unit equal to 10 6 rotations per second. T stands for "Tesla", a magnetic field unit.) At a typical field of B = 11.7T , the proton's precession frequency is 500Mhz . The magnetic field produced by the precessing protons induces oscillating currents in a coil judiciously placed around the sample and "tuned" to the precession frequency, allowing observation of the entire ensemble of protons by "magnetic induction". This is the fundamental idea of NMR. The device that applies the static magnetic field and RF control pulses and that detects the magnetic induction is called an NMR spectrometer (Fig. 2 There are three useful nuclei for realizing qubits. They are the proton (H), and the two carbons ( 13 C). The molecule is "labeled", which means that the nuclei are carefully chosen isotopes. In this case, the normally predominant isotope of carbon, 12 C (a spin-zero nucleus), is replaced by 13  FIG. 2: Schematic of a typical NMR spectrometer (not to scale). The main components of a spectrometer are the magnet, which is superconducting, and the console , which has the electronics needed to control the spectrometer. The sample containing a liquid solution of the molecule used for QIP is inserted into the central core of the magnet, where it is surrounded by the "probe". The probe (shown enlarged in the insert to the right) contains coils for applying the radio frequency (RF) pulses and magnetic field gradients.
Magnetic induction by nuclear spins was observed for the first time in 1946 by the groups of E. Purcell [3] and F. Bloch [4]. This achievement opened a new field of research, leading to many important applications, such as molecular structure determination, dynamics studies both in the liquid and solid state [5], and magnetic resonance imaging [6]. The application of NMR to QIP is related to methods for molecular structure determination by NMR. Many of the same techniques are used in QIP, but instead of using uncharacterized molecules, specific ones with well-defined nuclear spins are synthesized. In this setting, one can manipulate the nuclear spins as quantum information so that it becomes possible to experimentally demonstrate the fundamental ideas of QIP.
Perhaps the clearest example of early connections of NMR to information theory is the spin echo phenomenon [7]. When the static magnetic field is not "homogeneous" (that is, it is not constant across the sample), the spins precess at different frequencies depending on their location in the sample. As a result, the magnetic induction signal rapidly vanishes because the magnetic fields produced by the spins are no longer aligned and therefore do not add. The spin echo is used to "refocus" this effect by inverting the spins, an action that effectively reverses their precession until they are all aligned again. Based on spin echoes, the idea of using nuclear spins for (classical) information storage was suggested and patented by A. Anderson and E. Hahn as early as 1955 [8,9]. NMR spectroscopy would not be possible if it were not for relatively long "relaxation" times. Relaxation is the process that tends to re-align the nuclear spins with the field and randomize their phases, an effect that leads to complete loss of the information represented in such a spin. In liquid state, relaxation times of the order of seconds are common and attributed to the weakness of nuclear interactions and a fast averaging effect associated with the rapid, tumbling motions of molecules in the liquid state.
Currently, "off-the-shelf" NMR spectrometers are robust and straightforward to use. The requisite control is to a large extent computerized, so most NMR experiments involve few custom adjustments after the sample has been obtained. Given that the underlying nature of the nuclear spins is intrinsically quantum mechanical, it is not surprising that, soon after P. Shor's discovery of the quantum factoring algorithm, NMR was studied as a potentially useful device for QIP.

A Brief Survey of NMR QIP
Concrete and workable proposals for using liquid-state NMR for quantum information were first given in 1996/7 by D. Cory, A. Fahmy and T. Havel [10] and by N. Gershenfeld and I. Chuang [11]. Three difficulties had to be overcome for NMR QIP to become possible. The first was that the standard definitions of quantum information and computation require that quantum information be stored in a single physical system. In NMR, an obvious such system consists of some of the nuclear spins in a single molecule. But it is not possible to detect single molecules with available NMR technology. The solution that makes NMR QIP possible can be applied to other QIP technologies: Consider the large collection of available molecules as an ensemble of identical systems. As long as they all perform the same task, the desired answers can be read out collectively. The second difficulty was that the standard definitions require that read-out take place by a projective quantum measurements of the qubits. From such a measurement, one learns whether a qubit is in the state | | |0 or | | |1 . The two measurement outcomes have probabilities determined by the initial state of the qubits being used, and after the measurement the state "collapses" to a state consistent with the outcome. The measurement in NMR is much too weak to determine the outcome and cause the state's collapse for each molecule. But because of the additive effects of the ensemble, one can observe a (noisy) signal that represents the average, over all the molecules of the probability that | | |1 would be the outcome of a projective measurement. It turns out that this so-called "weak measurement" suffices for realizing most quantum algorithms, in particular those whose ultimate answer is deterministic. Shor's factoring and Grover's search algorithm can be modified to satisfy this property. The final and most severe difficulty was that, even though in equilibrium there is a tendency for the spins to align with the magnetic field, the energy associated with this tendency is very small compared to room temperature. Therefore, the equilibrium states of the molecules' nuclear spins are nearly random, with only a small fraction pointing in the right direction. This difficulty was overcome by methods for singling out the small fraction of the observable signal that represents the desired initial state. These methods were anticipated in 1977 [12].
Soon after these difficulties were shown to be overcome or circumventable, two groups were able to experimentally implement short quantum algorithms using NMR with small molecules [13,14]. At present it is considered unlikely that liquid-state NMR algorithms will solve problems not easily solvable with available classical computing resources. Nevertheless, experiments in liquid-state NMR QIP are remarkable for demonstrating that one can control the unitary evolution of physical qubits sufficiently well to implement simple QIP tasks. The control methods borrowed from NMR and developed for the more complex experiments in NMR QIP are applicable to other device technologies, enabling better control in general.

Principles of Liquid-State NMR QIP
In order to physically realize quantum information, it is necessary to find ways of representing, manipulating, and coupling qubits so as to implement non-trivial quantum gates, prepare a useful initial state and read out the answer. The next sections show how to accomplish these tasks in liquid-state NMR.

Realizing Qubits
The first step for implementing QIP is to have a physical system that can carry quantum information. The preferred system for realizing qubits in liquid-state NMR consists of spin-1 2 nuclei, which are naturally equivalent to qubits. The nuclear-spin degree of freedom of a spin-1 2 nucleus defines a quantum mechanical two-state system. Once the direction along the strong external magnetic field is fixed, its state space consists of the superpositions of "up" and "down" states. That is, we can imagine that the nucleus behaves somewhat like a small magnet, with a definite axis, which can point either "up" (logical state | | |0 ) or "down" (logical state | | |1 ). By the superposition principle, every quantum state of the form | | |ψ 0 = α| | |0 + β| | |1 with |α| 2 + |β| 2 = 1 is a possible (pure) state for the nuclear spin. In the external magnetic field, the two logical states have different energies. The energy difference results in a time evolution of | | |ψ 0 given by The constant ω is the precession frequency of the nuclear spin in the external magnetic field in units of radians per second if t is in seconds. The frequency is proportional to the energy difference ǫ between the "up" and "down" states: ω = 2πǫ/h, where h is Planck's constant.
Although a spin-1 2 nucleus' state space is the same as that of a qubit, the precession implies that the state is not constant. We would like the realization of a qubit to retain its state over time when we are not intentionally modifying it. For this reason, in the next section, the qubit state realized by the nuclear spin will be defined so as to compensate for the precession.
Precession frequencies for nuclear spins can vary substantially depending on the nuclei's magnetic moments. For example, at 11.7T , the precession frequency for protons is 500Mhz and for 13 C it is 125Mhz . These frequency differences are exploited in measurement and control to distinguish between the types of nuclei. The effective magnetic field seen by nuclear spins also depends on their chemical environment. This dependence causes small variations in the spins' precession frequencies that can be used to distinguish, for example, the two 13 C nuclei in TCE: The frequency difference (called the "chemical shift") is 600-900Hz at 11.7T , depending on the solvent, the temperature and the TCE concentration.
The operator ωσ z /2 is the internal Hamiltonian (that is, the energy observable, in units for which h/(2π) = 1) of the nuclear spin. The direction of the external magnetic field determines the z-axis. Given a choice of axes, the idea that a single nuclear spin-1 2 has a spin direction (as would be expected for a tiny magnet) can be made explicit by means of the Bloch sphere representation of a nuclear spin's state (Fig. 3). The Pauli matrix σ z can be thought of as the observable that measures the nuclear spin along the z-axis.
Observables for spin along the xand y-axis are given by the other two Pauli matrices σ x = 0 1 1 0 Given a state | | |ψ = α| | |0 + β| | |1 of the nuclear spin, one can form the density matrix | | |ψ ψ| | | and express it in the form The vector v = (α x , α y , α z ) then is a point on the unit sphere in three-dimensional space. Conversely, every point on the unit sphere corresponds to a pure state of the nuclear spin. The representation also works for "mixed" states, which correspond to points in the interior of the sphere. As a representation of spin states, the unit sphere is called the "Bloch sphere". Because quantum evolutions of a spin correspond to rotations of the Bloch sphere, this sphere is a useful tool for thinking about one-and sometimes about two-qubit processes. The yellow arrow represents a pure state | | |ψ for the qubit or nuclear spin-1 2 . The Euler angles are indicated and determine the state according to the formula | | |ψ = cos(θ/2)| | |0 + e iφ sin(θ/2)| | |1 . The red arrow along the z-axis indicates the orientation of the magnetic field and the vector for | | |0 . If we write the state as a density matrix ρ and expand it in terms of Pauli matrices, ρ = | | |ψ ψ| | | = (1l + xσ x + yσ y + zσ z )/2 then the coefficients (x, y, z) = (sin(θ) cos(φ), sin(θ) sin(φ), cos(θ)) of the Pauli matrices form the vector for the state. For a pure state this vector is on the surface of the unit sphere, and for a mixed state, it is inside the unit sphere. The Pauli matrices are associated with spin observables in the laboratory frame, so that all axes of the representation are meaningful with respect to real space.

One Qubit Gates
The second step for realizing QIP is to give a means for controlling the qubits so that quantum algorithms can be implemented. The qubits are controlled with carefully modulated external fields to realize specific unitary evolutions called "gates". Each such evolution can be described by a unitary operator applied to one or more qubits. The simplest method for demonstrating that sufficient control is available is to show how to realize a set of one-and two-qubit gates that is "universal" in the sense that in principle, every unitary operator can be implemented as a composition of gates [15,16,17]. One-qubit gates can be thought of as rotations of the Bloch sphere and can be implemented in NMR with electromagnetic pulses. In general, the effect of a magnetic field on a nuclear spin is to cause a rotation around the direction of the field. In terms of the quantum state of the spin, the effect is described by an internal Hamiltonian of the form H = (ω x σ x + ω y σ y + ω z σ z )/2. The coefficients of the Pauli matrices depend on the magnetic field according to ω = (ω x , ω y , ω z ) = −µB, where µ is the nuclear magnetic moment and B is the magnetic field vector. In terms of the Hamiltonian, the evolution of the spin's quantum state in the presence of the magnetic field B is therefore given by | | |ψ t = e −iHt | | |ψ 0 , so that the spin direction in the Bloch sphere rotates around ω with angular frequency ω = | ω|.
In the case of liquid-state NMR, there is an external, strong magnetic field along the z-axis and the applied electromagnetic pulses add to this field. One can think of these pulses as contributing a relatively weak magnetic field (typically less than .001 of the external field) whose orientation is in the xy-plane.
One use of such a pulse is to tip the nuclear spin from the z-axis to the xy-plane. To see how that can be done, assume that the spin starts in the state | | |0 , which points up along the z-axis in the Bloch sphere representation. Because this state is aligned with the external field, it does not precess. To tip the spin, one can start by applying a pulse field along the x-axis. Because the pulse field is weak compared to the external field, the net field is still almost along the z-axis. The spin now rotates around the net field. Because it started along z, it moves only in a small circle near the z-axis. To force the spin to tip further, one changes the orientation of the pulse field at the same frequency as the precession caused by the external field. This is called a "resonant" pulse. Because typical precession frequencies are hundreds of Mhz , such a pulse consists of radio-frequency (RF) electromagnetic fields.
To better understand how resonant pulses work, it is convenient to use the "rotating frame". In this frame, we imagine that our apparatus rotates at the precession frequency of the nuclear spin. In this way, the effect of the external field is removed. In particular, in the rotating frame the nuclear spin does not precess, and a resonant pulse's magnetic field looks like a constant magnetic field applied, for example, along the (−x)-axis of the rotating frame. The nuclear spin responds to the pulse by rotating around the x-axis as expected: If the spin starts along the z-axis, it tips toward the (−y)-axis, then goes to tthe (−z)-, the y-, and finally back to the z-axis, all in the rotating frame. See  An applied magnetic field along the rotating frame's (−x)-axis due to a resonant RF pulse moves the nuclear spin direction from the z-axis toward the (−y)-axis. The initial and final states for the nuclear spin are shown for a 90 • rotation. If the strength of the applied magnetic field is such that the spin evolves according to the Hamiltonian ω x σ x /2, then it has to be turned on for a time t = π/(2ω x ) to cause the rotation shown. The rotating frame makes it possible to define the state of the qubit realized by a nuclear spin as the state with respect to this frame. As a result, the qubit's state does not change unless RF pulses are applied. In the context of the qubit realized by a nuclear spin, the rotating frame is called the "logical frame". In the following, references to the Bloch sphere axes and associated observables are understood to be with respect to an appropriate, usually rotating, frame. Different frames can be chosen for each nuclear spin of interest, so we often use multiple independently rotating frames and refer each spin's state to the appropriate frame.
Use of the rotating frame together with RF pulses makes it possible to implement all one-qubit gates on a qubit realized by a spin-1 2 nucleus. To apply a rotation around the x-axis, a resonant RF pulse with effective field along the rotating frame's (−x)-axis is applied. This is called an "x-pulse", and x is the "axis" of the pulse. While the RF pulse is on, the qubit's state evolves as e −iωxσxt/2 . The strength (or "power") of the pulse is characterized by ω x , the "nutation" frequency. To implement a rotation by an angle of φ, the pulse is turned on for a period t = φ/ω x . Rotations around any axis in the plane can be implemented similarly. The angle of the pulse field with respect to the (−x)-axis is called the "phase" of the pulse. It is a fact that all rotations of the Bloch sphere can be decomposed into rotations around axes in the plane. For rotations around the z-axis, an easier technique is possible. The current absolute phase θ of the rotating frame's x-axis is given by θ 0 + ωt, where ω is the precession frequency of the nuclear spin.
Changing the angle θ 0 by −φ is equivalent to rotating the qubit's state by φ around the z-axis. In this sense, z-pulses can be implemented exactly. In practice, this change of the rotating frame's phase means that the absolute phases of future pulses must be shifted accordingly. This implementation of rotations around the z-axis is possible because phase control in modern equipment is extremely reliable so that errors in the phase of applied pulses are negligible compared to other sources of errors.
So far, we have considered just one nuclear spin in a molecule. But the RF fields are experienced by the other nuclear spins as well. This side-effect is a problem if only one "target" nuclear spin's state is to be rotated. There are two cases to consider depending on the precession frequencies of the other, "non-target" spins. Spins of nuclei of different isotopes, such as those of other species of atoms, usually have precession frequencies that differ from the target's by many Mhz at 11.7T . A pulse resonant for the target has little effect on such spins. This is because in the rotating frames of the non-target spins, the pulse's magnetic field is not constant but rotates rapidly. The power of a typical pulse is such that the effect during one rotation of the pulse's field direction is insignificant and averages to zero over many rotations. This is not the case for non-target spins of the same isotope. Although the variations in their chemical environments result in frequency differences, these differences are much smaller, often only a few kHz . The period of a 1kHz rotation is 1ms , whereas so-called "hard" RF pulses require only 10's of µs (.001ms ) to complete the typical 90 • or 180 • rotations. Consequently, in the rotating frame of a non-target spin with a small frequency difference, a hard RF pulse's magnetic field is nearly constant for the duration of the pulse. As a result, such a spin experiences a rotation similar to the one intended for the target. To rotate a specific nuclear spin or spins within a narrow range of precession frequencies, one can use weaker, longer-lasting "soft" pulses instead. This approach leads to the following strategies for applying pulses: To rotate all the nuclear spins of a given species (such as the two 13 C of TCE) by a desired angle, apply a hard RF pulse for as short a time as possible. To rotate just one spin having a distinct precession frequency, apply a soft RF pulse of sufficient duration to have little effect on other spins. The power of soft pulses is usually modulated in time ("shaped") to reduce the time needed for a rotation while minimizing "crosstalk", a term that describes unintended effects on other nuclear spins.

Two Qubit Gates
Two nuclear spins in a molecule interact with each other, as one would expect of two magnets. But the details of the spins' interaction are more complicated because they are mediated by the electrons. In liquid state, the interaction is also modulated by the rapid motions of the molecule. The resulting effective interaction is called the J-coupling. When the difference of the precession frequencies between the coupled nuclear spins is large compared to the strength of the coupling, it is a good approximation to write the coupling Hamiltonian as a product of the z-Pauli operators for each spin: . This is the "weak coupling" regime. With this Hamiltonian, an initial state | | |ψ 0 of two nuclear-spin qubits evolves as | | |ψ t = e −iCσz (1) σz (2) t | | |ψ 0 , where a different rotating frame is used for each nuclear spin to eliminate the spin's internal evolution. (The use of rotating frames is compatible with the coupling Hamiltonian because the Hamlitonian is invariant under frame rotations.) Because the Hamiltonian is diagonal in the logical basis, the effect of the coupling can be understood as an increase of the (signed) precession frequency of the second spin if the first one is up and a decrease if the first one is down (Fig. 5). The changes in precession frequency for adjacent nuclear spins in organic molecules are typically in the range of 20-200Hz . They are normally much smaller for non-adjacent nuclear spins. The strength of the coupling is called the "coupling constant" and is given as the change in the precession frequency. In terms of the constant C used above, the coupling constant is given by J = 2C/π in Hz . For example, the coupling constants in TCE are close to 100Hz between the two carbons, 200Hz between the proton and the adjacent carbon, and 9Hz between the proton and the far carbon. In the weak-coupling regime with a positive coupling constant, the coupling between two spins can be interpreted as an increase in precession frequency of the spin 2 when the spin 1 is "up" and a decrease when spin 1 is "down". The two diagrams depict the situation in which spin 2 is in the plane. The diagram on the left has spin 1 pointing up along the z axis. In the rotating frame of spin 2, it precesses from the x-axis to the y-axis. The diagram on the right has spin 1 pointing down, causing a precession in the opposite direction of spin 2. Note that neither the coupling nor the external field change the orientation of a spin pointing up or down along the z-axis.
The J-coupling and the one-qubit pulses suffice for realizing the controlled-not operation usually taken as one of the fundamental gates of QIP. A pulse sequence for implementing the controlled-not in terms of the J-coupling constitutes the first quantum algorithm of Sect. 3. A problem with the J-coupling in liquid-state NMR is that it cannot be turned off when it is not needed for implementing a gate.

Turning off the J-Coupling
The coupling between the nuclear spins in a molecule cannot be physically turned off. But for QIP, we need to be able to maintain a state in memory and to couple qubits selectively. Fortunately, NMR spectroscopists solved this problem well before the development of modern quantum information concepts. The idea is to use the control of single spins to cancel the interaction's effect over a given period. This technique is called refocusing and requires applying a 180 • pulse to one of two coupled spins at the midpoint of the desired period. To understand how refocusing works, consider again the visualization of Fig. 5. A general state is in a superposition of the four logical states of the two spins. By linearity, it suffices to consider the evolution with spin 1 being in one of its two logical states, up or down, along the z-axis. Suppose we wish to remove the effects of the coupling over a period of 2ms . To do so, wait 1ms . In a sequence of pulses, this waiting period is called a 1ms "delay". The effect on spin 2 in its rotating frame is to precess counterclockwise if spin 1 is up, and clockwise for the same angle if spin 1 is down. Now, apply a pulse that rotates spin 1 by 180 • around the x-axis. This is called an "inversion", or in the current context, a "refocusing" pulse. It exchanges the up and down states. For the next 1ms , the effect of the coupling on spin 2 is to undo the earlier rotation. At the end of the second 1ms delay, one can apply another 180 • pulse to reverse the inversion and recover the initial state. The pulse sequence is depicted in Fig. 6. Pulses are applied to spin 1 only, as indicated by the rectangular rises in RF power at 1ms and 2ms . The axis for each pulse is given with the pulse. The angle is determined by the area under the pulse and is also given explicitly. Ideally for pulses of this type, the pulse times (the widths of the rectangles) should be zero. In practice, for hard pulses, they can be as small as ≈ .01ms . Any σ z (1) σ z (2) coupling's effect is refocused by the sequence shown, so that the final state of the two spins is the same as the initial state. The axis for the pair of refocusing pulses can be changed to any other axis in the plane.
Turning off couplings between more than two nuclear spins can be quite complicated unless one takes advantage of the fact that non-adjacent nuclear spins tend to be relatively weakly coupled. Methods that scale polynomially with the number of nuclear spins and that can be used to selectively couple pairs of nuclear spins can be found in [18,19]. These techniques can be used in other physical systems where couplings exist that are difficult to turn off directly. An example is qubits represented by the state of one or more electrons in tightly packed quantum dots.

Measurement
To determine the "answer" of a quantum computation it is necessary to make a measurement. As noted earlier, the technology for making a projective measurement of individual nuclear spins does not yet exist. In liquid-state NMR, instead of using just one molecule to define a single quantum register, we use a large ensemble of molecules in a test tube. Ideally, their nuclear spins are all placed in the same initial state, and the subsequent RF pulses affect each molecule in the same way. As a result, weak magnetic signals from (say) the proton spins in TCE add to form a detectable magnetic field called the "bulk magnetization". The signal that is measured in high-field NMR is the magnetization in the xy-plane, which can be picked up by coils whose axes are placed transversely to the external field. Because the interaction of any given nuclear spin with the coil is very weak, the effect of the coil on the quantum state of the spins is negligible in most NMR experiments. As a result, it is a good approximation to think of the generated magnetic fields and their detection classically. In this approximation, each nuclear spin behaves like a tiny bar magnet and contributes to the bulk magnetization. As the nuclear spins precess, so does the magnetization. As a result, an oscillating current is induced in the coil, provided it is electronically configured to be "tuned" to the precession frequency. By observing the amplitude and phase of this current over time, we can keep track of the absolute magnetization in the plane and its phase with respect to the rotating frame. This process yields information about the qubit states represented by the state of the nuclear spins.
To see how one can use the bulk magnetization to learn about the qubit states, consider the TCE molecule with three spin-1 2 nuclei used for information processing. The bulk magnetizations generated by the protons and the carbons precess at 500Mhz and 125Mhz , respectively. The proton and carbon contributions to the magnetization are detected separately with two coils tuned to 500Mhz (proton magnetization) and 125Mhz (carbon magnetization). For simplicity, we restrict our attention to the two carbons and assume that the protons are not interacting with the carbons. (It is possible to actively remove such interactions by using a technique called "decoupling".) At the end of a computation, the qubit state of the two nuclear spins is given by a density matrix ρ q . We can assume that this state is the same for each molecule of TCE in the sample. As we mentioned earlier, the density matrix is relative to logical frames for each nuclear spin. The current phases for the two logical frames with respect to a rotating reference frame at the precession frequency of the first carbon are known. If we learn something about the state in the reference frame, that information can be converted to the desired logical frame by a rotation around the z-axis. Let ρ(0) be the state of the two nuclear spins in the reference frame. In this frame, the state evolves in time as ρ(t) according to a Hamiltonian H that consists of a chemical shift term for the difference in the precession frequency of the second carbon and of a coupling term. To a good approximation, The magnetization detected in the reference x-direction at time t is given by where tr(σ) denotes the trace, that is, the sum of the diagonal elements of the matrix σ. Eq. 5 links the magnetization to the Bloch sphere representation. The constant of proportionality m depends on the size of the ensemble and the magnetic moments of the nuclei. From the point of view of NMR, m determines a scale whose absolute size is not relevant. What matters is how strong this signal is compared to the noise in the system. For the purpose of the following discussion, we set m = 1.
We can also detect the magnetization M y (t) in the y-direction and combine it with M x (t) to form a complex number representing the planar magnetization.
where we defined σ + = σ x + iσ y = 0 2 0 0 . What can we infer about ρ(0) from observing M(t) over time? For the moment, we neglect the coupling Hamiltonian. Under the chemical shift Hamiltonian by multiplying the matrices, because the trace is linear.
Thus the signal is a combination of a constant signal given by the first spin's contribution to the magnetization in the plane, and a signal oscillating with a frequency of 900Hz with amplitude given by the second spin's contribution to the planar magnetization. The two contributions can be separated by Fourier transforming M(t), which results in two distinct peaks, one at 0Hz and a second at 900Hz . See Fig. 7. The initial spin directions are along the x-axis. The signal (called the "free induction decay") decays with a halftime of 0.0385s because of simulated relaxation processes. Typically, the halftimes are much longer. A short one was chosen to broaden the peaks for visual effect. (b) This shows the spectrum for the signal in (a), that is, the Fourier transform of the combined xand y-magnetization. The spectrum has peaks at frequencies of 0Hz (spin 1's peak) and 900Hz (spin 2's peak) because of the independently precessing pair of spins. (c) This is the x-magnetization signal when the two spins are coupled as described in the text. (d) This shows the spectrum for the signal in (c) obtained from the combined xand y-magnetization. Each spin's peak from the previous spectrum "splits" into two. The left and right peaks of each pair are associated with the other spin being in the state | | |1 and | | |0 , respectively. The vertical axis units are relative intensity with the same constant of proportionality for the two spectra.
To see how the coupling affects the observed magnetization, we rewrite the expression for M(t) to take advantage of the fact that the up/down states are invariant under the full Hamiltonian.
where e ↑ = 1 0 0 0 and e ↓ = 0 0 0 1 . Using a similar calculation to the one leading to Eq. 8, the first term can be written as and similarly for the second term, but with an offset frequency of 900Hz because of the chemical shift. It can be seen that the zero-frequency signal splits into two signals with frequencies of −50Hz and 50Hz , respectively. The difference between the two frequencies is the coupling constant. The amplitudes of the different frequency signals can be used to infer the expectations of operators such as σ + (1) e ↑ (2) , given by tr 2) . For n spin-1 2 nuclei, the spectral peak of a nucleus splits into a group of 2 n−1 peaks, each associated with operators like σ + (a) e ↑ (b) e ↓ (c) e ↓ (d) . . .. Fig. 12 shows a simulated peak group for a nuclear spin coupled to three other spins. Expectations of the single spin operators σ x (a) and σ y (a) can be obtained from the real and imaginary parts of the total signal in a peak group for a nucleus. The positions of the 2 n−1 peaks depend on the couplings. If the peaks are all well separated, we can infer expectations of product operators with only one σ x or σ y , such as σ x (a) σ z (b) 1l (c) σ z (d) by taking linear combinations with appropriate coefficients of the peak amplitudes in a peak group.
In addition to the unitary evolution due to the internal Hamiltonian, relaxation processes tend to decay ρ(t) toward the equilibrium state. In liquid state, the equilibrium state ρ thermal is close to 1l/N where N is the total dimension of the state space. The difference between ρ thermal and 1l/N is the equilibrium "deviation" density matrix and has magnetization only along the z-axis (see Sect. 2.6). Because the only observed magnetization is planar, the observed signal decays to zero as the state relaxes to equilibrium. To a good approximation we can write where ρ ′ (t) has trace zero and evolves unitarily under the Hamiltonian. The effect of the relaxation process is that M(t) has an exponentially decaying envelope, explaining the conventional name for M(t), namely, the "free induction decay" (FID). Typical half-times for the decay are .1s to 2s for nuclear spins used for QIP. A normal NMR observation consists of measuring M(t) at discrete time intervals until the signal is too small. The acquired FID is then Fourier transformed to visualize the amplitudes of the different frequency contributions. The shape of the peaks in Fig. 7 reflects the decay envelope. The width of the peaks is proportional to the decay rate λ.
For QIP, we wish to measure the probability p that a given qubit, say the first, labeled 1, is in the state | | |1 1 . We have 1 − 2p = tr(ρσ z (1) ), which is the expectation of σ z (1) . One can measure this expectation by first applying a 90 • y-pulse to qubit 1, thus changing the state to ρ ′ . This pulse has the effect of rotating initial, unobservable z-magnetization to observable x-magnetization. From M(t) one can then infer tr(ρ ′ σ x (1) ), which is the desired number. For the coupled pair of carbons, tr(ρ ′ σ x (1) ) is given by the sum of the real components of the amplitudes of the 50Hz and the −50Hz contributions to M(t). However, the problem is that these amplitudes are determined only up to a scale. A second problem is that the available states ρ are highly mixed (close to 1l/N). The next section discusses how to compensate for both problems.
As a final comment on NMR measurement, note that the "back reaction" on the nuclear spins due to the emission of electromagnetic energy is weak. This is what enables us to measure the bulk magnetization over some time. The ensemble nature of the system gives us direct, if noisy, access to expectations of observables such as σ z , rather than a single answer-0 or 1. For algorithms that provide a definite answer, having access only to expectations is not a problem, because it is easy to distinguish the answer from the noise. However, using expectations can increase the need for quantum resources. For example, Shor's factoring algorithm includes a significant amount of classical post-processing based on highly random answers from projective measurements. In order to implement the algorithm in an ensemble setting, the post-processing must be performed reversibly and integrated into the quantum computation to guarantee a definite answer. This post-processing can be done with polynomial additional quantum resources.

The Initial State
Because the energy difference between the nuclear spins' up and down states is so small compared to room temperature, the equilibrium distribution of states is nearly random. In the liquid samples used, equilibrium is established after 10s -40s if no RF fields are being applied. As a result, all computations start with the sample in equilibrium. One way to think of this initial state is that every nuclear spin in each molecule begins in the highly mixed state (1 − ǫ)1l/2 + ǫ| | |0 0| | |, where ǫ is a small number (of the order of 10 −5 ). This is a nearly random state with a small excess of the state | | |0 . The expression for the initial state derives from the fact that the equilibrium state ρ thermal is proportional to e −H/kT , where H is the internal Hamiltonian of the nuclear spins in a molecule (in energy units), T is the temperature and k is the Boltzman constant. In our case, H/kT is very small and the coupling terms are negligible. Therefore where ǫ l is half of the energy difference between the up and down states of the l'th nuclear spin. Clearly the available initial state is very far from what is needed for standard QIP. However, it can still be used to perform interesting computations. The main technique is to use available NMR tools to change the initial state to a "pseudopure" state, which for all practical purposes behaves like the initial state required by QIP. The technique is based on three key observations. First, only the trace-less part of the density matrix contributes to the magnetization. Suppose that we are using n spin-1 2 nuclei in a molecule and the density matrix is ρ. Then the current magnetization is proportional to tr(ρm), wherem is a traceless operator (see Eq. 9). Therefore the magnetization does not depend on the part of ρ proportional to the identity matrix. A "deviation density matrix" for ρ is any matrix δ such that δ − ρ = λ1l for some λ.
The second observation is that all the unitary operations used, as well as the non-unitary ones to be discussed below, preserve the completely mixed state 1l/2 n . 1 Therefore, all future observations of magnetization depend only on the initial deviation.
The third observation is that all the scales are relative. In particular, as will be explained, the probability that the final answer of a quantum computation is 1 can be expressed as the ratio of two magnetizations. It follows that one can arbitrarily rescale a deviation density matrix. For measurement, the absolute size of the magnetizations is not important; the most important issue is that the magnetizations are strong enough to be observable over the noise.
To explain the relativity of the scales and introduce "pseudopure" states for QIP, we begin with one spin-1 2 qubit. Its equilibrium state has as a deviation δ = ǫ| | |0 0| | |. If U is the total unitary operator associated with a computation, then δ is transformed to δ ′ = ǫU| | |0 0| | |U † . For QIP purposes, the goal is to determine what the final probability p 1 of measuring | | |1 is, given that | | |0 is the initial state. This probability can be computed as follows: Thus, the probability can be determined by measuring the expectations of σ z for the initial and final states (in different experiments), which yields the quantities a = tr(δσ z ) = ǫ and a ′ = tr(δ ′ σ z ) = ǫ tr U| | |0 0| | |U † σ z , respectively. The desired answer is p 1 = (1 − (a/a ′ ))/2 and does not depend on the scale ǫ. The method presented in the previous paragraph for determining the probability that the answer of a quantum computation is 1 generalizes to many qubits. The goal is to determine the probability p 1 of measuring | | |1 1 in a measurement of the first qubit after a computation with initial state | | |0 . . . 0 . Suppose we can prepare the spins in an initial state with deviation δ = ǫ| | |0 . . . 0 0 . . . 0| | |. A measurement of the expectations a and a ′ of σ z (1) for the initial and final states then yields p 1 as before, by the formula p 1 = (1 − (a/a ′ ))/2.
A state with deviation ǫ| | |ψ ψ| | | is called a "pseudopure" state, because this deviation is proportional to the deviation of the pure state | | |ψ ψ| | |. With respect to scale-independent NMR observations and unitary evolution, a pseudopure state is equivalent to the corresponding pure state. Because NMR QIP methods are scale independent, we now generalize the definition of deviation density matrix: δ is a deviation of the density matrix ρ if ǫδ = ρ + λ1l for some λ and ǫ.
Among the most important enabling techniques in NMR QIP are the methods that can be used to transform the initial thermal equilibrium state to a standard pseudopure state with deviation | | |0 . . . 0 0 . . . 0| | |. An example of how that can be done will be given as the second algorithm in Sect. 3. The basic principle for each method is to create, directly or indirectly by summing over multiple experiments, a new initial state as a sum ρ 0 = i U i ρ thermal U † i , where the U i are carefully and sometimes randomly chosen [10,11,20,21] to ensure that ρ 0 has a standard pseudopure deviation. Among the most useful tools for realizing such sums are pulsed gradient fields.

Gradient Fields
Modern NMR spectrometers are equipped with the capability of applying a magnetic field gradient in any direction for a chosen, brief amount of time. If the direction is along the sample's z-axis, then while the gradient is on, the field varies as B(z) = B 0 + γzB 1 , where B 0 is the strong, external field and B 1 is the gradient power. As a result of this gradient, the precession frequency of nuclear spins depends on their positions' z-coordinates. One of the most important applications of gradients is NMR imaging because gradients make it possible to distinguish different parts of the sample.
The effect of applying a z-gradient can be visualized for the situation in which there is only one observable nuclear spin per molecule. Suppose that the initial deviation density matrix of each nuclear spin is σ x in the rotating frame. After a gradient pulse of duration t, the deviation of a nuclear spin at position z is given by e −iσzνzt/2 σ x e iσz νzt/2 = cos(νzt)σ x + sin(νzt)σ y , where the constant ν depends linearly on the strength of the gradient and the magnetic moment of the nucleus. See Fig. 8. The effect of the gradient is a z-dependent change in phase. The coil used to measure planar magnetization integrates the contribution to the magnetization of all the nuclei in the neighborhood of the coil. Assuming a coil equally sensitive over the interval between −a and a along the sample's z-axis, the observed total x-magnetization is: For large values of νt, M x ≃ 0. In general, a sufficiently powerful gradient pulse eliminates the planar magnetization. Effect of a pulsed gradient field along the z axis in the rotating frame. Initial x-magnetization is assumed. A spin at z = 0 is not affected, but the ones above and below are rotated by an amount proportional to z. As a result, the local planar magnetization follows a spiral curve.
Interestingly, the effect of a gradient pulse can be reversed if an opposite gradient pulse is applied for the same amount of time. This effect is called a "gradient echo". The reversal only works if the second pulse is applied sufficiently soon. Otherwise, diffusion randomizes the molecules' positions along the gradient's direction before the second pulse. If the positions are randomized, then the phase change from the second pulse is no longer correlated with that from the first for any given molecule. The loss of memory of the phase change from a gradient pulse can be fine-tuned by variations in the delay between the two pulses in a gradient echo sequence. This method can be used for applying a controllable amount of phase noise, which is useful for investigating the effects of noise and the ability to correct for noise in QIP.
If the gradient pulse is not reversed and the memory of the phase changes is lost, then the pulse's effect can be described as an irreversible operation on the state of the nuclear spin. If the initial state of the nuclear spin in each molecule is ρ, then after the gradient pulse, the spin state of a molecule at position z is given by ρ(z) = e −iσzνzt/2 ρe iσz νzt/2 . Suppose that the positions of the molecules are randomized over the region that the coil is sensitive to. Now it is no longer possible to tell where a given molecule was when the gradient pulse was applied. As a result, as far as our observations are concerned, the state of a molecule is given by ρ(z), where z is random. In other words, the state is indistinguishable from Thus the effect of the gradient pulse is equivalent to the operation ρ → ρ ′ as defined by the above equation. This is an operation of the type mentioned at the end of the previous section and can be used for making states such as pseudopure states. Note that after the gradients have been turned off, nuclei at different positions cannot be distinguished by the measurement coil. It is therefore not necessary to wait for the molecules' positions to be randomized. So far we have described the effects of gradient pulses on isolated nuclear spins in a molecule. In order to restrict the effect to a single nuclear spin in a molecule, one can invert the other spins between a pair of identical gradient pulses in the same direction. This technique refocuses the gradient for the inverted spins. An example of how effects involving multiple nuclear spins can be exploited is the algorithm for pseudopure state preparation described in Sect. 3.2.

Examples of Quantum Algorithms for NMR
We give three examples of algorithms for NMR QIP. The first example is an NMR implementation of the controlled-not gate. The second consists of a procedure for preparing a type of pseudopure state. And the last shows how NMR can be used to investigate the behavior of simple error-correction procedures. The first two examples are fundamental to QIP with NMR. Realizations of the controlled-not are needed to translate standard quantum algorithms into the language of NMR, and procedures for making pseudopure states have to precede the implementation of many quantum algorithms.

The Controlled-not
One of the standard gates used in quantum algorithms is the controlled-not. The controlled-not gate (cnot) acts on two qubits. The action of cnot can be described by "if the first qubit is | | |1 , then flip the second qubit." Consequently, the effect of cnot on the logical states is given by the mapping As an operator, the controlled-not is given by The goal is to derive a sequence of NMR operations that realize the controlled-not. As discussed in Sect. 2, the unitary operations that are implementable by simple NMR techniques are rotations e −iσu (a) θ/2 by θ around the u-axis, where u is any direction in the plane (RF pulses), and the two-qubit operations e −iσz (b) σz (c) φ/2 (the J-coupling). We call e −iσz (b) σz (c) φ/2 a rotation by φ around σ z (b) σ z (c) . This terminology reflects the fact that such rotations and their effects on deviation density matrices can be understood by a generalization of the Bloch sphere picture called the "product operator formalism" introduced by O. Sörensen et al. [22].
To implement the controlled-not using NMR techniques one can decompose the gate into a sequence of 90 • rotations around the main axes on each of the two qubits, and a 90 • rotation around σ z (1) σ z (2) . One way to find a decomposition is to first realize that the two-qubit 90 • rotation e −iσz (1) σz (2) π/4 is equivalent to a combination of two gates, each conditional on the logical state of qubit 1. The first gate applies a 90 • rotation around the z-axis (e −iσz (2) π/4 ) to qubit 2 conditional on qubit 1's state being | | |0 1 . The second applies the −90 • rotation e iσz (2) π/4 to qubit 2 conditional on qubit 1's state being | | |1 1 . By following the two-qubit rotation with a −90 • rotation around z-axis (e iσz (2) π/4 ) on qubit 2, the total effect is to cancel the rotation if qubit 1 is in state | | |0 1 ; if qubit 1 is in state | | |1 1 , the rotations add to a −180 • rotation e iσz (2) π/2 = iσ z (2) on qubit 2. If we precede this sequence with e −iσy (2) π/4 and follow it by e iσy (2) π/4 (this operation is called "conjugating" by a −90 • y-rotation), then the overall effect is a conditional −iσ x (2) operation. Note how the conjugation rotated the operation's axis according to the Bloch sphere rules. The controlled-not is obtained by eliminating the −i with a 90 • z-rotation on qubit 1. That is, the effect of the complete sequence is e −iπ/4 | | |0 , which is the controlled-not up to a global phase. The decomposition thus obtained can be represented as a quantum network with rotation gates as shown in Fig. 9. The corresponding NMR pulse sequence implementation is shown in Fig. 10. The pulses are shown using the representation introduced in Fig. 6. The z-pulses (shown in green) are "virtual", requiring only a change of reference frame. The placement of the z-pulses between the RF pulses is immaterial, because they commute with the coupling that evolves in between. The delay between the two RF pulses is 1/(2J) (5ms if J = 100Hz ), which realizes the desired two-qubit rotation by internal evolution. The −90 • y-rotation is actually implemented with a 90 • pulse with axis −y. The resulting rotation has the desired effect up to a global phase. The pulse widths are exaggerated and should be as short as possible to avoid errors due to coupling evolution during the RF pulses. Alternatively, techniques can be used that compensate for some of these errors [23].
The effect of the NMR pulse sequence that implements the controlled-not can be visualized for logical initial states with the help of the Bloch-sphere representation of the states. Such a visualization is shown for two initial states in Fig. 11. The effects of the pulse sequence for the controlled-not can be shown with the Bloch sphere as in Fig. 11 only if the intermediate states are products of states on each qubit. Things are no longer so simple if the initial state of the spins is 1 √ 2 (| | |0 + | | |1 ) | | |0 = 1 √ 2 (| | |00 + | | |10 ), for example. This is representable as spin 1's arrow pointing along the x-axis, but the J-coupling leads to a superposition of states (a maximally entangled state) no longer representable by a simple combination of arrows in the Bloch sphere.

Creating a Labeled Pseudopure State
One way to realize the standard pseudopure state starting from the equilibrium density matrix ρ thermal is to eliminate the observable contributions due to terms of ρ thermal different from | | |0 . . . 0 0 . . . 0| | |. There are several different methods of accomplishing this. For example, one can perform multiple experiments with different pre-processing of the equilibrium state so that signals from unwanted terms average to zero (temporal averaging). Or one can use gradients to remove the unwanted terms in one experiment (spatial averaging).
In this section, we show how to use spatial averaging to prepare a so-called "labeled" pseudopure state on two nuclear spins. In general, instead of preparing the standard pseudopure state with deviation | | |0 . . . 0 . . .| | | on n spin-1 2 nuclei, one can prepare a "labeled" pseudopure state with deviation σ x (1) | | |0 . . . 0 . . .| | | on n + 1 spins. This state is easily recognizable with an NMR observation of the first spin: Assuming that all the peaks arising from couplings to other spins are resolved, the first spin's peak group has 2 n peaks corresponding to which logical states the other spins are in. If the current state is the above labeled pseudopure state, then all the other spins are in the logical state | | |0 , which implies that in the spectrum, only one of the peaks of the first spin's peak group is visible. See Fig. 12.  Relationship of a labeled pseudopure state spectrum to a peak group. The top spectrum shows the peak group of a simulated nuclear spin coupled to three other spins with coupling constants of 100Hz , 60Hz , and 24Hz . The simulation parameters are the same as in Fig. 7. Given above each peak is the part of the initial deviation that contributes to the peak. The spin labels have been omitted. Each contributing deviation consists of σ x on the observed nucleus followed by one of the logical (up or down) states (density matrices) for each of the other spins. The notation is as defined after Eq. 9. The bottom spectrum shows what is observed if the initial deviation is the standard labeled pseudopure state. This state contributes only to the right-most peak, as this peak is associated with the logical | | |0 states on the spins not observed.
The labeled pseudopure state can be used as a standard pseudopure state on n qubits. Observation of the final answer of a computation is possible by observing spin 1, provided that the coupling to the answer-containing spin is sufficiently strong for the peaks corresponding to its two logical states to be well separated. For this purpose, the couplings to the other spins need not be resolved in the peak group. Specifically, to determine the answer of a computation, the peaks of the peak group of spin 1 are separated into two subgroups, the first (second) containing the peaks associated with the answer-containing spin being in state | | |0 (| | |1 ), respectively. Comparing the total signal in each of the two peak subgroups gives the relative probabilities of the two answers (0 or 1).
The labeled pseudopure state can also be used to investigate the effect of a process that manipulates the state of one qubit and requires n additional initialized qubits. Examples include experimental verification of one-qubit error-correcting codes as explained in Sect. 3.3.
For preparing the two-qubit labeled pseudopure state, consider the two carbon nuclei in labeled TCE with the proton spin decoupled so that its effect can be ignored. A "transition" in the density matrix for this system is an element of the density matrix of the form | | |ab cd| | |, where a, b, c, and d are 0 or 1. Let ∆(ab, cd) = (a − c) + (b − d), where in the expression on the right, a, b, c, and d are interpreted as the numbers 0 or 1 as appropriate. Applying a pulsed gradient along the z-axis evolves the transitions according to: | | |ab cd| | | → e i∆(ab,cd)νz | | |ab cd| | |, where ν is proportional to the product of the gradient power and pulse time, and z is the molecule's position along the z-coordinate. For example, | | |01 10| | | has ∆ = 0 and is not affected, whereas | | |00 11| | | acquires a phase of e −i2νz . There are only two transitions, | | |00 11| | | and | | |11 00| | |, whose acquired phase has a rate of ∆ = ±2 along the z axis. These transitions are called "two-coherences". The idea is to first recognize that these transitions can be used to define a labeled pseudopure "cat" state (see below), then to exploit the two-coherences' unique behavior under the gradient in order to extract the pseudopure cat state, and finally to "decode" to a standard labeled pseudopure state. Note that the property that two-coherences' phases evolve at twice the basic rate is a uniquely quantum phenomenon for two spins. No such effect is observed for a pair of classical spins.
The standard two-qubit labeled pseudopure state's deviation can be written as . We can consider other deviations of this form where the two Pauli operators are replaced by a pair of different, commuting products of Pauli operators. An example is where we replaced σ x (1) by σ x (1) σ x (2) and σ z (2) by σ z (1) σ z (2) , and as announced, the two Pauli products commute. We will show that there is a simple sequence of 90 • rotations whose effect is to "decode" the deviations σ x (1) σ x (2) → σ x (1) and σ z (1) σ z (2) → σ z (2) , thus converting the state ρ catx to ρ stdx . The state ρ catx can be expressed in terms of the transitions as follows: It can be seen that ρ catx consists only of two-coherences. Another such state is Suppose that one can create a state that has a deviation of the form ρ = αρ catx + βρ rest such that ρ rest contains no two-coherences or zero-coherences. After a gradient pulse is applied, the state becomes α cos(2νz)ρ catx + sin(2νz)ρ caty + βρ rest (z), where ρ rest (z) depends periodically on z with spatial frequencies of ±ν, not ±2ν or 0. We can then decode this state to If one now applies a gradient pulse of twice the total strength and opposite orientation, the first term is restored to αρ stdx , but the second term retains non-zero periodicities along z. Thus, if we no longer use any operations to distinguish among different molecules along the z-axis, or if we let diffusion erase the memory of the position along z, then the second term is eliminated from observability by being averaged to zero. The desired labeled pseudopure state is obtained. Zero-coherences during the initial gradient pulse are acceptable provided that the decoding transfers them to coherences different from zero or two during the final pulse in order to ensure that they also average to zero. A pulse sequence that realizes a version of the above procedure is shown in Fig. 13.
FIG. 13: Quantum network and pulse sequence to realize a two-qubit labeled pseudopure state. The network is shown above the pulse sequence realizing it. A coupling constant of 100Hz is assumed. Gradients are indicated by spirals in the network. The gradient strength is given as the red line in the pulse sequence. The doubling of the integrated gradient strength required to achieve the desired "echo" is indicated by a doubling of the gradient pulse time. The numbers above the quantum network are checkpoints used in the discussion below. The input state's deviation is assumed to be σ z (1) . This deviation can be obtained from the equilibrium state by applying a 90 • rotation to spin 2 followed by a gradient pulse along another axis to remove σ z (2) . Instead of using a gradient pulse, one can use phase cycling, which involves performing two experiments, the second having the sign of the phase in the first y pulse changed, and then subtracting the measured signals.
We can follow what happens to an initial deviation density matrix of σ z (1) as the network of Fig. 13 is executed. We use product operators with the abbreviations I = 1l, X = σ x , Y = σ y , Z = σ z , and, for example XY = σ x (1) σ y (2) . At the checkpoints indicated in the figure the deviations are the following Except for a sign, the desired state is obtained. The right-most term is eliminated after integrating over the sample, or after diffusion erases memory of z.
This method for making a two-qubit labeled pseudopure state can be extended to arbitrarily many (n) qubits with the help of the two n-coherences, which are the transitions with ∆ = ±n. An experiment implementing this method can be used to determine how good the available quantum control is. The quality of the control is determined by a comparison of two spectral signals: I p , the intensity of the single peak that shows up in the peak group for spin 1 when observing the labeled pseudopure state; and I 0 , the intensity of the same peak in an observation of the initial deviation after applying a 90 • pulse to rotate σ z (1) into the plane. We performed this experiment on a seven-spin system and determined that I p /I 0 = .73 ± .02. This result implies a total error of 27 ± 2%. Because the implementation has 12 two-qubit gates, an error rate of about 2% per two-qubit gate is achievable for nuclear spins in this setting [23].

Quantum Error Correction for Phase Errors
Currently envisaged scalable quantum computers require the use of quantum error correction to enable relatively error-free computation on a platform of physical systems that are inherently error-prone. For this reason, some of the most commonly used "subroutines" in quantum computers will be associated with maintaining information in encoded forms. This observation motivates experimental realizations of quantum error-correction to determine whether adequate control can be achieved in order to implement these subroutines and to see in a practical setting that error-correction has the desired effects. Experiments to date have included realizations of a version of the three-qubit repetition code [24] and of the fivequbit one-error-correcting code (the shortest possible such code) [25]. In this section, we discuss the experimental implementation of the former.
In NMR, one of the primary sources of error is phase decoherence of the nuclear spins due to both systematic and random fluctuations in the field along the z-axis. At the same time, using gradient pulses and diffusion, phase decoherence is readily induced artificially and in a controlled way. The three-bit quantum repetition code (see [26]) can be adapted to protect against phase errors to first order. Define The code we want is defined by the logical states It is readily seen that the three one-qubit phase errors, σ z (1) , σ z (2) , σ z (3) and "no error" (1l) unitarily map the code to orthogonal subspaces. It follows that this set of errors is correctable. See the introduction to quantum error-correction [26]. The simplest way to use this code is to encode one qubit's state into it, wait for some errors to happen, and then decode to an output qubit. Success is indicated by the output qubit's state being significantly closer to the input qubit's state after error correction. Without errors between encoding and decoding, the output state should be the same as the input state, provided that the encoding and decoding procedures are implemented perfectly. Therefore, in this case, the experimentally determined difference between input and output gives a measurement of how well the procedures were implemented.
To obtain the phase-correcting repetition code from the standard repetition code, Hadamard transforms or 90 • y-rotations are applied to each qubit. The quantum network shown in Fig. 14 was obtained in this fashion from the network given in [26].
14: Quantum network for the three-qubit phase-error-correcting repetition code. The bottom qubit is encoded with two controlled-nots and three y-rotations. In the experiment, either physical or controlled noise is allowed to act. The encoded information is then decoded. For the present purposes, it is convenient to separate the decoding procedures into two steps: The first is the inverse of the encoding procedure, the second consists of a Toffoli gate that uses the error information in the syndrome qubits (the top two) to restore the encoded information. The Toffoli gate in the last step flips the output qubit conditionally on the syndrome qubits' state being | | |11 . This gate can be realized with NMR-pulses and delays by using more sophisticated versions of the implementation of the controlled-not. The syndrome qubits can be "dumped" at the end of the procedure. The behavior of the network is shown for a generic state in which the bottom qubit experiences a σ z error. See also [26].
To determine the behavior and the quality of the implementation for various σ z -error models in an actual NMR realization, one can use as initial states labeled pseudopure states with deviations σ u | | |00 00| | | for u = x, y, z. Without error, the total output signal on spin 1 along σ u for each u should be the same as the input signal. Some of the data reported in [24] is shown in Fig. 15. (1 + f x + f y + f z ). The reduction from 1 of the green bars (showing fidelity for the full procedure) is due to errors in our implementation of the pulses and from relaxation processes. The red bars are the fidelity for the output before the last error-correction step, and they contain the effects of the errors. The main graph shows the fidelities for the physical relaxation process. Here, the evolution consisted of a delay varying up to 1000ms . The red curve is the fidelity of the output qubit before the final Toffoli gate that corrects the errors based on the syndrome. The green curve is the fidelity of the output after the Toffoli gate. The effect of error-correction can be seen by a significant flattening of the curve because correction of first-order (that is, single) phase errors implies that residual, uncorrected (that is, double or triple) phase errors increase quadratically in time. The green curve starts lower than the red one because of additional errors incurred by the implementation of the the Toffoli gate. The dashed curves are obtained by simulation using estimated phase relaxation rates with half times of 2s (proton), 0.76s (first carbon) and 0.42s (second carbon). Errors in the data points are approximately 0.05. The molecule used was TCE. For a more thorough implementation and analysis of a three-qubit phase-error correcting code, see [27].
Work on benchmarking error-control methods using liquid-state NMR is continuing. Other experiments include the implementation of a two-qubit code with an application to phase-errors [28] and the verification of the shortest non-trivial noiseless subsystem on three qubits [29]. The latter demonstrates that for some physically realistic noise models, it is possible to store quantum information in such a way that it is completely unaffected by the noise.

Overview of Contributions to QIP
Important issues in current experimental efforts toward realizing QIP are to find ways of achieving the necessary quantum control and to determine whether sufficiently low error-rates are possible. Liquid-state NMR is the only extant system (as of 2002) with the ability to realize relatively universal manipulations on more than two qubits (restricted control has been demonstrated in four ions [30]). For this reason, NMR serves as a useful platform for developing and experimentally verifying techniques for QIP and for establishing simple procedures for benchmarking information processing tasks. The "cat-state" and the various error-correction benchmarks [23,25] consist of a set of quantum control steps and measurement procedures that can be used with any general-purpose QIP system to determine, in a device independent way, the degree of control achieved. The demonstration of error rates in the few percent per non-trivial operation is encouraging. For existing and proposed experimental systems other than NMR, achieving such error rates is still a great challenge.
Prior research in NMR, independent of quantum information, has proved to be a rich source of basic quantum control techniques useful for physically realizing quantum information in other settings. We mention four examples. The first is the development of sophisticated shaped-pulse techniques that can selectively control transitions or spins while being robust against typical errors. These techniques are finding applications to quantum control involving laser pulses [31] and are likely to be very useful when using coherent light to accurately control transitions in atoms or quantum dots, for example. The second is the recognition that there are simple ways in which imperfect pulses can be combined to eliminate systematic errors such as those associated with miscalibration of power or side-effects on off-resonant nuclear spins. Although many of these techniques were originally developed for such problems as accurate inversion of spins, they are readily generalized to other quantum gates [32,33]. The third example is decoupling used to reduce unwanted external interactions. For example, a common problem in NMR is to eliminate the interactions between proton and labeled carbon nuclear spins to observe "decoupled" carbon spins. In this case, the protons constitute an external system with an unwanted interaction. To eliminate the interaction, it is sufficient to invert the protons frequently. Sophisticated techniques for ensuring that the interactions are effectively turned off independent of pulse errors have been developed (See, for example, [5]). These techniques have been greatly generalized and shown to be useful for actively creating protected qubit subsystems in any situation in which the interaction has relatively long correlation times [34,35]. Refocusing to undo unwanted internal interactions is our fourth example. The technique for "turning off" the coupling between spins that is so important for realizing QIP in liquid-state NMR is a special case of much more general methods of turning off or refocusing Hamiltonians. For example, a famous technique in solid state NMR is to reverse the dipolar coupling Hamiltonian using a clever sequence of 180 • pulses at different phases (see, for example, [5], page 48). Many other proposed QIP systems suffer from such internal interactions while having similar control opportunities.
The contributions of NMR QIP research extend beyond those directly applicable to experimental QIP systems. It is due to NMR that the idea of ensemble quantum computation with weak measurement was introduced and recognized as being, for true pure initial states, as powerful for solving algorithmic problems as the standard model of quantum computation. (It cannot be used in settings involving quantum communication.) One implication is that to a large extent, the usual assumption of projective measurement can be replaced by any measurement that can statistically distinguish between the two states of a qubit. Scalability still requires the ability to "reset" qubits during the computation, which is not possible in liquidstate NMR. Another interesting concept emerging from NMR QIP is that of "computational cooling" [36], which can be used to efficiently extract initialized qubits from a large number of noisy qubits in initial states that are only partially biased toward | | |0 . This is a very useful tool for better exploiting otherwise noisy physical systems.
The last example of interesting ideas arising from NMR studies is the "one-qubit" model of quantum computation [37]. This is a useful abstraction of the capabilities of liquid-state NMR. In this model, it is assumed that initially, one qubit is in the state | | |0 and all the others are in random states. Standard unitary quantum gates can be applied and the final measurement is destructive. Without loss of generality, one can assume that all qubits are re-initialized after the measurement. This model can perform interesting physics simulations with no known efficient classical algorithms. On the other hand, with respect to oracles, it is strictly weaker than quantum computation. It is also known that it cannot "faithfully" simulate quantum computers [38].

Capabilities of Liquid-State NMR
One of the main issues in liquid-state NMR QIP is the highly mixed initial state. The methods for extracting pseudopure states are not practical for more than 10 (or so) nuclear spins. The problem is that for these methods, the pseudopure state signal decreases exponentially with the number of qubits prepared while the noise level is constant. This exponential loss limits the ability to explore and benchmark standard quantum algorithms even in the absence of noise. There are in fact ways in which liquid-state NMR can be usefully applied to many more qubits. The first and less practical is to use computational cooling for a (unrealistically) large number of spins to obtain less mixed initial states. Versions of this technique have been studied and used in NMR to increase signal to noise [39]. The second is to use the one-qubit model of quantum computation instead of trying to realize pseudopure states. For this purpose, liquidstate NMR is limited only by relaxation noise and pulse control errors, not by the number of qubits. Noise still limits the number of useful operations, but non-trivial physics simulations are believed to be possible with less than 100 qubits [40]. Remarkably, a one-qubit quantum computer can efficiently obtain a significant amount of information about the spectrum of a Hamiltonian that can be emulated on a quantum computer [37,41,42]. Consequently, although QIP with molecules in liquid state cannot realistically be used to implement standard quantum algorithms involving more than about 10 qubits, its capabilities have the potential of exceeding the resource limitations of available classical computers for some applications.

Prospects for NMR QIP
There are many more algorithms and benchmarks that can be usefully explored using the liquid-state NMR platform. We hope to soon have a molecule with ten or more useful spins and good properties for QIP. Initially this molecule can be used to extend and verify the behavior of existing scalable benchmarks. Later, experiments testing basic ideas in physics simulation or more sophisticated noise-control methods are likely.
Liquid-state NMR QIP is one of many ways in which NMR can be used for quantum information. One of the promising proposals for quantum computation is based on phosphorus embedded in silicon [43] and involves controlling phosphorus nuclear spins using NMR methods. In this proposal, couplings and frequencies are controlled with locally applied voltages. RF pulses can be used to implement universal control. It is also possible to scale up NMR QIP without leaving the basic paradigms of liquid-state NMR while adding such features as high polarization, the ability to dynamically reset qubits (required for scalability) and much faster two-qubit gates. One proposal for achieving this goal is to use dilute molecules in a solid state matrix instead of molecules in liquid [44]. This approach may lead to pure-state quantum computation for significantly more than ten qubits. NMR QIP has been a useful tool for furthering our understanding of the experimental challenges of quantum computation. We believe that NMR QIP will continue to shed light on important issues in physically realizing quantum information.

Glossary
Bloch sphere. A representation of the state space of a qubit using the unit sphere in three dimensions. See Fig. 3. Crosstalk. In using physical control to implement a gate, crosstalk refers to unintended effects on qubits not involved in the gate. Decoupling. A method for "turning off" the interactions between two sets of spins. In NMR, this task can be achieved if one applies a rapid sequence of refocusing pulses to one set of spins. The other set of spins can then be controlled and observed as if independent of the first set. Deviation of a state. If ρ is a density matrix for a state and ρ = α1l + βσ, then σ is a deviation of ρ. Ensemble computation. Computation with a large ensemble of identical and independent computers.
Each step of the computation is applied identically to the computers. At the end of the computation, the answer is determined from a noisy measurement of the fraction p 1 of the computers whose answer is "1". The amount of noise is important for resource accounting: To reduce the noise to below ǫ requires increasing the resources used by a factor of the order of 1/ǫ 2 . Equilibrium state. The state of a quantum system in equilibrium with its environment. In the present context, the environment behaves like a heat bath at temperature T and the equilibrium state can be written as ρ = e −H/kT /Z, where H is the effective internal Hamiltonian of the system and Z is determined by the identity trρ = 1. FID. Free induction decay. To obtain a spectrum on an NMR spectrometer after having applied pulses to a sample, one measures the decaying planar magnetization induced by the nuclear spins as they precess. The xand y-components M x (t) and M y (t) of the magnetization as a function of time are combined to form a complex signal M(t) = M x (t)+iM y (t). The record of M(t) over time is called the FID, which is Fourier-transformed to yield the spectrum.

Inversion.
A pulse that flips the component of the spin along the z-axis. Note that any 180 • rotation around an axis in the xy-plane has this effect. J-coupling. The type of coupling present between two nuclear spins in a molecule in the liquid state. Labeled molecule. A molecule in which some of the nuclei are substituted by less common isotopes. A common labeling for NMR QIP involves replacing the naturally abundant carbon isotope 12 C, with the spin-1 2 isotope 13 C. Larmor frequency. The precession frequency of a nuclear spin in a magnetic field. It depends linearly on the spin's magnetic moment and the strength of the field. Logical frame. The current frame with respect to which the state of a qubit carried by a spin is defined.
There is an absolute (laboratory) frame associated with the spin observables σ x , σ y , and σ z . The observables are spatially meaningful. For example, the magnetization induced along the x-axis is proportional to tr(σ x | | |ψ ψ| | |), where | | |ψ is the physical state of the spin. Suppose that the logical frame is obtained from the physical frame with a rotation by an angle of θ around the z-axis. The observables for the qubit are then given by σ x (L) = cos(θ)σ x +sin(θ)σ y , σ y (L) = cos(θ)σ y −sin(θ)σ z , and σ z (L) = σ z . As a result, the change to the logical frame transforms the physical state to a logical state according to | | |φ L = e iσzθ/2 | | |ψ . That is, the logical state is obtained from the physical state by a −θ rotation around the z-axis. A resonant logical frame is used in NMR to compensate for the precession induced by the strong external field. Magnetization. The magnetic field induced by an ensemble of magnetic spins. The magnitude of the magnetization depends on the number of spins, the extent of alignment and the magnetic moments. Nuclear magnetic moment. The magnetic moment of a nucleus determines the strength of the interaction between its nuclear spin and a magnetic field. The precession frequency ω of a spin 1 2 nucleus is given by µB, where µ is the nuclear magnetic moment and B the magnetic field strength. For example, for a proton, µ = 42.7Mhz /T . NMR spectrometer. The equipment used to apply RF pulses to and observe precessing magnetization from nuclear spins. Typical spectrometers consist of a strong, cylindrical magnet with a central bore in which there is a "probe" that contains coils and a sample holder. The probe is connected to electronic equipment for applying RF currents to the coils and for detecting weak oscillating currents induced by the nuclear magnetization. Nuclear spin. The quantum spin degree of freedom of a nucleus. It is characterized by its total spin quantum number, which is a multiple of 1 2 . Nuclear spins with spin 1 2 are two-state quantum systems and can therefore be used as qubits immediately. Nutation. The motion of a spin in a strong z-axis field caused by a resonant pulse. Nutation frequency. The angular rate at which a resonant pulse causes nutation of a precessing spin around an axis in the plane. One-qubit quantum computing. The model of computation in which one can initialize any number of qubits in the state where qubit 1 is in the state | | |0 1 and all the other qubits are in a random state. One can then apply one-and two-qubit unitary quantum gates and make one final measurement of the state of qubit 1 after which the system is reinitialized. The model can be used to determine properties of the spectral density function of a Hamiltonian which can be emulated by a quantum computer [37]. Peak group. The spectrum of an isolated nuclear spin consists of one peak at its precession frequency.
If the nuclear spin is coupled to others, this peak "splits" and multiple peaks are observed near the precession frequency. The nuclear spin's peak group consists of these peaks.
Precession. An isolated nuclear spin's state can be associated with a spatial direction using the Bloch sphere representation. If the direction rotates around the z-axis at a constant rate, we say that it precesses around the z-axis. The motion corresponds to that of a classical top experiencing a torque perpendicular to both the z-axis and the spin axis. For a nuclear spin, the torque can be caused by a magnetic field along the z-axis. Projective measurement. A measurement of a quantum system determined by a complete set of orthogonal projections whose effect is to apply one of the projections to the system ("wave function collapse") with a probability determined by the amplitude squared of the projected state. Which projection occurred is known after the measurement. The simplest example is that of measuring qubit q in the logical basis. In this case, there are two projections, namely, P 0 = | | |0 q q 0| | | and P 1 = | | |1 q q 1| | |. If the initial state of all the qubits is | | |ψ , then the probabilities of the two measurement outcomes 0 and 1 are p 0 = ψ| | |P 0 | | |ψ and p 1 = ψ| | |P 1 | | |ψ , respectively. The state after the measurement is P 0 = | | |ψ / √ p 0 for outcome 0 and P 1 = | | |ψ / √ p 1 for outcome 1.

Pseudopure state.
A state with deviation given by a pure state | | |ψ ψ| | |. Pulse. A transient field applied to a quantum system. In the case of NMR QIP, pulses are rotating magnetic fields (RF pulses) whose effects are designed to cause specific rotations of the qubit states carried by the nuclear spins. Refocusing pulse. A pulse that causes a 180 • rotation around an axis in the plane. A typical example of such a rotation is e −iσxπ/2 = −iσ x , which is a 180 • x-rotation. Resonant RF pulse. A pulse whose field oscillates at the same frequency as the precession frequency of a target nuclear spin. Ideally, the field is in the plane, rotating at the same frequency and in the same direction as the precession. However, as long as the pulse field is weak compared to the precession frequency (that is, by comparison, its nutation frequency is small), the nuclear spin is affected only by the co-rotating component of the field. As a result, other planar components can be neglected, and a field oscillating in a constant direction in the plane has the same effect as an ideal resonant field. RF pulse. A pulse resonant at radio frequencies. Typical frequencies used in NMR are in this range. Rotating frame. A frame rotating at the same frequency as the precession frequency of a spin. Rotation. In the context of spins and qubits, a rotation around σ u by an angle θ is an operation of the form e −iσuθ/2 . The operator σ u may be any unit combination of Pauli matrices. This defines an axis in three-space, and in the Bloch sphere representation, the operation has the effect suggested by the terminology. Spectrum. In the context of NMR, the Fourier transform of an FID. Weak measurement. A measurement involving only a weak interaction with the measured quantum system. Typically, the measurement is ineffective unless an ensemble of these quantum systems is available so that the effects of the interaction add up to a signal detectable above the noise. The measurement of nuclear magnetization used in NMR is weak in this sense.