1. Home
  2. 3Blue1Brown

May 4, 2025

How quantum computers find answers by only checking them

16 min → 1:40

Overview

The host of 3Blue1Brown clears up a common misconception about Grover's algorithm, using Sudoku and cryptographic hashes to explain how quantum operations verify answers without knowing them beforehand.

3 things to know

Grover's Algorithm Misconception

The central point of confusion is that the algorithm seems to require knowing the "correct" axis (the solution) to perform a key operation (the flip), which would defeat its purpose.

▶ Watch at 0:08

Verifier vs. Solver

The algorithm doesn't use a function that knows the answer.

More

Instead, it uses a "verifier" function, one that can check if a proposed solution is correct. Knowing how to verify a correct Sudoku board, for example, does not mean you already know the solution.

▶ Watch at 1:46

Classical to Quantum Translation

A classical verifier function (e.g., a set of logic gates that returns 1 for a correct solution and 0 for an incorrect one) is translated into a quantum operation.

More

This quantum operation multiplies the state vector corresponding to the correct solution by -1 (a flip) and leaves all other state vectors unchanged.

▶ Watch at 9:25

Also in this episode

Linearity in Quantum Operations

Quantum operations are linear.

More

When an operation is applied to a superposition of states, the result is the same as applying the operation to each individual state and then summing the results. This allows the "flip" to be applied to the correct component of a superposition vector without needing to isolate it first.

Practical Limitations

Even with the quadratic speedup offered by Grover's algorithm, for problems with astronomically large search spaces (like breaking SHA-256), the number of required steps can still be infeasibly large, tempering some of the hype around its practical applications.

Quotes

“Just because you know how to verify a solution, it's not at all obvious what the solution is in the first place. This is after all why a Sudoku is a puzzle. The rules alone don't reveal the answer.”

▶ Watch at 1:46

“When I say that operations in quantum computers are linear, what I mean is that if you pass in one of these weighted sums of the different basis directions...then the output looks like the same weighted sum but of the transformed versions of each vector.”

▶ Watch at 9:25

“Based on the comments that I saw, I think there was a very common point of confusion that reveals I clearly could have done a better job explaining a core piece of it.”

▶ Watch at 0:08

Full summary

Episode Overview

  • This episode serves as a supplement to a previous video on quantum computing, specifically addressing a common point of confusion regarding Grover's algorithm.
  • The host clarifies the misconception that one needs to know the answer to a problem before using the algorithm to find it.
  • Concrete examples like solving Sudoku and breaking cryptographic hashes are used to explain the difference between a "verifier" function and a "solver" function.
  • The episode explains how a classical verifier function is translated into a quantum operation and highlights the core principles of linearity and superposition in this context.

Key Concepts

  • Grover's Algorithm Misconception: The central point of confusion is that the algorithm seems to require knowing the "correct" axis (the solution) to perform a key operation (the flip), which would defeat its purpose.
  • Verifier vs. Solver: The algorithm doesn't use a function that knows the answer. Instead, it uses a "verifier" function—one that can check if a proposed solution is correct. Knowing how to verify a correct Sudoku board, for example, does not mean you already know the solution.
  • Classical to Quantum Translation: A classical verifier function (e.g., a set of logic gates that returns 1 for a correct solution and 0 for an incorrect one) is translated into a quantum operation. This quantum operation multiplies the state vector corresponding to the correct solution by -1 (a flip) and leaves all other state vectors unchanged.
  • Linearity in Quantum Operations: Quantum operations are linear. When an operation is applied to a superposition of states, the result is the same as applying the operation to each individual state and then summing the results. This allows the "flip" to be applied to the correct component of a superposition vector without needing to isolate it first.
  • Practical Limitations: Even with the quadratic speedup offered by Grover's algorithm, for problems with astronomically large search spaces (like breaking SHA-256), the number of required steps can still be infeasibly large, tempering some of the hype around its practical applications.

