Thank you for visiting nature.com. You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

# Computational speed-up with a single qudit

## Abstract

Quantum algorithms are known for providing more efficient solutions to certain computational tasks than any corresponding classical algorithm. Here we show that a single qudit is sufficient to implement an oracle based quantum algorithm, which can solve a black-box problem faster than any classical algorithm. For 2d permutation functions defined on a set of d elements, deciding whether a given permutation is even or odd, requires evaluation of the function for at least two elements. We demonstrate that a quantum circuit with a single qudit can determine the parity of the permutation with only one evaluation of the function. Our algorithm provides an example for quantum computation without entanglement since it makes use of the pure state of a qudit. We also present an experimental realization of the proposed quantum algorithm with a quadrupolar nuclear magnetic resonance using a single four-level quantum system, i.e., a ququart.

## Introduction

Deutsch’s algorithm was not only the first quantum algorithm but also one of the simplest1. Although the algorithm was probabilistic in its original form, it has not been difficult to improve it to deterministic2,3. The Deutsch algorithm involves two qubits and distinguishes constant functions, which take both input values (0 or 1) to a single output value, from balanced functions in which output values are different. We introduce a simple algorithm that uses only a single qudit to determine the parity of chosen 2d permutations of a set of d objects. As in the case of Deutsch’s algorithm, we obtain a speedup relative to corresponding classical algorithms. For the particular computational task considered, the relative speedup starts from the case of a three-level quantum system, i.e., a qutrit.

What makes quantum algorithms interesting is that they can solve some problems faster than classical algorithms. Deutsch coined the term quantum parallelism to stress the ability of a quantum computer to perform two calculations simultaneously. How simple can a quantum circuit be? Or, what is the smallest quantum processor that can solve a problem faster than any classical algorithm? A closely related question is the origin of the power of quantum computation. Superposition, entanglement and discord are known to play essential roles in quantum computing and yet the origin of the power of the quantum algorithms is not completely clear4. Recently, it has been argued that quantum contextuality is a critical resource for quantum speedup of a fault tolerant quantum computation model5. We present an example where an unentangled but contextual system can be used to solve a problem faster than classical methods. A qutrit is the smallest system where the contextual nature of quantum mechanics can be observed, in the sense that a particular outcome of a measurement cannot reveal the pre-existing definite value of some underlying hidden variable6,7. Whether the origin of the speedup of our algorithm can be explained by contextuality is an open question.

We present an oracle based quantum algorithm constructed on a surprisingly simple idea, which solves a black-box problem using only a single qudit without any correlation of quantum or classical nature. The black-box maps d possible inputs to d possible outputs after a permutation. The 2d possible permutation functions of d objects are divided into two groups according to whether the permutation involves an odd or even number of exchange operations. The computational task is to determine the parity (oddness or evenness) of a given cyclic permutation. A classical algorithm requires two queries to the black-box. We show that a quantum algorithm can solve the problem with a single query. Even though the problem that the algorithm solves is not crucial, the algorithm is interesting in that it makes use of a single qudit, which means that neither entanglement nor any other correlation plays a role. Moreover, we present an experimental demonstration of this algorithm using a room temperature nuclear magnetic resonance (NMR) quadrupolar setup.

## Results

### Computational task and the quantum algorithm

Consider the case of three objects, where the six permutations of the set {1, 2, 3} are (1, 2, 3), (2, 3, 1), (3, 1, 2), (3, 2, 1), (2, 1, 3) and (1, 3, 2). From the parity of the transpositions, the first three are even while last three are odd permutations. Our computational task is to determine the parity of a given permutation. If we treat a permutation as a function f(x) defined on the set x {1, 2, 3}, determination of its parity requires evaluation of f(x) for two different values of x. We will show there exists a quantum algorithm where evaluating the function once (rather than twice) suffices to identify whether f(x) is even or odd.

