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

random_walk_qpe.cpp not returning correct phase when run through NVQC #1597

Open
3 of 4 tasks
qci-petrenko opened this issue May 2, 2024 · 1 comment
Open
3 of 4 tasks
Labels
NVQC Work items impacting NVIDIA Quantum Cloud
Milestone

Comments

@qci-petrenko
Copy link

qci-petrenko commented May 2, 2024

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 running the random walk phase estimation example (random_walk_qpe.cpp) in WSL (on a Windows 11 machine - CPU simulation) using the 0.7.1 cuda-quantum image, the expected phase is returned: Phase = 0.487390.

If running through Nvidia's cloud service (--target nvqc), Phase = 0.000000. This is not expected. It's not clear whether this is a GPU simulation issue or something with the cloud service.

Steps to reproduce the bug

The full terminal i/o is below:

cudaq@add20b7f7934:~/examples/cpp/other$ nvq++ random_walk_qpe.cpp
cudaq@add20b7f7934:~/examples/cpp/other$ ./a.out
Phase = 0.487390
cudaq@add20b7f7934:~/examples/cpp/other$ nvq++ random_walk_qpe.cpp --target nvqc
cudaq@add20b7f7934:~/examples/cpp/other$ ./a.out
[2024-05-02 00:29:36.675] Submitting jobs to NVQC service with 1 GPU(s). Max execution time: 3600 seconds (excluding queue wait time).

================ NVQC Device Info ================
GPU Device Name: "NVIDIA H100 80GB HBM3"
CUDA Driver Version / Runtime Version: 12.2 / 11.8
Total global memory (GB): 79.1
Memory Clock Rate (MHz): 2619.000
GPU Clock Rate (MHz): 1980.000
==================================================
Phase = 0.000000

Expected behavior

I expect to have the local simulation and the cloud simulation return the same result.

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

Unknown.

Environment

  • CUDA Quantum version: 0.7.1
  • C++ compiler: nvq++
  • Operating system: Windows 11
  • WSL version: 2

Suggestions

No response

@1tnguyen
Copy link
Collaborator

1tnguyen commented May 2, 2024

Hi @qci-petrenko,

Thank you for reporting the issue.
The current nvqc target doesn't support quantum kernels that return values yet (the returned double value in random_walk_qpe.cpp is being ignored).
We'll put this feature in the next release.

@1tnguyen 1tnguyen added this to the release 0.8.0 milestone May 2, 2024
@1tnguyen 1tnguyen added the NVQC Work items impacting NVIDIA Quantum Cloud label May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NVQC Work items impacting NVIDIA Quantum Cloud
Projects
None yet
Development

No branches or pull requests

2 participants