QuEST.jl
Quantum Exact Simulation Toolkit is a high performance simulator of quantum circuits, state-vectors and density matrices
Install / Use
/learn @ediparquantum/QuEST.jlREADME
QuEST

Details
- Quantum Exact Simulation Toolkit is a high performance simulator of quantum circuits, state-vectors and density matrices.
QuEST.jlis a wrapper forQuEST, which is written inC.QuEST.jlwas compiled usingBinaryBuilder.jl, which is a system for the compilation of binary dependencies --whose aim it to just work anywhere the official Julia distribution does.- Function calls, enumerators, structs, etc were wrapped automatically using
Clang.jl, which provided the neededCbindings for the Julia interface. - Note: Julia is indexed starting at $1$ and goes until $N$ items in an $N-$ element list.
Cindexes an $N-$ element list from $0$ to $N-1$. - To give the Julia user uniform interface, every
QuESTcall using an integer index, will first shift the index to be in the $0$ indexed form inside the Julia function. The user should be aware of this, but it is the aim of theQuEST.jlparckage wrapper writer(s) to handle this for the user.
Getting started
Whilst we are working on getting this package registered with the official Julia registry, to use QuEST.jl
using Pkg
Pkg.add(url = "https://github.com/ediparquantum/QuEST.jl")
or
] add https://github.com/ediparquantum/QuEST.jl
using QuEST
num_qubits = 2
env = createQuESTEnv()
# create a 2 qubit register in the zero state
qubits = createQureg(num_qubits, env)
initZeroState(qubits)
# apply circuit
hadamard(qubits, 1)
controlledNot(qubits, 1, 2)
measure(qubits, 2)
# unload QuEST
destroyQureg(qubits, env)
destroyQuESTEnv(env)
Information direct from the QuEST developers
For more in depth tutorials see (C based)
- QuEST's github
- QuEST C based tutorial - there are some code examples to get an idea of the flow
- QuEST website
- QuEST's webiste documentation
- Decoherence (noise) models
- QuEST's code documentation
- QuESTlink - mathematica
- QuEST whitepaper
Maintenance
To maintain QuEST.jl with future releases of QuEST:
- go to BinaryBuilder.jl doc's page
- Follow instructions to pre-compile the latest version of QuEST according hardware requirements
- The
build_tarballs.jlfile showcasing how to precompile QuEST is found on the Yggdrasil package page here - Best to follow instructions from (1) and use the wizard
- Once this is done the updated pacakge
QuEST_jll.jlwill automatically update with the latest precompiled version. Found on the Julia binary wrapper organisation (JuliaBinaryWrapper), check the repositories for your package (QuEST_jll.jl). - Now if there are any updated funcation names or new interfaces, this package
QuEST.jlwill need to be updated. See example:
Wrapping QuEST from C in Julia
Call C with a ccall type function. Consider the Hadamard function as example
function hadamard(qureg, targetQubit)
test_qubit_present(qureg,targetQubit)
targetQubit = c_shift_index(targetQubit)
@ccall libquest.hadamard(qureg::Qureg, targetQubit::Cint)::Cvoid
end
The line starting with @ccall... is calling the function by accessing the precompiled binary. To presenve segmentation faults and hence prevent Julia crashing at function call I assert the targetQubit, which is an integer and is in the set of qubits contained in the qureg, if not, then an error is thrown. Calls to C need to ensure indices are shifted to the 0-index, which is done with c_shift_index.
Then follow standard Julia package management and release for new version.
Acknowledgements
Some tests and functions were inspired and directly used from the public repository Dighvijay: QuEST.jl made possible from the efforts of Dighvijay on GitHub. We thank them for their valuable contributions.
Related Skills
node-connect
344.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
99.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
344.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
344.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
