Skip to content
Current section
The Quantum Computing Enthusiast’s Hub
Saved
All sections

All sections

Saved
Skip Learn navigation
Encyclopedia
Glossary

Oracle cost

Oracle cost is the work required to implement a callable subroutine that an algorithm treats as a black box. A small number of oracle calls does not necessarily mean a short or cheap computation.

Edition released Entry updated Coverage: Overview · Technical
On this page

Plain-language explanation

Theoretical algorithms often count queries to a function or state-preparation routine while abstracting away its implementation. That is useful for isolating algorithmic structure. In an application, however, the oracle may need a substantial reversible circuit, data access and temporary storage. Its cost must be multiplied by how often it is used and combined with the rest of the workflow.

This is a key bridge between textbook speedups and practical applications. It prevents treating a mathematical query as a free physical operation.

Example

A risk-estimation algorithm may call a routine that prepares a distribution and evaluates a loss function. Reducing the number of calls can help, but each call may be far more expensive than one classical sample. A complete comparison must account for both counts and costs.

Scope and limits

Query complexity remains a valid theoretical measure even when implementation is expensive. The error is presenting it as a measured end-to-end runtime without the missing assumptions.

Gate count is a related idea. Gate count describes an implementation’s operations. Oracle-query count abstracts a whole subroutine into one call; translating between them requires specifying the oracle circuit and architecture.

Sources

  • Montanaro · Reference · pmc.ncbi.nlm.nih.gov
    Verification scope

    Recorded source check ·

    Quantum mean estimation under access assumptions

    Query improvements exclude uncharged implementation overhead

  • Dhawal Jethwani, Francois Le Gall and Sanjay K. Singh · Reference · drops.dagstuhl.de
    Verification scope

    Recorded source check ·

    Classical sampling access and dequantization

    Limited problem/access classes; not all quantum algorithms

  • Microsoft Quantum · Reference · quantum.microsoft.com
    Verification scope

    Recorded source check ·

    Qubit/time tradeoffs and resource estimation

    Assumptions must accompany every output