Since we are going to use standard spin operators in our discussion, let us denote the three states of a qutrit by , where m = 1, 0, −1 are the eigenvalue of Sz with . Rather than the permutations of the set {1, 2, 3}, we can then consider permutations of a possible m values. Our aim here is to determine the parity of the bijection f : {1, 0, −1} → {1, 0, −1}. We may define the three possible even functions fk using Cauchy’s two-line notation and the remaining three odd functions are Being a simple transposition of orthonormal states , the operator corresponding to fk is unitary and can be easily implemented. Direct application of on basis states does not bring any improvement on the classical solution, we still need to know the result of for two different values of m. However, quantum gates can act on any superposition state including the state . The state vector can be obtained from by the single qutrit Fourier transformation in Sz–basis. We will show that this can be used to distinguish even and odd fk’s. Note that the state vectors defined by have the property that and similarly . Hence, application of on gives for even fk and for odd fk. Therefore, if we apply the inverse Fourier transformation on , we have the state (even fk) or (odd fk). Thus, a single evaluation of the function is enough to determine its parity.

In summary, the quantum circuit involves just three gates visited by a single qutrit. We start with and place UFT, and next to each other, as depicted in Fig. 1. The final state of the qutrit after gate is necessarily either or , while is never observed. Although we can modify our algorithm for a single qubit, where the Fourier transformation becomes a Hadamard operator, this case is not interesting since the classical solution requires only a single evaluation of the permutation function so the quantum algorithm does not provide any speedup. The qutrit case of our algorithm is one of the simplest quantum algorithms.

We can generalize the algorithm to d dimensional (or equivalently spin (d − 1)/2) systems. In that case, the algorithm may be used to distinguish cyclic permutations according to their parity. For example, when d = 4 positive cyclic permutations of (1, 2, 3, 4) are (2, 3, 4, 1), (3, 4, 1, 2) and (4, 1, 2, 3) while the negative cyclic permutations are (4, 3, 2, 1), (3, 2, 1, 4), (2, 1, 4, 3) and (1, 4, 3, 2). As in the case of three elements, given one of the eight permutations, our aim is to determine its parity and this requires knowing at least two elements in the permutation, or, equivalently, knowing the values of the function for two variables classically.

For a four level quantum system (ququart), we can use the initial state where ’s are states of the ququart with vector representations , , and . In this case we can use the standard quantum Fourier transformation3 which can be viewed as a unitary matrix in –basis, so that . Observe that, starting from (1, 2, 3, 4), the positive cyclic permutations (1, 2, 3, 4), (2, 3, 4, 1), (3, 4, 1, 2) and (4, 1, 2, 3) can be obtained with the corresponding unitary matrices, respectively and they map onto , , and . On the other hand, the negative cyclic permutations result in , , and , which can be similarly realized by the unitary matrices, respectively, where . Therefore, applying the inverse Fourier transformation and checking the final state of the ququart, we can determine the parity of the cyclic permutation. Final state indicates that the permutation is even, while means that the permutation is odd. As in the case of qutrit, the quantum algorithm allows us to determine the parity of a cyclic permutation with a single evaluation of the permutation function rather than the two that would be required classically. For four elements, we can formulate two more examples using other circular permutations and evaluate these new cases by redefining the Fourier transformation. For example, the positive (1, 3, 2, 4), (3, 2, 4, 1), (2, 4, 1, 3), (4, 1, 3, 2) and negative (4, 2, 3, 1), (2, 3, 1, 4), (3, 1, 4, 2) cyclic permutations can be distinguished with a single evaluation provided we start with the state . The last eight members of the total 4! = 24 permutations can also be used to set up a similar problem. Moving to a d–level quantum system (qudit), we can define In this case, the positive cyclic permutations map onto itself while the negative permutations give .

From the above generalizations, we deduce that the essence of the algorithm is to design a circuit so that output states are grouped according to the computational task where final states are described by the same vectors up to a phase factor. For this type of generalization, the speedup factor will be two as in the case of a single qutrit. We can look for further generalizations of the algorithm with larger or perhaps exponential speedup factors by using many qudits together. However, the main purpose of the present work is to find the simplest quantum system which provides a computational speedup. Thus, we can identify the minimum system requirements for a useful quantum algorithm.

