You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After running cudaq-translate --convert-to=openqasm example.qke, the resulting QASM output is given by:
// Code generated by NVIDIA's nvq++ compiler
OPENQASM 2.0;
include "qelib1.inc";
gate __nvqpp__mlirgen____nvqppBuilderKernel_093606261879 q0 {
h q0;
__nvqpp__mlirgen____nvqppBuilderKernel_367535629127 q0;
h q0;
creg var1[1];
measure q0 -> var1[0];
}
gate __nvqpp__mlirgen____nvqppBuilderKernel_367535629127 q0 {
x q0;
}
qreg var0[1];
__nvqpp__mlirgen____nvqppBuilderKernel_093606261879 var0[0];
Expected behavior
The result should be the QASM below or an equivalent. Note the removal of the leading underscores and the moving of the nvqpp__mlirgen____nvqppBuilderKernel_367535629127 gate definition to the beginning of the file:
// Code generated by NVIDIA's nvq++ compiler
OPENQASM 2.0;
include "qelib1.inc";
gate nvqpp__mlirgen____nvqppBuilderKernel_367535629127 q0 {
x q0;
}
gate nvqpp__mlirgen____nvqppBuilderKernel_093606261879 q0 {
h q0;
nvqpp__mlirgen____nvqppBuilderKernel_367535629127 q0;
h q0;
creg var1[1];
measure q0 -> var1[0];
}
qreg var0[1];
nvqpp__mlirgen____nvqppBuilderKernel_093606261879 var0[0];
Is this a regression? If it is, put the last known working version (or commit) here.
Not a regression
Environment
cuda-quantum docker image version:sha256:9ec8ff5e307ccb6dd5c71a2b45cc486cd42221c10d7f98c6147a807f69029f1b
More details:
Required prerequisites
Describe the bug
This is a continuation of #380.
Two major issues prevent generating a valid QASM:
_
). This is illegal in OpenQASM 2.0According to the OpenQASM specification:
Steps to reproduce the bug
The following example uses two recursive calls:
The code generates the following MLIR:
After running
cudaq-translate --convert-to=openqasm example.qke
, the resulting QASM output is given by:Expected behavior
The result should be the QASM below or an equivalent. Note the removal of the leading underscores and the moving of the
nvqpp__mlirgen____nvqppBuilderKernel_367535629127
gate definition to the beginning of the file:Is this a regression? If it is, put the last known working version (or commit) here.
Not a regression
Environment
cuda-quantum
docker image version:sha256:9ec8ff5e307ccb6dd5c71a2b45cc486cd42221c10d7f98c6147a807f69029f1b
More details:
Suggestions
No response
The text was updated successfully, but these errors were encountered: