qe-compiler
qe-compiler copied to clipboard
Compiler CLI --direct and python_lib compile_str() doesn't work
Running qss-compiler 128c937335ce23d35c4e98c3b7618d7420bd11ee on a fresh Ubuntu 22.04 VM with Python 3.10.6.
Observed behaviour
from qss_compiler import compile as compiler
res = compiler.compile_str("OPENQASM 3.0; qubit $0;")
Does not change depending on the input string. The corresponding MLIR output is an empty 1000-shot experiment.
Digging deeper, a command line such as:
qss-compiler/build/bin/qss-compiler -X=qasm --emit=mlir --target=mock --config=auxiliary.cfg --mlir-print-op-generic --canonicalize --direct 'OPENQASM 3.0; qubit $0; bit c; U(1.57079632679, 0.0, 3.14159265359) $0; measure $0 -> c;' 2> 0
Also yields the same empty experiment.
Expected behaviour Seeing output from the target pipeline's processed MLIR of the input code.
Additional info The two described issues seem tightly related to me, but feel free to split in case additional complexity in the Python case needs to be addressed.
$ cat auxiliary.cfg
num_qubits 1
acquire_multiplexing_ratio_to_1 5
controllerNodeId 1000
I have observed similar behavior - I had been puzzled since clearly invalid OpenQASM 3 had not been rejected by compile_str_async. Intriguingly, there are many scenarios where compile_str_async works as expected.