#### Experimental demonstration

In the following, we present an experiment which demonstrates the quantum algorithm for a ququart. Historically, many quantum algorithms were implemented in NMR systems8,9,10,11,12,13, especially those algorithms where entanglement is not required14,15,16,17. The implementation of the algorithm using a ququart is achieved using a spin– nuclei, which has been extensively used in NMR-QIP applications as exemplified in18,19,20,21,22,23,24,25,26,27,28,29,30 and reviewed in31. In such NMR systems, a strong static magnetic field is responsible for the Zeeman splitting, providing four energy levels. Since the nuclear spin is , the nuclei possess a quadrupole moment that interacts with the electric field gradient created by the surrounding charge distribution, i.e., quadrupolar interaction. When this interaction is much stronger than the quadrupolar one, we can use perturbation theory and express the Hamiltonian as32 where ωL is the Larmor frequency, ωQ is the quadrupolar frequency (|ωL|  |ωQ|), Iz is the z component of the nuclear spin operator and I is the total nuclear spin operator. The eigenstates of the system are by , , and , indexed as , , , , respectively. The corresponding NMR spectrum is composed by three spectral lines associated to the three single quantum transitions, Δm ± 1.

The initial state is prepared from the thermal equilibrium state using a time averaging procedure based on numerically optimized radio frequency (rf) pulses generally called strong modulating pulses (SMP)25,33,34. The technique consists of using blocks of concatenated rf pulses, with amplitudes, phases and durations optimized to provide a state preparation such that density matrix is , where ρ1 is a trace one density matrix corresponding to the state defined by the optimized SMP pulses35. The quantum gates in the circuit are also implemented using these SMP optimized pulses. Since NMR measurements are not sensitive to the identity part of the density matrix, the term is manipulated and read out selectively. The SMP optimization technique is based on the Nelder-Mead Simplex minimization method which is explained in detail in36.

The steps of the protocol were implemented as follows: (i) we apply the SMP optimized gate UFT to the initial state to obtain ; (ii) we apply the SMP optimized gate UiUFT for i = 2, 6 to the initial state again; (iii) finally, starting once more from the initial state, we implement the SMP optimized gate for i = 2, 6 to obtain either or as an outcome of the algorithm, as schematically depicted in Fig. 1. Figure 2 shows a bar representation of the density matrices, after each step of the protocol, obtained by quantum state tomography.

## Discussion

We have shown that a single qudit can be used to implement a quantum algorithm which provides a two to one speedup in determining parity of cyclic permutations. Even though the model problem is not one of the most important computational tasks and the speedup is not exponential when generalized to higher dimensional cases, the algorithm is still important since it provides a strikingly simple example for quantum computation without entanglement.

We have experimentally demonstrated the proposed algorithm using a quadrupolar NMR setup and showed that it deterministically decides whether a given permutation, from a set of eight possible functions, of four objects is positive or negative cyclic with a single query to the black-box.

Despite the simplicity of the algorithm, the origin of the speedup remains unclear. It is evident that quantum correlations do not supply the solution of the computational task since a single quantum system is considered. Regardless, the true resource behind the power of this algorithm remains an open question.

## Methods

For our experimental system, as for all room temperature NMR, the density matrix can be expressed as , where is the ratio between the magnetic and thermal energies, ωL is the Larmor frequency, kB is the Boltzmann constant and T the temperature32,35. Measurements and unitary transformations only affect the traceless deviation matrix, Δρ, which contains all the available information about the state of the system. Unitary transformations over Δρ are implemented by radio frequency pulses and/or evolutions under spin interactions, with excellent control of rotation angle and direction. The full characterization of Δρ can be achieved using many available quantum state tomography protocols34,37,38,39. Since for NMR experiments only the deviation matrix is detected, density matrix elements are expressed in units of ε.

