Skip to content

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

Merged
bmhowe23 merged 21 commits into
NVIDIA:mainfrom
bmhowe23:pr-adaptive-profile
Oct 16, 2023
Merged

bmhowe23 merged 21 commits into
NVIDIA:mainfrom
bmhowe23:pr-adaptive-profile

Conversation

@bmhowe23

@bmhowe23 bmhowe23 commented Oct 4, 2023 •

Copy link
Copy Markdown
Collaborator

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

github-actions Bot commented Oct 4, 2023

Copy link
Copy Markdown

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

github-actions Bot commented Oct 5, 2023

Copy link
Copy Markdown

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 5, 2023
@bmhowe23 bmhowe23 mentioned this pull request Oct 5, 2023
3 of 5 tasks

@schweitzpgi schweitzpgi left a comment

Copy link
Copy Markdown
Collaborator

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...

Comment thread include/cudaq/Optimizer/CodeGen/Peephole.h
Comment thread lib/Optimizer/CodeGen/LowerToQIRProfile.cpp
Comment thread lib/Optimizer/Transforms/QuakeAddMetadata.cpp
Comment thread lib/Optimizer/Transforms/QuakeAddMetadata.cpp
Comment thread runtime/common/RuntimeMLIR.cpp Outdated
Comment thread runtime/common/RuntimeMLIR.cpp
Comment thread runtime/common/RuntimeMLIR.cpp
@github-actions

github-actions Bot commented Oct 6, 2023

Copy link
Copy Markdown

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
Comment thread lib/Optimizer/Transforms/QuakeAddMetadata.cpp
Comment thread runtime/common/RuntimeMLIR.cpp
Comment thread runtime/cudaq/platform/default/rest/helpers/oqc/OQCServerHelp.cpp
Comment thread runtime/nvqir/NVQIR.cpp
Comment thread test/NVQPP/qir_test_cond_for_loop-1.cpp Outdated
@bmhowe23

bmhowe23 commented Oct 9, 2023 •

Copy link
Copy Markdown
Collaborator Author

/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
Copy Markdown

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

@github-actions

Copy link
Copy Markdown

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
Copy Markdown

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
Copy Markdown

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
Copy Markdown

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
Copy Markdown

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
Copy Markdown

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
Comment thread test/NVQPP/qir_test_cond_for_break.cpp
@github-actions

Copy link
Copy Markdown

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 closed this Oct 16, 2023
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 16, 2023
@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