About the numerical simulations

A numerical simulation program able to simulate nuclear quadrupole resonance(NQR) as well as nuclear magnetic resonance (NMR) experiments is presented, written using the Mathematica package, aiming especially applications in quantum computing. The program makes use of the interaction picture to compute the effect of the relevant nuclear spin interactions, without any assumption about the relative size of each interaction. This makes the program flexible and versatile, being useful in a wide range of experimental situations, going from pure-NQR (at zero or under small applied magnetic field) to high-field NMR experiments. Some conditions specifically required for quantum computing applications are implemented in the program, such as the possibility of use of elliptically polarized radiofrequency and the inclusion of first- and second-order terms in the average Hamiltonian expansion. A number of examples dealing with simple NQR and quadrupole-perturbed NMR experiments are presented, along with the proposal of experiments to create quantum pseudopure states and logical gates using NQR.

The sections "Examples on ..." below present some examples of numerical simulation of some typical NMR/NQR experiments, including zero-or low-field NQR and high-field NMR. With these examples, we wish to demonstrate how to use the basic functions of the program, highlighting its versatility, ease of use and broad range of applicability to different types of magnetic resonance experiments involving quadrupolar nuclei.

Examples on Nuclear quadrupole resonance

The first examples discussed here treat the recording of NQR spectra for a system of nuclei with spin 3/2 in an EFG with axial symmetry under a small Zeeman perturbation. This is the case of ^{35}Cl nuclei in KClO_{3} and NaClO_{3}, for example. For the pure quadrupole Hamiltonian, the states ±3/2 are degenerate, as well as the states ±1/2, so that the NQR spectrum contains only a single line at a frequency close to 28-29 MHz. A small Zeeman field (order of 10-100 G) causes a frequency splitting (order of 10-100 kHz) and make the first-order corrected eigenvectors as linear superpositions of angular momentum eigenvectors. The number, position and intensity of these lines are dependent on the angle θZ between the static magnetic field and the EFG symmetry axis. This problem can then be completely understood by using stationary first-order perturbation theory and it serves as a good example to illustrate the operation of our simulation program.

Example #1

Potassium chlorate (KClO_{3}) has a monoclinic structure, with two molecules per unit cell. The symmetry axes of the EFG tensors at the ^{35}Cl nucleus of each molecule are parallel to one another, so that these molecules behave identically for any direction of the externally applied static magnetic field. Figure 2(a) shows a source code for simulation of the ^{35}Cl NQR spectrum in a single crystal of KClO_{3} (ω_{Q}/2π = 28.1 MHz). Figures 2(b)-2(d) show three simulated spectra obtained for three different values of θ_{Z}. These spectra can be directly compared to experimental results long known in the NQR literature.

(a)

(b) | (c) | (d) |

**Figure 2.** (a) Source code for the simulation of ^{35}Cl NQR spectra in a single crystal of KClO_{3}. The simmetry axis of the EFG tensor is defined as the **z**-axis. The RF field is linearly polarized in **x**, near resonance (ω_{RF} = ω_{Q}). The detection is performed with the same coil used for excitation (θ_{Det} = θ_{RF} and φ_{Det} = φ_{RF}). The static magnetic field is small (ω_{L} << ω_{Q}) and the angle it makes with the EFG simmetry axis is θ_{Z} = 0 (b), θ_{Z} = π/4 (c) or θ_{Z} = arctan √2 (d).

Example #2

Sodium chlorate (NaClO_{3}) possesses cubic structure, with four molecules per unit cell, all with the same ^{35}Cl NQR frequency (ω_{Q}/2π = 29.93 MHz). However, unlike KClO_{3}, the symmetry axes of the EFG tensors at the ^{35}Cl nuclei corresponding to these four molecules are not parallel to each other; instead, they are parallel to each of the diagonals of the unit cell cube. For a given direction of the externally applied static magnetic field, there will be four angles between this field and each of the EFG symmetry axes (some of which can coincide). Thus, each crystallographically distinct site must be treated separately. For the numerical simulation, one should proceed similarly to the previous example for each site and add the results in the end (either in the time or in the frequency domain). This problem is handled in the source code by keeping the static magnetic field fixed at a given direction (common for all sites) and specifying the angular parameters of the quadrupole interaction for each site (α_{Q} = π/4, 3π/4, 5π/4, 7π/4, respectively; β_{Q} = arctan √2 and γ_{Q} = 0 for all sites). In general, the spectrum has 16 lines (four for each distinct site), but for some specific orientations of the magnetic field there can be some coincidence in the angles between the magnetic field and the EFG symmetry axes. Thus, the number of observed lines can be reduced, as illustrated in the simulated spectra shown in Fig. 3.

