Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mikhailmints/qunity
Compilation and simulation of Qunity, a unified language for classical and quantum computing
https://github.com/mikhailmints/qunity
quantum-computing quantum-programming-language
Last synced: 2 months ago
JSON representation
Compilation and simulation of Qunity, a unified language for classical and quantum computing
- Host: GitHub
- URL: https://github.com/mikhailmints/qunity
- Owner: mikhailmints
- Created: 2024-03-29T05:56:09.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-09-14T04:40:41.000Z (3 months ago)
- Last Synced: 2024-09-15T09:46:33.018Z (3 months ago)
- Topics: quantum-computing, quantum-programming-language
- Language: OCaml
- Homepage:
- Size: 30 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![ci](https://github.com/mikhailmints/qunity/actions/workflows/ci.yml/badge.svg?event=push)](https://github.com/mikhailmints/qunity/actions/workflows/ci.yml)
[![docs](https://img.shields.io/badge/docs-odoc-blue)](https://mikhailmints.github.io/qunity/qunity/Qunity/index.html)This is a prototype simulator and compiler for the Qunity quantum programming language, based on the paper by Voichick et al. (https://arxiv.org/abs/2204.12384), and the typechecker implementation in Coq (https://gitlab.umiacs.umd.edu/finn/qunity). This project is done as part of Caltech's SURF program, supervised by Robert Rand at UChicago. It is supported by the Samuel P. and Frances Krown SURF Fellowship.
To run the tests:
```bash
./run-tests
```To run a single program using the simulator:
```bash
./qunity-run
```To run all the example Qunity programs located in the examples folder:
```bash
./run-all-examples
```To start an interactive Qunity REPL[^1]:
```bash
./qunity-interact
```To compile a single Qunity file into OpenQASM 3:
```bash
./qunity-compile [-o ] [--nobuild] [--annotate] [--analyze]
```
If no output filename is specified, by default it goes in the `qasm_out` directory. If `--nobuild` is used, `dune build` is not run before compiling. If `--annotate` is used, the output file will have comments that indicate the roles of the qubits in each of the gates in the low-level circuit. If `--analyze` is used, a circuit diagram will be generated, and the circuit will be simulated using Qiskit.To compile all the example Qunity programs:
```bash
./compile-all-examples [--annotate] [--analyze]
```[^1]:
To avoid some input/prompt issues, it is recommended to add the following to your `~/.inputrc`:
```inputrc
$include /etc/inputrc
# To prevent prompt from disappearing:
set enable-bracketed-paste off
# Optional - to prevent parentheses blinking:
set blink-matching-paren off
```