The experiment was performed using sodium nuclei, 23Na, in a lyotropic liquid crystal sample at room temperature. The sample was prepared with 20.9 wt% of Sodium Dodecyl Sulfate (SDS) (95% of purity), 3.7 wt% of decanol and 75.4 wt% of deuterium oxide, following the procedure in40. The 23Na NMR experiments were performed in a 9.4-T VARIAN INOVA spectrometer using a 5 mm solid state NMR probe head at T = 25 °C. We obtained the quadrupole frequency νQ = ωQ/2π = 10 kHz. Under the conditions of the experiment, the sample can be considered as an ensemble of isolated sodium nuclei, i.e., an ensemble of individual ququarts.

The reconstruction of density matrices was performed using the method described in34, based on a coherence selection procedure, i.e., read out pulses with specifically designed amplitudes, durations and phases were applied to obtain an NMR spectrum associated only with the density matrix elements of a specific coherence order. The three line intensities of this spectrum (Ii) were used as inputs to a set of equations, which provided the selected density matrix elements. To estimate the experimental uncertainties, we assumed the error associated to each spectral line (ΔI) to be the standard deviation of the spectral noise obtained from the signal-to-noise ratio. Hence, the maximum and minimum threshold of each line was calculated as Ii,max = Ii + ΔI and Ii,min = Ii − ΔI. We reconstructed the density matrix considering all possible combinations of maximum and minimum intensities, resulting in a set of reconstructed density matrices and the mean and standard deviation of each density matrix element were obtained. The elements of the average density matrices and their respective errors are shown in the Supplementary Material. All relative errors are smaller than 6%. The fidelities to the theoretical predictions are shown in Fig. 2.

After the completion of this work, we became aware of subsequent works, also implementing the quantum algorithm proposed here but in different experimental setups41,42,43.

How to cite this article: Gedik, Z. et al. Computational speed-up with a single qudit. Sci. Rep. 5, 14671; doi: 10.1038/srep14671 (2015).

## References

1. Deutsch, D. Quantum theory, the Church-Turing principle and the universal quantum computer. Proc. R. Soc. Lond. A 400, 97 (1985).

2. Cleve, R., Ekert, A., Macchiavello, C. & Mosca, M. Quantum algorithms revisited. Proc. R. Soc. Lond. A 454, 339 (1998).

3. Nielsen, M. A. & Chuang, I. L. Quantum Computation and Quantum Information (Cambridge University Press, Cambridge, England, 2000).

4. van den Nest, M. Universal quantum computation with little entanglement. Phys. Rev. Lett. 110, 060504 (2013).

5. Howard, M., Wallman, J., Veitch, V. & Emerson J. Contextuality supplies the ‘magic’ for quantum computation. Nature 510, 351 (2014).

6. Kochen, S. & Specken, E. P. The problem of hidden variables in quantum mechanics. J. Math. Mech. 17, 59 (1967).

7. Klyachko, A. A., Can, M. A., Binicioğlu, S. & Shumovsky, A. S. Simple test for hidden variables in spin-1 systems. Phys. Rev. Lett. 101, 020403 (2008).

8. Cory, D. G., Fahmy, A. F. & Havel, T. F. Ensemble quantum computing by NMR spectroscopy. Proceedings of the National Academy of Sciences USA 94, 1634 (1997).

9. Cory, D. G. et al. NMR based quantum information processing: Achievements and prospects. Fortschritte der Physik 48, 875 (2000).

10. Marx, R., Fahmy, A. F., Myers, J. M., Bermel, W. & Glaser, S. J. Approaching five-bit NMR quantum computing. Phys. Rev. A 62, 012310 (2000).

11. Ramanathan, C. et al. NMR quantum information processing. Quantum Inf. Process 3, 15 (2004).

12. Suter, D. & Mahesh, T. S. Spins as qubits: quantum information processing by nuclear magnetic resonance. J. Chem. Phys. 128, 052206 (2008).

13. Jones, J. A. Quantum Computing with NMR. Prog. NMR Spectrosc. 59, 91 (2011).

