-
Notifications
You must be signed in to change notification settings - Fork 188
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
Some target tests don't work with translation to OpenQASM 2.0 #2325
Comments
Some more testing reveals that + /usr/local/llvm/bin/FileCheck /workspaces/cuda-quantum/targettests/execution/exp_pauli.cpp
loc("exp_pauli.cpp":30:30): error: 'cc.string_literal' op unable to translate op to OpenQASM 2.0
terminate called after throwing an instance of 'std::runtime_error'
what(): Could not successfully translate to qasm2. and + /usr/local/llvm/bin/FileCheck /workspaces/cuda-quantum/targettests/execution/test-6.cpp
loc("test-6.cpp":42:17): error: 'quake.mx' op unable to translate op to OpenQASM 2.0
terminate called after throwing an instance of 'std::runtime_error'
what(): Could not successfully translate to qasm2.
FileCheck error: '<stdin>' is empty. (maybe related to #2219)? |
The z<cudaq::ctrl>(qubits[0], qubits[1], qubits[2], qubits[3]); Because gate modfiiers aren't supported in OQ2. However, I'm wondering if another compiler pass could lower this to gates which are supported (e.g. SWAP, CX, and friends)? |
Required prerequisites
Describe the bug
Creating a new backend which uses OpenQASM 2.0 as the IR breaks several of the
targettests/execution
tests, including:custom_operation_basic.cpp
- custom ops aren't supported in OQ2custom_operation_adj.cpp
custom_operation_ctrl.cpp
These 3 fail with:
Also failing are:
graph_coloring-1.cpp
graph_coloring.cpp
with:
and
int8_t.cpp
int8_t_free_func.cpp
load_value.cpp
swap_gate.cpp
variable_size_qreg.cpp
with
qspan_slices.cpp
with
sudoku_2x2.cpp
sudoku_2x2-1.cpp
sudoku_2x2-reg_name.cpp
sudoku_2x2-bit_names.cpp
with
and
phase_estimation.cpp
with
(didn't get much info from this about what the failure cause was).
My lowering pass is:
Steps to reproduce the bug
Create a new REST backend with the above lowering config in its
backend.yml
and use that as the target in thetargettests/execution
tests.Expected behavior
Tests should ideally pass or offer a more descriptive error message in some cases.
Is this a regression? If it is, put the last known working version (or commit) here.
Not a regression
Environment
gcc 11.4.0
Linux 01c0ebb026db 6.6.12-linuxkit #1 SMP Thu Feb 8 06:36:34 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux
(the CUDA-Quantum dev container on a Mac M2)Suggestions
No response
The text was updated successfully, but these errors were encountered: