Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler CLI --direct and python_lib compile_str() doesn't work #107

Open
donjan opened this issue May 3, 2023 · 1 comment
Open

Compiler CLI --direct and python_lib compile_str() doesn't work #107

donjan opened this issue May 3, 2023 · 1 comment

Comments

@donjan
Copy link
Contributor

donjan commented May 3, 2023

Running qss-compiler 128c937 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
@mhillenbrand
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants