Physics Forums Insights
  • Physics
    • Mechanics
    • Thermodynamics
    • Electromagnetism
    • Fluids
    • Optics
    • Particles
    • Quantum
    • Relativity
    • Biophysics
  • Astronomy
    • Astrophysics
    • Cosmology
    • Observing
  • Mathematics
    • Algebra
    • Analysis
    • Geometry
    • Number Theory
    • Probability
  • Computing
    • Programming
    • Electronics
    • Imaging
  • Science Culture
    • Education
    • Careers
    • Philosophy
    • Profiles
    • Trivia
  • Forums
  • Click to open the search input field Click to open the search input field Search
  • Menu Menu
quantum computers 101

Quantum Computing Explained: Qubits, Grover’s & Shor’s Algorithms

July 14, 2022/5 Comments/in Physics Articles, Quantum, Technology Guides/by Bob Walance
šŸ“–Read Time: 9 minutes
šŸ“ŠReadability: Advanced (Technical knowledge needed)
šŸ”–Core Topics: HEADSTAILSquantumqubitsstate

Quantum computers process certain kinds of information far faster than conventional computers by using qubits, which hold many combinations of values simultaneously instead of one value at a time. Grover’s algorithm demonstrates this by locating a target among 16 basis states in four steps, and Shor’s algorithm factors large numbers fast enough to threaten standard encryption, though a computer large enough to do so does not yet exist.

Table of Contents

  • Key Takeaways
  • What Is Quantum Computing?
    • Conventional Computers vs. Quantum Computers
  • Why Is Quantum Computing Needed?
  • How Do Coins Illustrate Quantum Information?
    • Single Coin
    • Spinning Coin
    • Three Coins
    • Initialized Three-Coin State
    • Equal-Probability State
    • Scaling to 100 Coins
  • What Are Quantum Binary Digits (Qubits)?
    • Qubit Control and Measurement
  • How Do Qubits Encode Information?
    • Basis States and Probabilities
  • What Is Grover’s Algorithm?
    • Example: Searching 16 States
  • What Is Shor’s Algorithm?
    • Cryptography Implications
  • Frequently Asked Questions
    • What is a qubit?
    • Why do companies invest in quantum computing?
    • How much information can qubits represent compared to coins?
    • What does Grover’s algorithm demonstrate?
    • Could Shor’s algorithm break current encryption?
  • Glossary
  • Other Resources

Key Takeaways

  • A conventional coin, once initialized, measures HEADS with probability 1|HEADS> and TAILS with probability 0|TAILS>, while a spinning coin measures each outcome with probability 1/2.
  • Three coins in combination have eight possible measurement outcomes, and 100 coins have 2^100 possible outcomes, approximately 1,000,000,000,000,000,000,000,000,000,000.
  • Grover’s algorithm, demonstrated here on a 16-state search using four qubits, drives the probability of one basis state (|duuu>) to 1 after four generations of updates, guaranteeing that basis state is measured.
  • Shor’s algorithm, created by Peter Shor in 1994, factors large numbers much faster on a quantum computer than on a conventional one.
  • RSA and Diffie-Hellman encryption rely on the difficulty of factoring a six-hundred-digit number (2048 bits), a task that would take classical supercomputers trillions of years.
  • A quantum computer with 6,000 error-corrected qubits would be able to factor a six-hundred-digit number in under an hour, according to the discussion presented here.

What Is Quantum Computing?

Quantum computing is a technology that processes certain types of information much faster than conventional computers. Major companies including Google, Microsoft, IBM, and Intel are investing heavily in its development because of its potential to solve problems that are currently infeasible for classical machines, such as designing efficient carbon capture methods to address climate change.

Quantum computing draws on the principles of quantum mechanics to manipulate large amounts of information rapidly, with potential applications in cryptography, optimization, and environmental science. Practical, large-scale quantum computers are still in development, and research continues to expand what is possible with the technology.

Conventional Computers vs. Quantum Computers

Conventional computers, from desktop machines to supercomputers, all process information using the same underlying approach; a supercomputer is simply much faster and more expensive than smaller machines. Quantum computers, built by companies such as IBM, Google, and Microsoft, process information differently, using quantum binary digits, or qubits, rather than conventional bits.

examples of computers

quantum computers

Why Is Quantum Computing Needed?

Conventional machines cannot complete certain computational tasks within any practical amount of time. Creating an efficient way to remove carbon from the atmosphere is one potential Earth-changing application for quantum computers.

quantum computing applications

How Do Coins Illustrate Quantum Information?

Single Coin

