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

Support for adaptive quantum kernels on (certain) quantum hardware backends #741

Merged
merged 21 commits into from
Oct 16, 2023

Conversation

bmhowe23
Copy link
Collaborator

@bmhowe23 bmhowe23 commented Oct 4, 2023

Summary

This PR builds on #724 by adding initial cuda-quantum support for the Adaptive Profile, as defined here. The PR is broken into 5 separate commits to aid the review process. The important functional changes are in 66ca0a2, and the other commits cover tests and emulation updates.

Testing Details

8 new tests were added. Some of them are currently marked as XFAIL (reasons described in the individual comments). Some of the failures are only occurring due to emulation issues.

The following 6 new tests all successfully run and pass built-in assertion checks on Quantinuum's H1-1E server.

  1. qir_test_cond_for_loop-1.cpp
  2. qir_test_cond_for_loop-2.cpp
  3. qir_test_cond_for_loop-3.cpp
  4. qir_test_cond_for_loop-4.cpp
  5. qir_test_cond_for_loop-5.cpp
  6. qir_test_simple_cond-1.cpp

The following 2 previously existing tests also successfully run on Quantinuum's H1-1E server.

  1. testConditionalSample.cpp
  2. testIQPE_Conditionals.cpp

Selected tests will be added to the Nightly Integration jobs in a future PR, but this PR must be reviewed and approved first.

Adaptive Profile Test Summary

Test Emulate H1-1E Comment
qir_test_cond_for_break 'cc.loop' op not a simple counted loop (#781)
qir_test_cond_for_loop-1
qir_test_cond_for_loop-2
qir_test_cond_for_loop-3
qir_test_cond_for_loop-4 It's not setting qubitMeasurementFeedback correctly (#782)
qir_test_cond_for_loop-5 It's not setting qubitMeasurementFeedback correctly (#782)
qir_test_cond_for_loop-6 Results returned for skipped loops (#783)
qir_test_simple_cond-1
qir_test_simple_cond-2 Won't pass until opt. capabilities of the Adaptive Profile are added
testConditionalSample Assertions may need further attention to allow for noise in H1-E1
testIQPE_Conditionals

- Add createReadResults back
- Add LoadMeasureResult back
- Update to use resultQubitVals instead of resultPtrValues
- Add qubit_resetting module flags (and other module flags)
- Make adaptive profile remote emulation work
Add/update tests

qir_test_cond_for_loop*.cpp updates

Add XFAIL on new test due to unknown emulation issue

Update some adaptive profile tests

Add base profile target to existing test

Update tests

Add qir_test_cond_for_break.cpp

Add newlines at end of test files

Even more new tests after finding sensitivity for setting the
qubitMeasurementFeedback attribute correctly.
@bmhowe23 bmhowe23 added this to the release 0.5.0 milestone Oct 4, 2023
@bmhowe23 bmhowe23 added release notes Changes need to be captured in the release notes enhancement New feature or request labels Oct 4, 2023
@github-actions
Copy link

github-actions bot commented Oct 4, 2023

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

github-actions bot pushed a commit that referenced this pull request Oct 4, 2023
@github-actions
Copy link

github-actions bot commented Oct 5, 2023

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

Copy link
Collaborator

@schweitzpgi schweitzpgi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not done yet, but submitting what I have...

include/cudaq/Optimizer/CodeGen/Peephole.h Show resolved Hide resolved
lib/Optimizer/CodeGen/LowerToQIRProfile.cpp Show resolved Hide resolved
lib/Optimizer/Transforms/QuakeAddMetadata.cpp Show resolved Hide resolved
lib/Optimizer/Transforms/QuakeAddMetadata.cpp Show resolved Hide resolved
runtime/common/RuntimeMLIR.cpp Outdated Show resolved Hide resolved
runtime/common/RuntimeMLIR.cpp Show resolved Hide resolved
runtime/common/RuntimeMLIR.cpp Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Oct 6, 2023

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

github-actions bot pushed a commit that referenced this pull request Oct 6, 2023
@bmhowe23
Copy link
Collaborator Author

bmhowe23 commented Oct 9, 2023

/create_cache

Command Bot: Processing...
The launched workflow can be found here.
Running workflow from branch main. The created cache will be owned by that branch.
Checking out source code from head bmhowe23:pr-adaptive-profile (sha: f1e6886).

@github-actions
Copy link

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

github-actions bot pushed a commit that referenced this pull request Oct 11, 2023
@github-actions
Copy link

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

github-actions bot pushed a commit that referenced this pull request Oct 11, 2023
@github-actions
Copy link

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

github-actions bot pushed a commit that referenced this pull request Oct 11, 2023
@github-actions
Copy link

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

github-actions bot pushed a commit that referenced this pull request Oct 12, 2023
@github-actions
Copy link

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

github-actions bot pushed a commit that referenced this pull request Oct 12, 2023
@github-actions
Copy link

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

github-actions bot pushed a commit that referenced this pull request Oct 12, 2023
@github-actions
Copy link

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

github-actions bot pushed a commit that referenced this pull request Oct 16, 2023
@bmhowe23 bmhowe23 merged commit bf84be4 into NVIDIA:main Oct 16, 2023
112 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Oct 16, 2023
@bmhowe23 bmhowe23 deleted the pr-adaptive-profile branch October 16, 2023 20:01
@bettinaheim bettinaheim changed the title Add Support for the QIR Adaptive Profile Support for the QIR Adaptive Profile Nov 15, 2023
@bettinaheim bettinaheim changed the title Support for the QIR Adaptive Profile Support for adaptive quantum kernels on (certain) quantum hardware backends Nov 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request release notes Changes need to be captured in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants