NVIDIA / NVIDIA/cuda-quantum

Add support for `__quantum__qis__read_result__body` in Quantinuum Mock Server for Python

Open
#758 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement stale-notified
Dominant language
C++
Stars
1.1k
Forks
456
Avg merge
1d 22h
Merged PRs (30d)
165

Description

Required prerequisites
  • Search the issue tracker to check if your feature has already been mentioned or rejected in other issues.
Describe the feature

Once #741 gets pushed to main, targeting Quantinuum (i.e. calling cudaq.set_target('quantinuum') in Python) will cause both Python and C++ to target the Adaptive Profile, which allows for __quantum__qis__read_result__body function calls to be injected into the resulting QIR code. As part of that PR, that function was added to runtime/nvqir/NVQIR.cpp as a stub in order to allow the pre-existing python/tests/backends/test_Quantinuum.py tests to pass. Those pre-existing tests were discarding the result returned from that function call, so they didn't actually need that function to be implemented.

The issue captures the desire to read arbitrary measurements in the Python mock servers by flushing out a more complete implementation of __quantum__qis__read_result__body in NVQIR. Use cases will have to be defined as part of addressing this issue.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with runtime/nvqir/NVQIR.cpp and the existing python/tests/backends/test_Quantinuum.py tests. Review how __quantum__qis__read_result__body is currently stubbed and how the Python mock servers invoke it. Before implementation, define the arbitrary-measurement use cases; done means those cases are supported and covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
quantum-computing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.