https://github.com/maloleroy/coto
🔨 Research & C++ implementation on abstract additive Quantum Decision Diagrams 📚
https://github.com/maloleroy/coto
abstract-interpretation decision-diagram qasm quantum-computing
Last synced: about 1 month ago
JSON representation
🔨 Research & C++ implementation on abstract additive Quantum Decision Diagrams 📚
- Host: GitHub
- URL: https://github.com/maloleroy/coto
- Owner: maloleroy
- Created: 2023-12-18T13:10:07.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-10-18T20:58:51.000Z (5 months ago)
- Last Synced: 2026-01-28T21:50:14.543Z (about 2 months ago)
- Topics: abstract-interpretation, decision-diagram, qasm, quantum-computing
- Language: TeX
- Homepage: https://maloleroy.github.io/coto/
- Size: 14 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Citation: CITATION.cff
Awesome Lists containing this project
README
# Coto - Abstract Additive Quantum Decision Diagrams
[](https://github.com/maloleroy/coto)
[](https://github.com/maloleroy/coto/actions)
[](https://github.com/maloleroy/coto/actions?query=workflow%3A"CMake%20Tests")
[](https://en.cppreference.com/w/cpp/23)
[](http://www.plantuml.com/)
Theoretical research, experiments and implementation of _abstract additive quantum decision diagrams_, as part of a student research project.
## Building
To build the project, you must have Clang, CMake and Ninja installed. The code uses some C++23 features, so a recent version of `clang++` is required. *Other versions probably work*, but I personally use the following on my machine:
* Clang 19.1.7
* CMake 3.31.6
* Ninja 1.12.1
1. Configure the project
```bash
export CXX=$(which clang++)
cmake -S . -B build -GNinja
```
2. Build the project
```bash
cmake --build build
```
3. To run the tests (optional)
```bash
cd build
ctest
```
## QASM interactive interpreter
After building the project (steps 1. and 2. above), simply run `./build/prompt`. You can then enter QASM instructions, for example
```
qubit a;
qubit b;
h a;
p(pi/3) b;
cx a b;
h b;
```
This prompt utility comes with a few available **run statements** that should be `;`-terminated:
* `@build`, `@inst`, `@instantiate` - create a new diagram
* `@list`, `@actions` - list the actions (gate applicaitons) to be performed
* `@display`, `@evaluate`, `@eval` - display the evaluation of the current diagram
* `@describe`, `@desc` - display the description of the current diagram
* `@help`, `@man`, `@manual` - display a help message
Applying gates to qubits is not performed immediately after the statement is entered, and should be triggered by a `@display;`.
The `prompt` executable can also take a `.qasm` file path as an argument, in this case it quits after executing all statements in the file, without entering interactive mode.
## Repository architecture
Presentation of this repository's main directories:
- `.github/workflows` GitHub actions continuous integration (CI) and continous deployment (CD) configuration files
- Runs the unit tests that are in the `test` directory and marked as ready for testing in `CMakeLists.txt`
- Generate the docs using Doxygen and publish them to [maloleroy.github.io/coto](https://maloleroy.github.io/coto/) using GitHub Pages
- `archives` Legacy documents or code, that still should be indexed
- `doc` Theory documents (basically, LaTeX)
- `include` Code header files (`.h` C++ files)
- `ref` References, code or case studies that can be used as examples
- `s6` Final report and presentation for semester 6 (in French)
- `s7` Final report and presentation for semester 6 (in French)
- `src` Source code (`.cpp` C++ files, not headers)
- `test` Test code (`.cpp` C++ files)