Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/panadestein/qbqn
A quantum interpreter in BQN
https://github.com/panadestein/qbqn
array-language bqn interpreter quantum-computing
Last synced: 19 days ago
JSON representation
A quantum interpreter in BQN
- Host: GitHub
- URL: https://github.com/panadestein/qbqn
- Owner: Panadestein
- License: mit
- Created: 2024-06-04T15:10:43.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-06-16T20:34:10.000Z (8 months ago)
- Last Synced: 2025-01-09T21:12:43.821Z (23 days ago)
- Language: HTML
- Homepage:
- Size: 355 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# A quantum interpreter in BQN
A minimal quantum interpreter written in [BQN](https://mlochbaum.github.io/BQN/), and tested with a circuit
implementing the quantum subroutine of Shor's algorithm for the number 15.See the papers linked in the web page for details on the implementation.
This project was inspired by the excellent tutorial from Robert Smith,
which can be found [here](https://www.stylewarning.com/posts/quantum-interpreter/). My follow-along version (also in Common Lisp but with additional tests and some extra explanations)
can be found [here](https://github.com/Panadestein/quant_clq).## Overview
The interpreter's idea is simple: evolve the wave function $\Psi_0^n$ in the full
Hilbert space, that means $2^n \times 2^n$ if we use $n$ qubits. Then construct
the full gates by lifting:$L_U = I \otimes \cdots U \cdots \otimes I$
and evolve it:
$$\Psi_m^n = \Psi_0^n \prod_i^m L_{U_i}$$
The measurement is done by sampling the CDF of the squared amplitudes of the states.