Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
oracq documentation
oracq documentation

Manuals

  • Complete documentation
    • Installation and environment
    • Operations, registers, and the generation process
    • Source code structure
    • Oracles and operator representations
    • QRAM data structures: pointers, offsets, and random writes
    • Quantum data structures and the KP recommendation system
    • Conventions owned by algorithms: starting from one gate
    • Implementing QPDE/QODE: multiple input paradigms, replaceable oracles, and protocols
    • Automatically generating reversible quantum modules from ordinary math functions
    • QFVM input models and solver replacement
    • General QHAM automatic generation: PDE → HAM → QCL → QODE
    • QCNN line-by-line implementation walkthrough
    • Export and execution backends
    • Resource estimation (Toffoli+Clifford+T+QRAM)
    • Command line
    • Import path migration
    • Applicability boundaries and validation status
  • Algorithm catalog
    • Data Loading and Input Models
      • State Preparation
      • Alias Sampling Preparation
      • XOR Database
      • Adjacency Oracle
      • Select-Swap QROM
      • QROM Lookup
      • Block Encoding Algebra
      • Sparse Access
      • Sparse Matrix Block Encoding
      • PREPARE–SELECT Decomposition
      • Purification Access
      • Gibbs State Preparation
      • Double Factorization
      • Tensor Hypercontraction
    • Basic Query Algorithms
      • Deutsch–Jozsa
      • Bernstein–Vazirani
      • Simon Sampling
    • Query and Search
      • Grover Search
      • Amplitude Amplification
      • Oblivious Amplitude Amplification
      • Fixed-Point Search
      • Amplitude Estimation
      • Quantum Counting
    • Fourier and Arithmetic
      • Quantum Fourier Transform
      • Fourier Addition
      • Order Finding
      • Modular Multiplication
      • Fixed-Point Arithmetic
      • Boolean Networks
    • Estimation and Testing
      • Quantum Phase Estimation
      • Hadamard Test
      • Swap Test
      • Heinrich Quantum Summation
      • Heinrich Quantum Integration
    • Hamiltonian Evolution and QSVT
      • Trotter Product-Formula Simulation
      • Hamiltonian Simulation Protocol
      • QSP Phase Synthesis
      • QSVT Phase Sequence
      • QSVT Matrix Inversion
      • QSVT Hamiltonian Simulation
      • Qubitization Walk
      • Truncated Taylor Block Encoding
      • Eigenstate Filtering
    • Quantum Linear Systems
      • Costa Walk QLSS
      • CKS Chebyshev QLSS
      • VTAA-CKS QLSS
    • Differential Equations
      • QODE Problem and Protocol
      • Linear Combination of Hamiltonian Simulations
      • Schrödingerization
      • CBMD
      • Fokker–Planck Input Model
      • Carleman Linearization
    • Variational and Optimization
      • Hardware-Efficient Ansatz
      • VQE Pauli Measurements
      • QAOA for MaxCut
      • Decoded Quantum Interferometry
      • Jordan Quantum Gradient Estimation
    • Quantum Walks
      • Coined Cycle Walk
      • Szegedy Walk
      • MNRS Quantum Walk Search
    • Quantum Machine Learning
      • Quantum Principal Component Analysis
      • QCNN
      • Density Matrix Exponentiation
    • Quantum Error Correction
      • Repetition Codes
    • Applications and Infrastructure
      • Quantum Finite Volume Method, QFVM
      • General QHAM
      • Math Function Compilation
  • Specification reference
    • Language and algorithm library conventions
    • RIR: the modular register-level intermediate representation
    • QRAM memory definition (qram YAML)
    • Open declarations, capabilities, and binding
    • MIR 0.1: the pure mathematical function graph
    • General QHAM: derivation from PDEs to quantum-adapted linear systems
    • Replacing the QLSS inside QFVM: a review of input models, QRAM data structures, and output contracts
    • OriginIR-ext and PySparQ review
  • API Reference
    • oracq package overview
    • Infrastructure API
      • Toffoli / U3 / CZ lowering
      • OriginIR-ext backend
      • PySparQ backend
      • Quantikz circuit export
      • Strict netlist export
      • Module builder
      • Resource estimation
      • Register reference executor
      • RIR objects
      • Register layout
      • Binding and capability analysis
      • Math-function compilation entry
      • Python math-function frontend
      • MIR objects
      • Math-function lowering
      • Math kernel generation
      • Native implementation registry
      • QRAM pointer-style read/write
      • QRAM YAML memory format
      • Host readout
      • RIR serialization
      • Structural validation
    • Algorithms API
      • Modular multiplication and order finding
      • Oracle query algorithms
      • Reversible arithmetic
      • Phase, amplitude, and overlap estimation
      • Fourier transforms and arithmetic
      • Hamiltonian evolution
      • Quantum summation and integration
      • PREPARE-SELECT decomposition
      • qsp_pyqsp
      • QSVT standard transforms
      • Search and amplitude amplification
      • solve
      • Operator-level synthesis optimization of spectral circuits
      • State-preparation composition
      • Matrix transform sequences
      • Quantum walks
      • Block-encoding composition
      • Algorithm contracts and reports
      • Select-Swap QROM data loading
      • Density-matrix input models and Gibbs states
      • Graph-walk search
      • initial
      • Algorithm structure protocols
      • Chemistry low-rank decomposition block encodings
      • QODE assembly interface
      • Operator wrappers and basic composition
      • Oracle declarations and implementations
      • PDE models and adapters
      • Quantum data structures (qsample and sample-and-query)
      • QHAM
      • Sparse-access adapters
      • Spectral input/output primitives and operator-level optimization
      • DQI decoding quantum interference optimization
      • Quantum gradient estimation
      • Variational algorithm circuits
      • Repetition codes and error recovery
      • Quantum linear systems
      • VTAA-CKS variable-time linear-system solver
      • Quantum convolutional neural networks
      • Quantum building blocks of QCNNs
      • QPCA quantum principal component analysis
      • Quantum semidefinite programming framework
      • KP quantum recommendation system
      • Carleman linearization
      • Quantum Newton method
      • CBMD
      • LCHS
      • Legacy compatibility entry points
      • QODE assembly interface
      • Linear ODE input models
      • Schrödingerization
      • SDE/Fokker–Planck input models
      • solver
      • PDE models and adapters
      • solver
    • Domain Applications API
      • Reference workload catalog
      • Flow fields and QRAM data
      • Algorithm gallery
      • Legacy compatibility entry points
      • oracle_study
      • QFVM application
      • QFVM direct QMem data path
      • QHAM PDE examples
      • QHAM finite closure
      • PDE models and adapters
      • Spatial discretization and classical reference
      • QHAM derivation report
      • Structured finite-difference ports
      • Roe matrix-element generation
      • Roe classical math formulas

