NVIDIA / NVIDIA/cuda-quantum

Add target parameters validation

Open
#3,274 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Discussed in https://github.com/NVIDIA/cuda-quantum/discussions/3175

Originally posted by lucas-slattery July 8, 2025
How do I validate the options for cudaq.set_target?

All of these settings produce simulations that 'run'.

cudaq.set_target("tensornet")
cudaq.set_target("tensornet",options="mpgu")
cudaq.set_target("tensornet",options="fp32")
cudaq.set_target("tensornet",options="mgpu,fp32")
cudaq.set_target("tensornet",options="anyrandomstring")

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 at the cudaq.set_target entry point and review how the target and its options are handled. Reproduce the examples from the issue, including the invalid options, then add validation so unsupported values no longer run silently and cover the behavior with tests; the payload names no specific files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.