QLLVM is a classical-quantum hybrid compilation framework built on LLVM, with excellent extensibility and seamless integration with the classical high-performance computing ecosystem.
QLLVM supports multiple quantum programming languages and backends, including Qiskit, Criq, Qpanda, OpenQASM, etc., with target backend instructions including openQASM2.0, OriginIR, qcis, etc.
QLLVM supports unified compilation of quantum programs, CUDA programs, and classical C++ programs, providing an efficient, flexible, industrial-grade compilation infrastructure for classical-quantum software development.
For more details on how to use QLLVM, please refer to the documentation here: QLLVM Documentation
Cloud: Quick installation via VSCode extensions, providing intelligent programming, compilation, and execution services
1. Download the repository to obtain the plugin installation packages:
`./plugin/quantum-circuit-composer-0.1.vsix`
`./plugin/qcoder-0.1.vsix`
2. Open the command palette in VSCode (`Ctrl+Shift+P` / `Cmd+Shift+P`)
3. Enter and select **Extensions: Install from VSIX...**
4. Select the downloaded `.vsix` files in sequence to complete installationPlease refer to the Source Installation Guide
| Area | Description |
|---|---|
| β Qcoder Sidebar | Click to use the Qcoder intelligent programming assistant |
| β‘ Qcoder Main Interface | Intelligent interaction interface |
| β’ Code Panel | Displays quantum programs |
| β£ Compile Button | Click to compile the code panel or the selected quantum program |
| β€ Run Button | Click to run the code panel or the selected quantum program |
| β₯ Output Panel | Displays the compiled quantum circuit and related parameters |
π For detailed plugin usage instructions, please refer to the Plugin Documentation
After installation, you can use the qllvm command in the command line to compile classical-quantum hybrid programs or pure quantum programs.
qllvm test/test_bell.qasm -qrt nisq -qpu qasm-backend -O1This command compiles and generates test/test_bell_compiled.qasm
π For complete compilation parameter reference, please refer to the qllvm User Guide
Compile a C++ program and a QASM quantum circuit together
qllvm examples/hybrid/main.cpp examples/hybrid/bell.qasm -o hybrid_bell
./hybrid_bellCompile a C++ main program, CUDA kernel, and QASM quantum circuit together; execution requires a CUDA environment
cd examples/hybrid_cuda
qllvm main.cpp kernel.cu circuit.qasm -o hybrid_app \
-cuda-arch sm_75 \
-cuda-path /usr/local/cuda
qllvm main.cpp kernel.cu circuit.qasm -o hybrid_app -cuda-arch sm_86
./hybrid_app -shots 1024π For detailed usage of different programming languages and backends, please refer to the Usage Documentation
For detailed QLLVM descriptions, installation, and usage documentation, please consult the online documentation:
| Document | Description |
|---|---|
| π Learn about the QLLVM Quantum Compilation Framework | Get detailed introduction and design philosophy of QLLVM |
| π§ Install QLLVM and related plugins | Complete installation and configuration guide |
| π Learn how to use it | Tutorials and examples to get started quickly |
If you want to contribute to QLLVM, please read the Contribution Guide. By participating, you agree to follow our Code of Conduct.
We use Issues for issue tracking and feature requests.
QLLVM is the result of the joint effort of many contributors. If you use QLLVM, please refer to How to Contribute for citation.
Release notes for each version are dynamically generated on the GitHub Releases page.
This project is built on the MLIR and LLVM ecosystems. Thanks to the open source community for their contributions. Special thanks to Origin Quantum, China Telecom Tianyan, Medical Image Bio, Beijing Institute of Quantum Electronics, Zhejiang University, Auroral Quantum, and other organizations for their support of this project.
This project is open source under the Apache 2.0 license.