Go to file
2025-05-15 09:39:54 +03:00
.github/workflows ci(publish): add auto publish to pypi 2025-05-08 09:47:06 +03:00
media docs: update readme 2025-05-15 09:39:54 +03:00
src/grovers_visualizer feat(cli): add phase arg 2025-05-08 18:49:39 +03:00
.gitignore chore: remove .python-version file 2025-04-22 16:13:22 +03:00
LICENSE Create LICENSE 2025-04-20 16:26:07 +03:00
pyproject.toml feat(circuits): improve runtime speed 2025-05-08 17:12:58 +03:00
README.md docs: update readme 2025-05-15 09:39:54 +03:00
uv.lock docs: update readme 2025-05-15 09:39:54 +03:00

Grovers Search Visualizer

A tiny Python package that steps through Grovers Search algorithm and shows you, after each iteration:

  • A barchart of amplitudes (or probabilities)
  • A sinecurve of successprobability vs. iteration
  • A geometric "rotation" on the unit circle

Demo of Grover’s Visualizer


Installation

Using uv/uvx

uvx grovers-visualizer 1111

Using pip/pipx

pip grovers-visualizer
# or
pipx grovers-visualizer # (recommended)

# and then run
grovers-visualizer

Usage

Flags

  • TARGET
    Target bitstring (e.g. 010). Length also determines number of qubits.
  • -i, --iterations ITERATIONS
    Max iterations; 0 means use the optimal \lfloor\frac\pi4\sqrt{2^n}\rfloor.
  • -s, --speed SPEED
    Delay between iterations (seconds). Default 0.5.
  • -p, --phase PHASE
    The phase \psi (in radians) used for both the oracle and diffusion steps. Defaults to \pi (i.e. a sign-flip, e^{i\pi}=-1).

License

This project is licensed under the MIT License - see the LICENSE file for details.