Letter | Published:

Experimental realization of Shor's quantum factoring algorithm using nuclear magnetic resonance


The number of steps any classical computer requires in order to find the prime factors of an l-digit integer N increases exponentially with l, at least using algorithms known at present1. Factoring large integers is therefore conjectured to be intractable classically, an observation underlying the security of widely used cryptographic codes1,2. Quantum computers3, however, could factor integers in only polynomial time, using Shor's quantum factoring algorithm4,5,6. Although important for the study of quantum computers7, experimental demonstration of this algorithm has proved elusive8,9,10. Here we report an implementation of the simplest instance of Shor's algorithm: factorization of N = 15 (whose prime factors are 3 and 5). We use seven spin-1/2 nuclei in a molecule as quantum bits11,12, which can be manipulated with room temperature liquid-state nuclear magnetic resonance techniques. This method of using nuclei to store quantum information is in principle scalable to systems containing many quantum bits13, but such scalability is not implied by the present work. The significance of our work lies in the demonstration of experimental and theoretical techniques for precise control and modelling of complex quantum computers. In particular, we present a simple, parameter-free but predictive model of decoherence effects14 in our system.

Access optionsAccess options

Rent or Buy article

Get time limited or full article access on ReadCube.


All prices are NET prices.


  1. 1

    Knuth, D. E. The Art of Computer Programming Vol. 2, Seminumerical Algorithms (Addison-Wesley, Reading, Massachusetts, 1998).

  2. 2

    Koblitz, N. A Course in Number Theory and Cryptography (Springer, New York, 1994).

  3. 3

    Bennett, C. H. & DiVincenzo, D. P. Quantum information and computation. Nature 404, 247–255 (2000).

  4. 4

    Shor, P. in Proc. 35th Annu. Symp. on the Foundations of Computer Science (ed. Goldwasser, S.) 124–134 (IEEE Computer Society Press, Los Alamitos, California, 1994).

  5. 5

    Shor, P. Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer. SIAM J. Comput. 26, 1484–1509 (1997).

  6. 6

    Ekert, A. & Jozsa, R. Quantum computation and Shor's factoring algorithm. Rev. Mod. Phys. 68(3), 733–753 (1996).

  7. 7

    Beckman, D., Chari, A. N., Devabhaktuni, S. & Preskill, J. Efficient networks for quantum factoring. Phys. Rev. A 54, 1034–1063 (1996).

  8. 8

    Jones, J. A. NMR quantum computation. Prog. NMR Spectrosc. 38, 325–360 (2001).

  9. 9

    Vandersypen, L. M. K. et al. Experimental realization of an order-finding algorithm with an NMR quantum computer. Phys. Rev. Lett. 85, 5452–5455 (2000).

  10. 10

    Knill, E., Laflamme, R., Martinez, R. & Tseng, C.-H. An algorithmic benchmark for quantum information processing. Nature 404, 368–370 (2000).

  11. 11

    Gershenfeld, N. & Chuang, I. L. Bulk spin-resonance quantum computation. Science 275, 350–356 (1997).

  12. 12

    Cory, D. G., Fahmy, A. F. & Havel, T. F. Ensemble quantum computing by NMR spectroscopy. Proc. Natl Acad. Sci. 94, 1634–1639 (1997).

  13. 13

    Schulman, L. & Vazirani, U. in Proc. 31st ACM Symp. on Theory of Computing 322–329 (Association for Computing Machinery, New York, 1999).

  14. 14

    Chuang, I. L., Laflamme, R., Shor, P. & Zurek, W. H. Quantum computers, factoring, and decoherence. Science 270, 1633–1635 (1995).

  15. 15

    Freeman, R. Spin Choreography (Spektrum, Oxford, 1997).

  16. 16

    Braunstein, S. L. et al. Separability of very noisy mixed states and implications for NMR quantum computing. Phys. Rev. Lett. 83, 1054–1057 (1999).

  17. 17

    Schack, R. & Caves, C. M. Classical model for bulk-ensemble NMR quantum computation. Phys. Rev. A 60, 4354–4362 (1999).

  18. 18

    Linden, N. & Popescu, S. Good dynamics versus bad kinematics: Is entanglement needed for quantum computation? Phys. Rev. Lett. 87, 047901 (2001).

  19. 19

    Coppersmith, D. An Approximate Fourier Transform Useful in Quantum Factoring (IBM Res. Rep. RC19642, IBM T. J. Watson Research Centre, Yorktown Heights, New York, 1994).

  20. 20

    Vold, R. L. & Vold, R. R. Nuclear magnetic relaxation in coupled spin systems. Prog. NMR Spectrosc. 12, 79–133 (1978).

  21. 21

    Jeener, J. Superoperators in magnetic resonance. Adv. Magn. Reson. 10, 1–51 (1982).

  22. 22

    Bloch, F. Nuclear induction. Phys. Rev. 70, 460–474 (1946).

  23. 23

    Kraus, K. States, Effects, and Operations: Fundamental Notions of Quantum Theory (Springer, Berlin, 1983).

  24. 24

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

  25. 25

    Kane, B. E. A silicon-based nuclear spin quantum computer. Nature 393, 133–137 (1998).

  26. 26

    Loss, D. & DiVincenzo, D. P. Quantum computation with quantum dots. Phys. Rev. A 57, 120–126 (1998).

  27. 27

    Vandersypen, L. M. K. et al. Implementation of a three-quantum-bit search algorithm. Appl. Phys. Lett. 76, 646–648 (2000).

  28. 28

    Aho, A. V., Sethi, R. & Ullman, J. D. Compilers: Principles, Techniques and Tools (Addison-Wesley, Reading, Massachusetts, 1986).

  29. 29

    Green, M., Mayne, N. & Stone, F. G. A. Chemistry of the metal carbonyls. Part XLVI. Perfluorobutadienyl iron, rhenium and manganese complexes. J. Chem. Soc. A 902–905 (1968).

  30. 30

    Leung, D. W. et al. Efficient implementation of selective recoupling in heteronuclear spin systems using Hadamard matrices. Phys. Rev. A 61, 042310 (2000).

Download references


We thank X. Zhou and J. Preskill for discussions, J. Smolin for the use of his IBM workstation, D. Miller for help with spectral analysis, A. Schwartz and his team for their technical assistance, and J. Harris, W. Risk and H. Coufal for their support. L.V. acknowledges a Yansouni Family Stanford graduate fellowship. This work was supported in part by the QuARC project under a DARPA Quantum Information Science and Technology grant.

Author information

Rights and permissions

Reprints and Permissions

About this article

Further reading

Figure 1: Quantum circuit for Shor's algorithm.
Figure 2: Structure and properties of the quantum computer molecule, a perfluorobutadienyl iron complex with the inner two carbons 13C-labelled.
Figure 3: NMR spectra at different stages in the computation.
Figure 4: Pulse sequence for implementation of the quantum circuit of Fig. 1 for a = 7.


By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.