Skip to content

[DNM] allow cudaq aliasing #3018

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

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

mitchdz
Copy link
Collaborator

@mitchdz mitchdz commented Jun 9, 2025

DNM - Do Not Merge

Fixes #2341

Testing allow python cudaq aliasing. This is not full aliasing, but purely import cudaq as quda aliasing. Full aliasing requires a bit more work to be done.

$ cat test1.py 
import cudaq as quda

@quda.kernel
def simple():
    q = quda.qubit()

counts = quda.sample(simple)
print(counts)

$ cat test2.py 
import cudaq

@cudaq.kernel
def simple():
    q = cudaq.qubit()

counts = cudaq.sample(simple)
print(counts)

$ DOCKER_BUILDKIT=1 docker build -f docker/release/cudaq.wheel.Dockerfile . --output out && cp out/cuda_quantum_cu12-0.0.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl /local/mdzurick/docker_testing/
$ docker run --rm --gpus all --network host -it -v /local/mdzurick:/host/ nvcr.io/nvidia/nightly/cuda-quantum:cu12-0.11.0
$ pip install --no-deps --force-reinstall /host/docker_testing/cuda_quantum_cu12-0.0.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
$ for i in {1..2}; do echo "Test $i" && python3 test${i}.py; done
Test 1
{ 0:1000 }

Test 2
{ 0:1000 }

Copy link

copy-pr-bot bot commented Jun 9, 2025

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@mitchdz
Copy link
Collaborator Author

mitchdz commented Jun 9, 2025

/ok to test c0d5a0e

Command Bot: Processing...

@mitchdz mitchdz marked this pull request as draft June 9, 2025 21:55
@mitchdz
Copy link
Collaborator Author

mitchdz commented Jun 9, 2025

/ok to test c0d5a0e

Command Bot: Processing...

@sacpis
Copy link
Collaborator

sacpis commented Jun 9, 2025

/ok to test c0d5a0e

Command Bot: Processing...

@mitchdz
Copy link
Collaborator Author

mitchdz commented Jun 10, 2025

/ok to test dbd6a4a

Command Bot: Processing...

@mitchdz
Copy link
Collaborator Author

mitchdz commented Jun 10, 2025

/ok to test 35d733e

Command Bot: Processing...

@mitchdz
Copy link
Collaborator Author

mitchdz commented Jun 10, 2025

/ok to test 35d733e

Command Bot: Processing...

@mitchdz
Copy link
Collaborator Author

mitchdz commented Jun 10, 2025

/ok to test 6ad2acc

Command Bot: Processing...

@mitchdz mitchdz changed the title [DNM] kernel_decorator: allow cudaq aliasing [DNM] allow cudaq aliasing Jun 11, 2025
@mitchdz
Copy link
Collaborator Author

mitchdz commented Jun 11, 2025

/ok to test 461abf1

Command Bot: Processing...

@mitchdz
Copy link
Collaborator Author

mitchdz commented Jun 11, 2025

/ok to test 2069214

Command Bot: Processing...

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 this pull request may close these issues.

[Python] Aliasing cudaq name when importing it
2 participants