NVIDIA / NVIDIA/cuda-quantum

Run python CI tests across all backends

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

Nobody has claimed this yet.

enhancement needs triage stale-notified
Dominant language
C++
Stars
1.1k
Forks
455
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

We currently only test our python API on the simulator that is set within each individual test (most use the default). We should extend this to run across the same targets that our C++ suite runs on. This will require sorting out issues wherein certain tests have hard-coded count values that we assert against. E.g

kernel = cudaq.make_kernel()
... kernel ops ...

result = cudaq.sample(kernel)
assert result["01010101"] == 505
assert result["10101010"] == 495

The actual count values will have minor variations across backends, so a new strategy will be needed to either better generalize these asserts, or to have different checks per backend.

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 by comparing the Python test setup with the targets used by the C++ suite, then identify tests with hard-coded count assertions such as the example in the issue. Done means Python CI runs across the same backends and its result checks accommodate backend-specific count variation.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
ci-cd, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.