QX simulator is a simulator of cQASM programs, developed by QuTech. At the moment, QX simulator only supports cQASM v3.0 programs (see cQASM-spec for the language specification).
It performs simulations of input programs received via file or string. It produces one of the following results:
- A simulation result: a quantum state and, optionally, a list of measurements.
- An error. In case the input program was malformed or the simulation failed.
It can be used:
- As a standalone executable (built from C++), from the command line.
- As a module (called
qxelarator
), from Python projects (as a Python package).
Given a cQASM program example.cq
.
version 3.0
qubit[2] q
bit[2] b
H q[0]
CNOT q[0], q[1]
b = measure q
We can simulate this circuit using QX simulator, either from the command line, or with a Python script.
build/Release# ./qx-simulator -c 1000 example.cq
import qxelarator
if __name__ == "__main__":
result = qxelarator.execute_file('example.cq', iterations=1000)
print(result)
The QX simulator documentation is hosted through GitHub Pages.
QX simulator is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.
Quantum Inspire: [email protected]