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

mx operation unsupported in OpenQASM conversion #2457

Open
3 of 4 tasks
bharat-thotakura opened this issue Dec 9, 2024 · 0 comments
Open
3 of 4 tasks

mx operation unsupported in OpenQASM conversion #2457

bharat-thotakura opened this issue Dec 9, 2024 · 0 comments
Labels
bug Something isn't working OpenQASM codegen issue with generating OpenQASM 2 output

Comments

@bharat-thotakura
Copy link
Contributor

Required prerequisites

  • Consult the security policy. If reporting a security vulnerability, do not report the bug using this form. Use the process described in the policy to report the issue.
  • Make sure you've read the documentation. Your issue may be addressed there.
  • Search the issue tracker to verify that this hasn't already been reported. +1 or comment there if it has.
  • If possible, make a PR with a failing test to give us a starting point to work on!

Describe the bug

Currently, a CUDA-Q kernel containing the mx measurement operation cannot be translated into OpenQASM 2.0 via cudaq.translate()

Steps to reproduce the bug

Running the following snippet:

import cudaq
cudaq.set_target("nvidia")

@cudaq.kernel
def bell():
    q = cudaq.qvector(2)
    h(q[0])
    cx(q[0], q[1])
    mx(q)

cudaq.translate(bell, format="openqasm2")

results in the following error:

error: 'quake.mx' op unable to translate op to OpenQASM 2.0
RuntimeError: getASM: failed to translate to OpenQASM.

Expected behavior

The measurement operation should converted into a supported OpenQASM 2.0 standard

Is this a regression? If it is, put the last known working version (or commit) here.

Not a regression

Environment

  • CUDA-Q version: 0.9.0
  • Python version: 3.12.4
  • Operating system: Ubuntu

Suggestions

No response

@schweitzpgi schweitzpgi added bug Something isn't working OpenQASM codegen issue with generating OpenQASM 2 output labels Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working OpenQASM codegen issue with generating OpenQASM 2 output
Projects
None yet
Development

No branches or pull requests

2 participants