Quotes

  • At 00:08 - "Based on the comments that I saw, I think there was a very common point of confusion that reveals I clearly could have done a better job explaining a core piece of it." - The host acknowledges viewer feedback and sets the stage for clarifying a key aspect of Grover's algorithm.
  • At 01:46 - "Just because you know how to verify a solution, it's not at all obvious what the solution is in the first place. This is after all why a Sudoku is a puzzle. The rules alone don't reveal the answer." - Explaining the crucial distinction between a function that verifies an answer and one that knows the answer from the start.
  • At 09:25 - "When I say that operations in quantum computers are linear, what I mean is that if you pass in one of these weighted sums of the different basis directions...then the output looks like the same weighted sum but of the transformed versions of each vector." - The host provides a clear definition of linearity, which is the key property enabling the algorithm to work on a superposition of all possible answers simultaneously.

Takeaways

  • Grover's algorithm works by using a "verifier" function, not a function that already knows the answer. This verifier can check any given input and confirm if it's the correct one.
  • The power of quantum computing lies in its ability to translate this classical verifier into a quantum operation that acts on a superposition of all possible inputs at once.
  • Due to the principle of linearity, the quantum operation can "flip" the phase of the correct solution's vector component without needing to know which component that is ahead of time.
  • While Grover's algorithm provides a significant speedup (quadratic), it doesn't make all impossibly large problems solvable. For many cryptographic applications, the search space remains too vast to crack even with this improvement.

Watch the full episode 16 min

Read along with the audio summary

A famous quantum computing tool seems to require knowing the exact solution to a problem before you can even use the tool to find it. This supplement to a previous video on quantum computing came out on May 4, 2025, featuring the host breaking down Grover's algorithm. By the end, you will understand how a quantum computer finds a hidden answer without knowing it in advance, and why some problems remain too big to solve.

Why a famous quantum search tool looks like a circular trap.

At first glance, Grover's algorithm seems to defeat its own purpose. In geometry terms, the algorithm performs a key operation called a flip around the axis that represents the correct solution. It looks like you have to know the exact answer just to set up the math that finds the answer.

To see why that is not actually a contradiction, you learn how checking an answer replaces knowing the answer.

You do not need a crystal ball to build a working search tool. Instead of a solver function that already knows the answer, Grover's algorithm relies on a verifier function, which simply checks whether a proposed answer is right or wrong. The host points out that knowing the rules to check if a completed Sudoku board is valid does not mean the solution is obvious from the start.

Once you have a rule checker, you can turn a simple yes or no test into a quantum flip.

A standard computer checks an answer using logic gates, which are basic building blocks that output a one if a proposed solution is right and a zero if it is wrong. Quantum computing translates that classical verifier into a quantum operation. Instead of spitting out a one or a zero, this quantum version takes the state vector and multiplies it by negative one if it is the right solution.

This leads to how a quantum computer flips the right answer while hiding it in a crowd.

The secret to flipping the correct arrow without isolating it first is a math property called linearity. In a quantum computer, you can bundle all possible answers together at once into a combined state called a superposition, which the host describes as a weighted sum of different directions. Because quantum operations are linear, running the verifier on this massive bundle produces the exact same result as testing every single answer individually and adding the results back together.

Why even this quantum shortcut hits a wall on massive problems.

Even though Grover's algorithm provides what is called a quadratic speedup, meaning it cuts the work down substantially, it cannot magically solve everything. For example, when trying to break cryptographic hashes like SHA 256, the pool of possibilities is so vast that this quantum speedup still is not enough to crack it, which tempers some of the hype around its practical applications.

Grover's algorithm works by translating a classical rule checker into a linear quantum operation, flipping the phase of the right answer inside a superposition of all possibilities at once. Even with this quadratic speedup, many cryptographic search spaces remain far too vast to crack. Just because you know how to verify a solution, it's not at all obvious what the solution is in the first place. This is after all why a Sudoku is a puzzle. The rules alone don't reveal the answer.

More from 3Blue1Brown

Related Episodes