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

Error handling when missing parentheses #1450

Closed
3 of 4 tasks
justinlietz opened this issue Mar 27, 2024 · 0 comments · Fixed by #1458
Closed
3 of 4 tasks

Error handling when missing parentheses #1450

justinlietz opened this issue Mar 27, 2024 · 0 comments · Fixed by #1458

Comments

@justinlietz
Copy link
Collaborator

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

If the user forgets to add the parentheses to the cudaq.qubit constructor, the error:
IndexError: pop from an empty deque
is returned.

Steps to reproduce the bug

import cudaq

@cudaq.kernel
def test_kernel():
    # state_reg = cudaq.qubit()
    state_reg = cudaq.qubit

    x(state_reg)

counts = cudaq.sample(test_kernel);
print(counts)

Expected behavior

An error that helps identify the offending line of code.

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

Not a regression

Environment

-Docker Image ID: 109eb1c12738

Suggestions

No response

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

Successfully merging a pull request may close this issue.

1 participant