(a) | (b) |

(c) | (d) |

**Figure 3.** Simulation of Zeeman-perturbed NQR of ^{35}Cl NQR spectra of NaClO_{3} single crystal: (a) θ_{Z} = π/4 and φ_{Z} = π/3; (b) θ_{Z} = 0 and φ_{Z} = 0; (c) θ_{Z} = π/4 and φ_{Z} = 0; (d) θ_{Z} = arctan √2 and φ_{Z} = π/4;. The other parameters are the same as in Fig. 2(a).

Example #3

We now turn to a more sophisticated NQR experiment, involving two-photon transitions. The occurrence of these transitions can be understood by using average Hamiltonian theory up to the first-order term in the Magnus expansion. Two-photon excitation occurs in general with two RF fields whose frequencies sum to or differ by the resonance frequency. Eles & Michal^{*} demonstrated the two-photon excitation in ^{35}Cl NQR of NaClO_{3} and KClO_{3} single crystals using RF pulses applied at half the NQR frequency. Signals due to both, single- and double-quantum coherences were detected, with the application of a small static magnetic field. This experiment can be easily simulated with the program presented in this work, using input parameters similar to the ones given in Fig. 2(a), but setting ω_{RF} = ω_{Q}/2 (i.e., excitation at half the NQR frequency). Two examples of simulated spectra obtained with two-photon excitation are given in Fig. 4.

^{*}Chem. Phys. Lett. 376 (2003) 268-73 and J. Magn. Reson. 175 (2005) 201-9.

(a) | (b) |

**Figure 4.** Simulation of Zeeman-perturbed ^{35}Cl NQR spectra of KClO_{3} with two-photon excitation. The simmetry axis of the EFG tensor is defined as the z-axis. An external magnetic field of 8 G was applied with θ_{Z} = π/6. (a) Detection with a coil perpendiculas to the excitation coil (θ_{RF} = θ_{Det} = π/2; φ_{RF} = φ_{Det} + π/2); (b) Detection with the same excitation coil (θ_{RF} = θ_{Det} = π/2; φ_{RF} = φ_{Det}).

As mentioned above, one of the most useful features of the program presented here is its versatility, allowing that similar procedures can be used for simulation of NQR (where the quadrupole interaction is dominant), or high-field NMR experiments (where the Zeeman interaction is dominant) or even in cases where both interactions have comparable order of magnitude.

Example #4

As an example of simulation of high-field NMR spectrum of a quadrupolar nucleus, Fig. 5 presents the simulated ^{23}Na NMR spectrum of NaClO_{3} single crystal. In this case, each crystallographically inequivalent ^{23}Na nucleus gives rise to a triplet, with the central transition (between the states ±1/2, which is not affected by the quadrupole interaction to first-order) flanked by two satellites. As there are four molecules per unit cell in this crystal, the spectrum shows a strong central line (consisting of the superposition of the four central transitions) and four pairs of satellites.

**Figure 5.** Simulation of high-field ^{23}Na NMR spectrum of NaClO_{3} single crystal. The quadupolar coupling constant is approximately 0.80 MHz and the Larmor frequency of 400 MHz.

Example #5

Another quite interesting example dealing with spin dynamics of quadrupolar nuclei in high-field NMR was provided very recently by Nakashima et al.^{*}, who described the pulse response of half-integer spin quadrupolar nuclei in single crystals starting from general initial states (not necessarily corresponding to thermal equilibrium). Nakashima et al. studied the effect of observe pulse flip angle on the intensities of the satellite and central transitions in NMR of quadrupolar nuclei in single crystals, using non-selective excitation and starting from non-equilibrium initial states. The populations corresponding to the satellite transitions were inverted using hyperbolic secant (HS) pulses. Such results can be easily simulated using the program presented in this work, by starting from an initial density operator with inverted populations corresponding to the satellite transitions. Fig. 6(a) shows the complete code to perform the simulation of the flip angle dependence of the ^{23}Na NMR intensities in NaNO_{3} single crystal. The initial state was constructed by inverting the populations of states |3/2) and |1/2), as well as those of states |-3/2) and |-1/2); the system was excited by a non-selective RF pulse with ωRF = ωL, for various values of *t _{p}* (or flip angle). The simulation result is shown in Fig. 6(b), which can be compared to the calculations and experimental results shown in Fig. 3 of reference (*). A similar analysis can be performed for spin 5/2 nuclei, as done by Nakashima et al. using

^{27}Al NMR measurements in a single crystal of Al

_{2}O

_{3}. Fig. 7 shows the result of our simulations, which can be directly compared to the calculations shown in Fig. 6 of reference (*). The initial state was obtained by inversion of the populations of states |-5/2) and |-3/2), followed by inversion of the populations of states |-3/2) and |-1/2). All procedures to perform the simulation are similar to the previous example.

^{*}Nakashima et al. J. Magn. Res. 202 (210) 162-172.

(a)

(b)

**Figure 6.** Source code (a) and simulated results (b) corresponding to the flip angle dependence of the intensities of satellite and central transitions for spin 3/2 nuclei in a single crystal, starting with the populations associated with both satellite transitions inverted and with non-selective excitation of the spectrum.

**Figure 7.** Simulated intensity plots for the flip angle dependence of the intensity of each of the several transitions for spin 5/2 nuclei in a single crystal, starting with the consecutive inversion of the populations of the two satellite transitions at one side of the central transition and with non-selective excitation of the spectrum.

Examples on quantum computing by NMR

Quantum computing involves the manipulation of quantum systems to perform data processing tasks. In NMR, this is accomplished through the application of specific RF pulses (logic gates) on ensemble states adequately prepared, called pseudopure states. These states are characterized by having all populations in their respective density operators equalized, except for one, while all coherences are zero. In the next examples, we shall monitor the achievement of pseudopure states and application of basic logic gates for systems of quadrupolar nuclei.

Example #6

Khitrin & Fung^{*} showed how to obtain pseudopure states in a 2 q-bit system, using high-field ^{23}Na NMR (spin = 3/2) in a liquid crystal. The equalization of the populations was achieved through a sequence of selective RF pulses exciting either single- or double-quantum transitions. Undesirable coherences were eliminated by applying pulsed magnetic field gradients. The signal was detected after application of a hard reading pulse (π/20). All these steps can be implemented in our simulation program by successive application of the function **Pulse**, as exemplified in the source code shown in Fig. 8(a). The simulated spectra associated with the four pseudopure states are exhibited in Fig. 8(b)- 8(e).

^{*}J. Chem. Phys. 112 (2000) 6963-5.

(a)

(b) |

**Figure 8.** (a) Source code excerpt used to implement the pulse sequence that generates the pseudopure state |01) in a 2 q-bit system associated with the high-field ^{23}Na NMR in a liquid crystal. (b) Simulated ^{23}Na NMR spectra for the four pseudopure states of the computational basis. The numerical values of the given parameters were taken from reference J. Chem. Phys. 112 (2000) 6963-5.

Example #7

In another study, Khitrin et al^{*} obtained pseudopure states for a 3 q-bit system using ^{133}Cs NMR (spin = 7/2) in a liquid crystal under strong magnetic field. In this case the experiments employed multifrequency RF pulses, so that all population changes were achieved simultaneously, providing a considerable time saving. Multifrequency pulses can be implemented in the program here described by defining separately the Hamiltonians for each RF frequency and set H1 as the sum of them all. To create the pseudopure state associated with m = 7/2, for example, the equalization of all other populations is achieved with a single pulse consisting of the superposition of the six harmonics corresponding to the six transition frequencies ω_{12}, ω_{23}, ω_{34}, ω_{45}, ω_{56} and ω_{67}, with amplitudes proportional to 0.81, 0.93, 1, 1.03, 1.04 and 1.06, respectively. The optimum duration of this pulse TP can be obtained following the dynamics of population changes, as shown in the plot exhibited in Fig. 9(a), which was constructed using our program features; a similar plot, obtained using other simulation procedures, was also presented in Fig. 2 of reference (*). After this multifrequency pulse, a pulsed magnetic field gradient is used to eliminate the coherences, leading to the desired pseudopure state (Fig. 9(b)).

^{*}Phys. Rev. A 63 (2001) 20301.

(a) | (b) |

**Figure 9.** (a) Simulation of the evolution of populations in a high-field NMR experiment for nucleus with spin 7/2 (3 q-bit system) following a multi-frequency pulse. For *t _{p}* ≈ 2 ms all populations are equalized, except the one corresponding to m = 7/2, wich corresponds to the pseudopure state |000). (b) Simulated

^{133}Cs NMR spectra corresponding to the thermal equilibrium (above) and to the pseudopure state |000) (below).

Example on quantum computing by NQR

The examples given in this section deal with the use of NQR for implementation of ensemble quantum computing, following in general terms the methods used in high-field NMR but adapting all procedures to the different dynamics involved in NQR experiments. These examples constitute original proposals for creation of pseudopure states and implementation of logic gates in systems where the dominant interaction is the quadrupole coupling between a nucleus with spin > 1/2 and an axially symmetric EFG. The manipulation of the ensemble quantum states is achieved by using selective RF pulses with circular polarization.

Example #8

In pure NQR (i.e., with no applied magnetic field) of a system of spin 3/2 nuclei coupled to an axially symmetric EFG, such as ^{35}Cl nuclei in KClO_{3} single crystal, the levels ±3/2 and degenerate, as well as the levels ±1/2, so that the frequencies of single-quantum transitions (3/2 <---> 1/2 and -3/2 <---> -1/2) are identical; the same applies to the double-quantum transitions (3/2 <---> -1/2 and -3/2 <---> 1/2). However, these transitions can be distinguished (and selectively excited/detected) by using RF pulses circularly polarized around the symmetry axis of the EFG, due to differences in m signs. The use of circularly or, more generally, elliptically polarized RF pulses has been widespread in NQR experiments, especially with the aim of achieving selective excitation or increasing sensitivity. These RF fields can be generated using crossed coils or birdcage resonators, as it is usual in magnetic resonance imaging. In the case of spin 3/2 nuclei, the single-quantum transitions are excited using on-resonance pulses (ω_{RF} = ω_{Q}), whereas the double-quantum transitions are obtained by excitation at half the resonance frequency (ω_{RF} = ω_{Q}/2). This 4-level system can be used to simulate a system of 2 q-bits, defined by: |3/2) = |0) = |00); |1/2) = |1) = |01); |-1/2) = |2) = |10); |-3/2) = |3) = |11). The source code to simulate this experiment is given in Fig. 12. The other pseudopure states can be obtained just by changing appropriately the polarization state of each pulse. Fig. 13 shows the density matrices corresponding to the four pseudopure states obtained following this method, as simulated using source codes similar to the one given in Fig. 12.

**Figure 12.** Source code for simulating the experiment for creation of pseudopure state |11).

**Figure 13.** Real part of the density operators corresponding to the four pseudopure states of the computational basis, obtained by numerical simulation.

The source code of the examples showed above is available for download as a Mathematica 7.0 notebook file (*.nb).

Click HERE to download it.

IMPORTANT NOTE:

The code is completely free and is provided "as is". In no event shall we, the authors, be liable for any consequential, special, incidental or indirect damages of any kind arising out of the delivery, performance or use of this code.

When making use of one of these source codes, please cite the original paper: D. Possa, A. C. Gaudio, J. C. C. Freitas. Numerical simulation of NQR/NMR: applications in quantum computing. J. Magn Reson. 2011, DOI: 10.1016/j.jmr.2011.01.020.

This project is part of the doctoral thesis of Denimar Possa, supervised by Dr. Jair Carlos Checon de Freitas. Some technical support on the use of Mathematica has been given by Dr. Anderson Coser Gaudio.