Skip to main content

Crate quantum_planning

Crate quantum_planning 

Source
Expand description

§Quantum planning

Quantum algorithms for planning and search, on simulators: Grover search, quantum backtracking, amplitude estimation, quantum walks on game trees and QAOA.

§Scope

  • A state-vector simulator (StateVector) with H, X, Z, phase and multi-controlled Z gates, measurement probabilities and seeded sampling over any rand_core::Rng
  • Grover search over candidate plans, with phase oracles (PhaseOracle) built from validity checks, for a known (grover::search_known) and an unknown (grover::search_unknown, BBHT) number of solutions
  • Quantum backtracking (Montanaro) as a quantum walk on search trees (planned)
  • Amplitude estimation for Monte Carlo value estimates, as used in MCTS rollouts (planned)
  • Quantum-walk evaluation of game trees (NAND trees) (planned)
  • QAOA circuits for QUBO-encoded planning problems (planned)
  • Query-count comparisons against the classical algorithms

§Query count

The algorithms count oracle queries, not simulator work: one application of a PhaseOracle is one query, and one classical check of a measured candidate is one query. Compare these counts with the queries of a classical scan.

The crate is no_std and needs alloc for the amplitudes.

Repository: https://github.com/sunsided/quantum-planning

Modules§

grover
Grover search: amplitude amplification of the states that a PhaseOracle marks.

Structs§

Complex
A complex number re + i·im with f64 parts.
PhaseOracle
A phase oracle built from an Oracle and a map from basis index to candidate.
SplitMix64
The SplitMix64 generator: fast, seedable and reproducible on every platform.
StateVector
The state of an n-qubit register as 2^n complex amplitudes.
TooManyQubits
The error for a register with more than MAX_QUBITS qubits.

Constants§

MAX_QUBITS
The largest register the simulator accepts: 2^24 amplitudes, 256 MiB of state.

Traits§

Oracle
A predicate that marks valid candidates, the oracle of a quantum search.