Tutorials

  • Tutorials
    • Your first register program
    • Replacing an algorithm’s oracle
    • From a paper’s access model to implementation comparison
    • Search for an element and estimate the success probability
    • Supplying your own Hamiltonian decomposition
    • Swapping QODE methods for the same linear problem
    • Generating QHAM input from a PDE expression
    • Composing PDE inputs and solve instances
    • Composing linear ODE inputs and solve instances
    • Scientific computing workflows: input models, solvers, and reproduction
    • Running and modifying the algorithm gallery

Development

  • Development
    • Development and acceptance
    • Architecture paradigm and interface conventions
    • Framework survey notes (stage 1)
    • Writing documentation
    • Translation Glossary (Chinese → English)
    • Repository reorganization and the algorithm expansion panel
    • Algorithm research workflow improvements
    • Acceptance record for this version
    • Quantum algorithm implementation validation plan (review draft)
    • Validation coverage matrix
    • Quantum algorithm coverage workboard
Back to top
View this page

Fixed-Point Search¶

English · 简体中文

Category C2 · Module oracq.algorithms.common.qsvt · Stage V2

Overview¶

Fixed-point amplitude amplification: a search amplification that requires no advance knowledge of the initial amplitude and never overshoots from too many iterations. The construction follows the closed-form complementary polynomial of Yoder–Low–Chuang (cited in the source docstring): let \(L\) be the number of BE calls (it must be odd) and \(c = T_{1/L}(1/\delta)\); the complementary polynomial is \(Q(x) = \delta c\, R(c^2(1 - x^2))\) (\(R(u) = T_L(\sqrt{u})/\sqrt{u}\), an analytic polynomial), and \(P\) is obtained from the root-finding spectral decomposition of \(1 - (1 - x^2)Q^2\). The success probability achieved by the phase-sequence implementation is exactly

\[ P_S(x) = 1 - \delta^2\, T_L^2\!\bigl(c\sqrt{1 - x^2}\bigr), \]

so \(P_S \ge 1 - \delta^2\) whenever \(|x| \ge \sqrt{1 - 1/c^2}\), and the threshold decreases monotonically toward 0 as \(L\) grows (the fixed-point property).

Interface and input model¶

fixed_point_search_phases(delta, degree)
fixed_point_search(a, delta, degree)

API entry points: fixed_point_search_phases, fixed_point_search

  • fixed_point_search_phases: a purely numerical routine with no input model. delta is the error \(\delta \in (0, 1)\); degree is \(L\), which must be a positive odd number no greater than 20. Returns a tuple of phases in time order (length \(L + 1\)).

  • fixed_point_search: a is a BlockEncoding (input model BE); delta / degree as above. Returns a BlockEncoding whose zero-signal block is the complex polynomial \(P(A/\alpha)\), with success probability \(|P(x)|^2\) satisfying the YLC guarantee above.

Module attributes (fixed_point_search):

Attribute

Meaning

algorithm

"fixed_point_search"

be_alpha

normalization of the output BE (1.0 for this algorithm)

delta / qsp_degree

echo of the error parameter / \(L\)

threshold

amplification threshold \(\sqrt{1 - 1/c^2}\): for \(|x| \ge\) this value, the success probability is \(\ge 1 - \delta^2\)

Implementation notes¶

