IndexError when using math.pi inside kernel
justinlietz opened this issue · 0 comments
justinlietz commented
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
When attempting to use math.pi inside a kernel, the error
IndexError: pop from an empty deque
is returned.
Steps to reproduce the bug
import math
import cudaq
@cudaq.kernel
def test_kernel():
theta = math.pi
counts = cudaq.sample(test_kernel)
Expected behavior
The expected behavior would be either to support math.pi, or to provide an error which explains that this is not allowed.
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