NVIDIA / NVIDIA/cuda-quantum

Move set_target as argument to sample call

Open
#362 3 comments 0 reactions 1 assignee View on GitHub

@anthony-santana is already working on this.

Since Jul 27, 2023.

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

Currently the execution of a kernel on different backends is done as such:

cudaq.set_target('default')
cpu_result = cudaq.sample(kernel, shots_count = 1000)


cudaq.set_target('nvidia')
gpu_result = cudaq.sample(kernel, shots_count = 1000)

A more natural way is to enable:

cpu_result = cudaq.sample(kernel, shots_count = 1000, target = 'default')
gpu_result = cudaq.sample(kernel, shots_count = 1000, target = 'nvidia')


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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.