Checkpoint: Estimate Algorithm Resources
This checkpoint asks you to do what every quantum software engineer eventually must: take an algorithm and a hardware model and produce a concrete resource estimate. You will chain the three skills from this module — counting algorithmic repetitions, converting them to a -count, and reasoning about the fault-tolerant cost model — into a single end-to-end number.
The estimation pipeline
A fault-tolerant resource estimate flows through four stages, each feeding the next:
This lesson walks the first three stages explicitly for Grover's search and leaves the last as commentary, because the -count is the number that drives everything below it.
Stage 1 — how many iterations?
Grover over items with one marked entry needs
iterations (the result from the Resource Estimation lesson). For , , so and . The quadratic speedup is already vivid: 12 iterations to search 256 items, versus 128 expected classical probes.
Stage 2 — T-count per iterate
Each Grover iterate is an oracle followed by the diffusion operator, and both are built largely from Toffoli gates (the multi-controlled phase flips). For this estimate we model each iterate as 5 Toffoli gates, and from the Counting T-Gates lesson each Toffoli costs 7 gates in the Clifford+T set. So
The Clifford gates (, CNOT, ) in the iterate are free in the fault-tolerant cost model, so they do not enter the headline number.
Stage 3 — total T-count
Multiplying the per-iterate -count by the number of iterates gives the algorithm's leading -count:
That single number — 420 gates — is the dominant fault-tolerant cost of this Grover instance, and it is what your solution returns.
Stage 4 — what 420 T gates implies (commentary)
The -count then drives the physical estimate from the Logical vs Physical lesson:
- Magic states. Each consumes one distilled magic state, so 420 distillations must be scheduled; the distillation factories often dominate the physical qubit budget.
- Physical qubits. With data qubits plus diffusion ancillas encoded at a code distance chosen so the logical error rate over all 420 operations stays acceptable, the width is plus factory overhead.
- Runtime. .
Each of those follows mechanically once the -count and the target error budget are fixed — which is exactly why -count is the number engineers fight to minimise.
Try it
Produce the end-to-end estimate: for an Grover search, compute the iteration count , multiply by the per-iterate -count ( Toffolis each ), and return the total -count as an integer. The grader checks the value and that it is a whole number.
Sign in on the full site to ask questions and join the discussion.