[{"data":1,"prerenderedAt":4},["ShallowReactive",2],{"pClez9nF9V":3},"# Lean-QuantumAlg\n\nLean-QuantumAlg is a Lean 4 library for formally verified quantum algorithms.\n\n## What's Lean-QuantumAlg?\n\nLean-QuantumAlg provides reusable definitions, primitives, and theorem\nstatements for quantum algorithms in Lean. It is built on Mathlib and CSLib,\nwith public theorem endpoints organized so readers and agents can import the\nmodules they need.\n\n### Aims\n\n- Provide a modest, reusable Lean library for quantum-algorithm formalization.\n- Keep algorithm statements tied to source references and stable import paths.\n- Follow Mathlib and CSLib conventions closely enough to support later upstream\n  review and reuse.\n\n## Using Lean-QuantumAlg in your project\n\nTo add Lean-QuantumAlg as a dependency to a Lake project, add the following to\nyour `lakefile.toml`:\n\n```toml\n[[require]]\nname = \"QuantumAlg\"\ngit = \"https://github.com/QudeLeap/Lean-QuantumAlg.git\"\nrev = \"main\"\n```\n\nUse Lean `v4.30.0`. Then import either the aggregate module or a focused module:\n\n```lean\nimport QuantumAlg\nimport QuantumAlg.Algorithms.Grover\nimport QuantumAlg.Algorithms.QPE\nimport QuantumAlg.Primitives.QFT\n```\n\nThe library currently includes:\n\n- `QuantumAlg.Core`: pure states, gates, tensor products, measurement, and the\n  shared CSLib `TimeM` cost adapter.\n- `QuantumAlg.Core.Components`: named gates, kets, oracle and control\n  components.\n- `QuantumAlg.Primitives`: reusable quantum-algorithm primitives such as phase\n  kickback, QSP, LCU, swap test, and amplitude amplification.\n- Circuit theorem endpoints: fixed-circuit statements such as Bell-state\n  preparation, GHZ-state preparation, and QFT.\n- `QuantumAlg.Algorithms`: end-to-end algorithm/protocol statements including\n  Deutsch-Jozsa, Bernstein-Vazirani, Grover, QPE, order finding, amplitude\n  estimation, teleportation, superdense coding, and Simon.\n\nTrusted cost annotations for query or iterate counts live beside the theorem\nendpoints they annotate and use the shared CSLib `TimeM` adapter.\n\nFor a quick build check:\n\n```bash\nlake exe cache get\nlake build\n```\n\nFor theorem discovery, start from `QuantumAlg.lean` or the module names above.\nLean docstrings cite the source references using keys resolved by\n`REFERENCES.json`.\n\n## Contributing and discussion\n\nIssues and pull requests are welcome. Please keep contributions small and\nsource-backed: algorithm claims should cite public references, and Lean changes\nshould build without `sorry`, `admit`, or new axioms.\n\n## License\n\nLean-QuantumAlg is released under the Apache License 2.0. See `LICENSE`.\n",1783784693629]