\(Q\) is expanded analytically from the odd Chebyshev coefficients plus powers of \((1 - x^2)\); the spectral decomposition of \(P\) uses Durand–Kerner root finding, clustering of repeated roots, and conjugate sign-flipped quadruple factors, with a factor-count self-check \(1 + 2\times(\text{factor count}) = L\); layer stripping then recovers the phases (same pipeline as QSP phase synthesis), with a self-check that \(|P(x)|^2\) and \(1 - (1 - x^2)Q(x)^2\) agree pointwise on a 512-point grid (an error above 1e-5 raises ValidationError).

This algorithm performs no real-part extraction: \(P\) itself is the target (\(|P| \le 1\) keeps the block encoding valid). The degree cap is 20 (half of the synthesis pipeline’s cap of 40). Applicability boundary: unlike Grover / amplitude amplification in search.py, which act on marked oracles, this entry point acts on the singular-value structure of a block encoding, and the spectral variable must lie in \([-1, 1]\).

Validation approach¶

Category C2 (approximate continuous semantics; acceptance criterion in ../../development/validation-plan.md §2). Three layers of evidence:

  • Structure: tests/core/test_qsvt.py:TransformWitnessTests.test_transform_input_validation (negative cases such as \(\delta \ge 1\) and even degrees).

  • Numerical: tests/core/test_qsvt.py:TransformWitnessTests.test_fixed_point_search_phase_properties — \(\delta = 0.4\), \(L \in \{3, 5, 7\}\): phase length \(L + 1\); a 400-point sweep gives \(|P(x)|^2 \le 1 + 10^{-9}\) and agrees pointwise with the YLC closed form \(1 - \delta^2 T_L^2(c\sqrt{1-x^2})\) (delta = 1e-5); above the threshold, \(P_S \ge 1 - \delta^2\); the threshold decreases monotonically with \(L\). test_fixed_point_search_circuit_amplifies — a 2×2 diagonal BE (\(\alpha = 0.6\), spectral variables 1.0 and \(1/6\)), \(\delta = 0.4\), \(L = 5\): the threshold attribute is cross-checked against \(\sqrt{1 - 1/c^2}\) (places = 3); the squared zero-signal amplitude in the circuit’s \(x = 1\) column is \(\ge 1 - \delta^2 - 10^{-9}\).

  • Binding: this algorithm has no independent binding witness (the input already requires a concrete BE).

Known gaps and planned stages¶

Consistent with the qsvt.py row of the validation coverage matrix: convergence scans are missing (batch curves of the threshold–error trade-off versus \(L\) are not automated, pending the convergence-scan framework of stage V2); the ill-conditioned negative cases (degree ≳ 16 or too-low precision) are partially covered by the parametrized input_validation tests, and a separate batch parametrization of “ill-conditioned inputs must raise” is still to be added.

Related links¶

  • Source: src/oracq/algorithms/common/qsvt.py

  • API reference: QSVT standard transforms

  • Same-family pages: QSP phase synthesis, QSVT phase sequences, VTAA-CKS variable-time solver

  • Validation matrix: Validation coverage matrix

Numerical validation¶

Experiment design: with \(\delta=0.3\) and \(L=5\) (threshold \(\sqrt{1-1/c^2}\approx0.3582\)), a diagonal block encoding encodes the scalar \(x\) into the zero-signal block (diagonal_block_encoding, both basis-state diagonal entries equal to \(x\)); the zero-signal success probability of the output BE of fixed_point_search is measured on the four backend paths (reference, rir-pysparq, adapter-pysparq, originir-ext) and compared against the YLC closed form \(P_S(x)=1-\delta^2 T_L^2(c\sqrt{1-x^2})\). Two spectral points sit on either side of the threshold: \(x=\cos(\pi/6)\approx0.8660\) (above the threshold, where \(P_S\ge1-\delta^2=0.91\) must hold) and \(x=0.3\) (below the threshold).

Case

Scale

Paths

Metric

Value

fixed-point-search-above-threshold

x=0.8660, δ=0.3, L=5

4 paths

success probability (closed form 0.991311) / error

0.991311 / 8.9e-16

fixed-point-search-below-threshold

x=0.3, δ=0.3, L=5

4 paths

success probability (closed form 0.772035) / error

0.772035 / 1.1e-16

The above-threshold instance satisfies the \(1-\delta^2\) guarantee (0.991311 ≥ 0.91), and the below-threshold instance still agrees pointwise with the closed form, showing that the success-probability curve of the phase-sequence implementation matches the theory across the whole spectral interval.

Reproduction command:

PYTHONPATH=src /home/agony/projects/qcfd-dev/quantum-cfd-software/.venv/bin/python tests/verification/verify_search_walks.py

Artifacts: out/verification/search_walks.json (cases fixed-point-search-above-threshold and fixed-point-search-below-threshold).

Next
Amplitude Estimation
Previous
Oblivious Amplitude Amplification
Copyright © 2026, oracq developers
Made with Sphinx and @pradyunsg's Furo
On this page
  • Fixed-Point Search
    • Overview
    • Interface and input model
    • Implementation notes
    • Validation approach
    • Known gaps and planned stages
    • Related links
    • Numerical validation