cmake -B build
cmake --build build --parallel 8This creates the parser executable.
./parser /path/to/circuit.qasmTo build the interpreter, you must have qpp installed. Execute
cmake -B build -DWITH_INTERPRETER=ON
cmake --build build --parallel 8This creates the interpreter executable. Usage:
./interpreter /path/to/circuit.qasmIf the OpenQASM 3.0 file contains n input variables, then the interpreter
requires exactly n additional commandline arguments to specify their values.
For example, if the file contains
input float[32] fl;
input bool bl;
Then it could be executed with
./interpreter example.qasm "pi/2" "true"cmake --build build --target unit_tests --parallel 8
ctest --test-dir build-
The interpreter is implemented to exclude the endpoints of ranges. As of August 10, 2022, in the OpenQASM 3.0 live specification, range endpoints are included.
-
The OpenQASM 3.0 standard library defines the
u3andu2gates differently than the Qiskit specifications.
| Gate | OpenQASM 3.0 | Qiskit | Phase inconsistency |
|---|---|---|---|
| u3 | |||
| u2 |