A coin can be “measured” by stopping it from spinning and observing it, or simply by looking at it while it is not spinning. If the coin is first placed into an initialized state that always results in HEADS when measured, there is a 100% probability of measuring HEADS and a 0% probability of measuring TAILS. These probabilities are written alongside the resulting coin states as follows:

  • 100/100|HEADS> or 1|HEADS>
  • 0/100|TAILS> or 0|TAILS>

Spinning Coin

When the coin is spun instead, measuring it results in either HEADS or TAILS with equal probability. The two pieces of information associated with the spinning coin are 50/100|HEADS> (or 1/2|HEADS>) and 50/100|TAILS> (or 1/2|TAILS>). Repeated spins and measurements converge toward a 50% HEADS, 50% TAILS split as more trials are tabulated.

Three Coins

Three coins considered in combination have eight possible measurement outcomes, not six, because each outcome reflects a specific arrangement of all three coins together. These eight states are:

  • |HEADS HEADS HEADS>
  • |HEADS HEADS TAILS>
  • |HEADS TAILS HEADS>
  • |HEADS TAILS TAILS>
  • |TAILS HEADS HEADS>
  • |TAILS HEADS TAILS>
  • |TAILS TAILS HEADS>
  • |TAILS TAILS TAILS>

Initialized Three-Coin State

When three coins are placed into their initialized state, all three will measure HEADS. The eight probabilities for this initialized state are:

  • 1|HEADS HEADS HEADS> (all three coins always measure HEADS)
  • 0|HEADS HEADS TAILS>
  • 0|HEADS TAILS HEADS>
  • 0|HEADS TAILS TAILS>
  • 0|TAILS HEADS HEADS>
  • 0|TAILS HEADS TAILS>
  • 0|TAILS TAILS HEADS>
  • 0|TAILS TAILS TAILS>

Equal-Probability State

When the three coins are set spinning, all eight possible states have equal probability of one-out-of-eight:

  • 1/8|HEADS HEADS HEADS>
  • 1/8|HEADS HEADS TAILS>
  • 1/8|HEADS TAILS HEADS>
  • 1/8|HEADS TAILS TAILS>
  • 1/8|TAILS HEADS HEADS>
  • 1/8|TAILS HEADS TAILS>
  • 1/8|TAILS TAILS HEADS>
  • 1/8|TAILS TAILS TAILS>

Scaling to 100 Coins

The number of pieces of information for any given number of coins equals 2 raised to the power of the number of coins, meaning the number 2 is multiplied by itself once for each coin. For 100 coins, the number of pieces of information is 2^100, which equals approximately 1,000,000,000,000,000,000,000,000,000,000, or one-million-trillion-trillion pieces of information.

What Are Quantum Binary Digits (Qubits)?

Quantum computers use quantum binary digits, or qubits, as their basic units of information.

Qubit Control and Measurement

Qubits are “zapped” by the user to modify their states and are then measured, with each measurement revealing one of two possible values. Zapping and measuring certain types of qubits involves exposing them to precise amounts of microwave electromagnetic radiation. The images below show a quantum computer being programmed and an oscilloscope display showing the microwave waveforms used to zap the qubits.

qbit quantum computer

How Do Qubits Encode Information?

Basis States and Probabilities

Like a coin, a qubit yields one of two values when measured, and combinations of qubits carry probabilities for each possible combination of measured values, with each possible combination called a basis state. Unlike coins, the probabilities associated with each basis state in a quantum computer are progressively modified by the user until measurement reveals a meaningful answer.

Zapping a single qubit, or even multiple qubits, takes approximately one microsecond. For small quantum computers this is currently faster than modifying comparable information on a conventional supercomputer, though as larger numbers of qubits become available, multiplexing and demultiplexing of the zapping waveforms will likely be needed. By contrast, a conventional supercomputer can take a long time to modify a comparable amount of probability information, as the following table illustrates.

Comparison of time required for a quantum computer versus a conventional supercomputer to modify equivalent amounts of probability information, based on a supercomputer speed of one exaflop (10^18 floating point operations per second)
number of qbits

What Is Grover’s Algorithm?

Example: Searching 16 States

Grover’s algorithm is a quantum search algorithm. In this example, it searches through 16 envelopes, treated as basis states, where fifteen envelopes each contain a worthless small green piece of paper and one envelope contains a one-thousand-dollar bill.

The algorithm works by successively zapping four qubits so that the probability associated with one of the sixteen possible basis states becomes much larger than the other fifteen, with the highest-probability basis state corresponding to the envelope containing the prize. The two possible measured states for each qubit are written as |u> and |d>, so the sixteen basis states range from |uuuu> through |dddd>.