14. Du, J. et al. Implementation of a quantum algorithm to solve the Bernstein-Vazirani parity problem without entanglement on an ensemble quantum computer. Phys. Rev. A 64, 042306 (2001).

15. Knill, E. & Laflamme, R. Power of One Bit of Quantum Information. Phys. Rev. Lett. 81, 5672 (1998).

16. Laflamme, R., Cory, D. G., Negrevergne, C. & Viola, L. NMR quantum information processing and entanglement. Quant. Inf. Comp. 2, 166 (2002).

17. Passante, G., Moussa, O., Trottier, D. A. & Laflamme, R. Experimental detection of nonclassical correlations in mixed-state quantum computation. Phys. Rev. A 84, 044302 (2001).

18. Khitrin, A. K. & Fung, B. M. Nuclear magnetic resonance quantum logic gates using quadrupolar nuclei. J. Chem. Phys. 112, 6963 (2000).

19. Sinha, N., Mahesh, T. S., Ramanathan, K. V. & Kumar, A. Toward quantum information processing by nuclear magnetic resonance: Pseudopure states and logical operations using selective pulses on an oriented spin 3/2 nucleus. J. Chem. Phys. 114, 4415 (2001).

20. Ermakov, V. L. & Fung, B. M. Experimental realization of a continuous version of the Grover algorithm. Phys. Rev. A 66, 042310 (2002).

21. Das, R. & Kumar, A. Use of quadrupolar nuclei for quantum-information processing by nuclear magnetic resonance: Implementation of a quantum algorithm. Phys. Rev. A 68, 032304 (2003).

22. Bonk, F. A. et al. Quantum-state tomography for quadrupole nuclei and its application on a two-qubit system. Phys. Rev. A 69, 042322 (2004).

23. Bonk, F. A. et al. Quantum logical operations for spin 3/2 quadrupolar nuclei monitored by quantum state tomography. J. Mag. Res. 175, 226 (2005).

24. Murali, K. V. R. M., Son, H.-B., Steffen, M., Judeinstein, P. & Chuang, I. L. Test by NMR of the phase coherence of electromagnetically induced transparency. Phys. Rev. Lett. 93, 033601 (2004).

25. Kampermann, H. & Veeman, W. S. Characterization of quantum algorithms by quantum process tomography using quadrupolar spins in solid-state nuclear magnetic resonance. J. Chem. Phys. 122, 214108 (2005).

26. Gopinath, T. & Kumar, A. Implementation of controlled phase shift gates and Collins version of Deutsch–Jozsa algorithm on a quadrupolar spin-7/2 nucleus using non-adiabatic geometric phases. J. Magn. Reson. 193, 168 (2008).

27. Kondo, Y. et al. Multipulse operation and optical detection of nuclear spin coherence in a GaAs/AlGaAs quantum well. Phys. Rev. Lett. 101, 207601 (2008).

28. Tan, Y. P. et al. Preparing Pseudo-Pure States in a Quadrupolar Spin System Using Optimal Control. Chinese Phys. Lett. 29, 127601 (2012).

29. Araujo-Ferreira, A. G. et al. Quantum state tomography and quantum logical operations in a three qubits NMR quadrupolar system. Int. J. Quantum Inf. 10, 1250016 (2012).

30. Araujo-Ferreira, A. G. et al. Classical bifurcation in a quadrupolar NMR system. Phys. Rev. A 87, 53605 (2013).

31. Teles, J. et al. Quantum information processing by nuclear magnetic resonance on quadrupolar nuclei. Philos. T. R. Soc. A 370, 4770 (2012).

32. Abragam, A. The Principles of Nuclear Magnetism (Oxford University Press, 1978).

33. Fortunato, E. M. et al. Design of strongly modulating pulses to implement precise effective Hamiltonians for quantum information processing. J. Chem. Phys. 116, 7599 (2002).

34. Teles, J. et al. Quantum state tomography for quadrupolar nuclei using global rotations of the spin system. J. Chem. Phys. 126, 154506 (2007).

