Move set_target as argument to sample call
Open
@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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.