The table referenced below shows how the sixteen basis states of the four qubits change from the initialized state, through the equal-probability state, and then through four generations of basis state probability updates. By Generation 4, the probability for one basis state reaches 1, meaning every pass through the algorithm followed by measurement of the four qubits will yield the |duuu> basis state, identifying the envelope containing the money.

grovers algo

What Is Shor’s Algorithm?

Cryptography Implications

Shor’s algorithm, created by physicist Peter Shor in 1994, factors large numbers much faster on a quantum computer than on a conventional computer. Since its creation, it has raised awareness of the potential of quantum computing to disrupt cryptography.

The one-digit number 6 is easy to factor into its two prime factors, and the two-digit number 15 is also simple to factor. The three-digit number 143 might take a fourth-grade student a couple of minutes to factor into 11 and 13, but a number with six hundred digits is effectively impossible for classical supercomputers to factor, since it would take them trillions of years to find the two factors.

The RSA and Diffie-Hellman encryption schemes that secure internet transactions rely on the difficulty of factoring a six-hundred-digit number (2048 bits). A quantum computer with 6,000 error-corrected qubits would be able to factor such a number in less than an hour, though we remain many years away from having a quantum computer large enough to threaten online data security, and quantum encryption schemes under development are intended to keep data safe ahead of that threat.

Frequently Asked Questions

What is a qubit?

A qubit, or quantum binary digit, is the basic unit of information in a quantum computer. Unlike a conventional bit, a qubit can be zapped by the user to modify its state, and measuring it reveals one of two possible values, similar to how measuring a spinning coin reveals either heads or tails.

Why do companies invest in quantum computing?

Companies including Google, Microsoft, IBM, and Intel invest heavily in quantum computing because it has the potential to solve problems that are currently infeasible for classical computers, such as designing efficient methods for carbon capture to help address climate change.

How much information can qubits represent compared to coins?

The number of pieces of information scales as 2 raised to the number of coins or qubits. For 100 coins, this equals 2^100, approximately 1,000,000,000,000,000,000,000,000,000,000 pieces of information, illustrating how quickly the amount of representable information grows.

What does Grover’s algorithm demonstrate?

In the example given, Grover’s algorithm searches 16 basis states (envelopes) by successively zapping four qubits until the probability of one basis state, |duuu>, reaches 1 after four generations of updates, guaranteeing that state is measured as the answer.

Could Shor’s algorithm break current encryption?

Shor’s algorithm, created by Peter Shor in 1994, can factor large numbers quickly on a quantum computer, threatening RSA and Diffie-Hellman encryption, which rely on factoring six-hundred-digit (2048-bit) numbers. A computer with 6,000 error-corrected qubits could do this in under an hour, but such a computer does not yet exist, and we remain many years away from this threat.

Glossary

  • Qubit: a quantum binary digit, the basic unit of information in a quantum computer, which can be zapped to modify its state and measured to reveal one of two values.
  • Basis state: a possible combination of measured values for a set of qubits, each carrying its own probability.
  • Grover’s algorithm: a quantum search algorithm that increases the probability of one target basis state among many through successive rounds of qubit manipulation.
  • Shor’s algorithm: a quantum algorithm created by Peter Shor in 1994 that factors large numbers much faster than classical methods, with implications for RSA and Diffie-Hellman encryption.
  • Exaflop: a unit of computing speed equal to 10^18 floating point operations per second.

Other Resources

A video discussing carbon capture (at 3 minutes 50 seconds) is available here: Carbon capture discussion video.

The specific implementation of Grover’s algorithm used for the table values is shown in Figure 1d of the following paper: Nature Communications article on Grover’s algorithm implementation.

  • The Sounds of IBM (IBM)
  • Inside the Google Quantum AI Campus (Google)
  • The Map of Quantum Computing (Domain of Science)
Bob Walance
Bob Walance
Educational Background: Undergrad
Degree in: Electrical and Electronic Engineering

More Related Articles

  • The Unreasonable Effectiveness of the Popescu-Rohrlich Correlations
  • PBS Video Comment: “What If Physics IS NOT Describing Reality”
  • Answering Mermin’s Challenge with the Relativity Principle
  • How Quantum Information Theorists Revealed the Relativity Principle at the Foundation of Quantum Mechanics
  • Schrƶdinger’s Cat and the Qbit
  • How to Better Define Information in Physics