35. Oliveira, I. S., Bonagamba, T. J., Sarthour, R. S., Freitas, J. C. C. & deAzevedo, E. R. NMR Quantum Information Processing (Elsevier, Amsterdam, 2007).

36. Nelder, J. A. & Mead, R. A simplex method for function minimization. Computer Journal 7, 308 (1965).

37. Long, G. L., Yan, H. Y. & Sun, Y. Analysis of density matrix reconstruction in NMR quantum computing. J. Opt. B 3, 376 (2001).

38. Kampermann, H. & Veeman, W. S. Quantum computing using quadrupolar spins in solid state NMR. Quantum Inf. Process 1, 327 (2002).

39. Leskowitz, G. M. & Mueller, L. J. State interrogation in nuclear magnetic resonance quantum-information processing. Phys. Rev. A 69, 052302 (2004).

40. Radley, K., Reeves, L. W. & Tracey, A. S. Effect of counterion substitution on the type and nature of nematic lyotropic phases from nuclear magnetic resonance studies. J. Phys. Chem. 80, 174 (1976).

41. Dogra S., Arvind & Dorai, K. Determining the parity of a permutation using an experimental NMR qutrit. Phys. Lett. A 378, 3452 (2014).

42. Zhan X., Li J., Qin H., Bian Z. & Xue P. Linear optical demonstration of quantum speed-up with a single qudit. Opt. Express 23 18422 (2015).

43. Wang F. et al. Demonstration of quantum permutation algorithm with a single photon ququart. Sci. Rep. 5 10995 (2015).

## Acknowledgements

ZG is supported by the Turkish agency TUBITAK under Grant No. 111T232. BC is supported by Sao Paulo Research Foundation (FAPESP) under grant No. 2014/21792-5. GK is supported by São Paulo Research Foundation (FAPESP), BEPE fellowship, given under grant no 2014/20941-7. DOSP is supported by the National Counsel of Technological and Scientific Development (CNPq) under grants numbers 304955/2013-2 and 443828/2014-8 and by Coordenação de Aperfeiçoamento de Pessoal de Nível Superior (CAPES) under the grant number 108/2012. ERdeA is supported by the National Counsel of Technological and Scientific Development (CNPq) under grant number 312852/2014-2. FFF is supported by São Paulo Research Foundation (FAPESP) under grant number 2012/50464-0 and by the National Counsel of Technological and Scientific Development (CNPq) under grant number 474592/2013-8. DOSP and FFF are members of the Brazilian National Institute of Science and Technology of Quantum Information (INCT/IQ). The authors would like to thank A. Levi, C. Saçloğlu, J. Wallman and J. Wrachtrup for helpful discussions.

## Author information

Authors

### Contributions

Z.G. developed the theoretical ideas and proposed the presented quantum algorithm, I.A.S., E.L.G.V., D.O.S.P. and E.R.de.A. conducted the experiment and analyzed the data, B.Ç., G.K. and F.F.F. coordinated the project, Z.G., B.Ç., G.K., I.A.S., D.O.S.P. and E.R.de.A. wrote the manuscript. All authors reviewed the manuscript.

## Ethics declarations

### Competing interests

The authors declare no competing financial interests.

## Rights and permissions

Reprints and Permissions

• ### Quantum capacity analysis of multi-level amplitude damping channels

• Stefano Chessa
• Vittorio Giovannetti

Communications Physics (2021)

• ### Measuring molecular magnets for quantum technologies

• Eufemio Moreno-Pineda
• Wolfgang Wernsdorfer

Nature Reviews Physics (2021)

• ### Qubit representation of qudit states: correlations and state reconstruction

• Julio A. López-Saldívar
• Octavio Castaños

Quantum Information Processing (2019)

• ### Information Processing Using Three-Qubit and Qubit–Qutrit Encodings of Noncomposite Quantum Systems

• Aleksey Popov
• Evgeny Kiktenko

Journal of Russian Laser Research (2016)

• ### Demonstration of quantum permutation algorithm with a single photon ququart

• Feiran Wang
• Yunlong Wang
• Fuli Li

Scientific Reports (2015)  