Tags: General, Guide, quantum physics, superposition, technology
Share this entry
  • Share on Facebook
  • Share on X
  • Share on WhatsApp
  • Share on LinkedIn
  • Share on Reddit
  • Share by Mail
https://www.physicsforums.com/insights/wp-content/uploads/2022/07/quantum-computers-101.png 135 240 Bob Walance https://www.physicsforums.com/insights/wp-content/uploads/2019/02/Physics_Forums_Insights_logo.png Bob Walance2022-07-14 21:35:572026-11-08 09:54:08Quantum Computing Explained: Qubits, Grover’s & Shor’s Algorithms
You might also like
Compton Scattering Massive Meets Massless: Compton Scattering Revisited
chemist Interview with a Chemist: Borek
mathiq Low IQ or Bad Grades? Why You Can Still Succeed in Math
bloatware android phones Debloating Android Phones: Risks, Myths and Safe Tips
earth year How to Scientifically Measure How Many Days Are in a Year
personaltheories1 Why Won’t You Look at My New Theory?
5 replies
  1. Bob Walance
    Bob Walance says:
    May 31, 2023 at 8:29 pm

    ”

    ”
    I have updated the PDF (now rev 4) with a few clarifications and corrections. Also, a table of contents has been added.

    Log in to Reply
  2. Ssnow
    Ssnow says:
    August 20, 2022 at 2:40 am

    “Quantum computation and quantum Information” by Nielsen e Chuang.
    Ssnow

    Log in to Reply
  3. anorlunda
    anorlunda says:
    July 18, 2022 at 7:21 am

    I love the challenge to learn offered by this thread. Thank you [USER=89234]@Bob Walance[/USER] .

    I’m working my way carefully through Quantum Algorithm Implementations for Beginners linked in #2. I

    I’m stuck on the notation in equation 11, page 18:5. I presume that the summation is for all possible values of X2 and X3, but I don’t see how the notation says that.

    [ATTACH type=”full”]304332[/ATTACH]

    Log in to Reply
  4. vanhees71
    vanhees71 says:
    July 15, 2022 at 7:50 am

    Here’s the direct publisher’s link to the book mentioned in #1. It’s open access!

    [URL]https://rd.springer.com/book/10.1007/978-3-030-61601-4[/URL]

    Log in to Reply
  5. Greg Bernhardt
    Greg Bernhardt says:
    July 14, 2022 at 9:39 pm

    The Insight is live at [URL]https://www.physicsforums.com/insights/quantum-computing-for-beginners/[/URL]

    Log in to Reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply Cancel reply

You must be logged in to post a comment.

Popular Articles

  • The Block Universe – Refuting a Common Argument
  • The Birth of a Physics Textbook: An Author’s Journey
  • Emergence From the Superpoint
  • Lenses and Pinholes: What Does ā€œIn Focusā€ Mean?
  • I Know the Math Says so, but Is It Really True?
  • Interview with Mentor Evo
  • Introduction to Evolution: Key Concepts & FAQs Guide
  • Beginner Telescope Buying Guide: Dobsonians, Binoculars & More
  • Why Uranus Spins on Its Side: Tilt, Theories, Models
  • Learn All About Earth’s Gravity

Physics Forums

  • Classical Physics
  • Atomic and Condensed Matter
  • Quantum Physics
  • Special and General Relativity
  • Beyond the Standard Model
  • High Energy, Nuclear, Particle Physics
  • Astronomy and Astrophysics
  • Cosmology
  • Other Physics Topics

Receive Insights Articles to Your Inbox

Enter your email address:

Blog Information

  • Become a Member!
  • Write for Us!
  • Table of Contents
  • Blog Author List

Popular Topics

black holes (23) classical physics (35) education (23) FAQ (58) General (230) general relativity (23) Graduate (186) gravity (25) Guide (86) interview (49) mathematics (39) mathematics self-study (21) Physicist (27) Quantum Field Theory (34) quantum mechanics (38) quantum physics (24) relativity (40) Special Relativity (22) Tutorial (147) Undergraduate (288)
2026 Ā© Physics Forums, ALL RIGHTS RESERVED - Contact Us - Privacy Policy - About PF Insights
  • Link to X
  • Link to Facebook
  • Link to LinkedIn
Link to: A Physics Misconception with Gauss’ Law Link to: A Physics Misconception with Gauss’ Law A Physics Misconception with Gauss’ Lawgauss law misconceptions Link to: P vs. NP and what is a Turing Machine (TM)? Link to: P vs. NP and what is a Turing Machine (TM)? pvsnpP vs. NP and what is a Turing Machine (TM)?
Scroll to top Scroll to top Scroll to top