Implement 'reset after measure' in value semantics (linear use form)
@1tnguyen is already working on this.
Since Oct 31, 2025.
Assessment
This issue has not been assessed yet.
Description
This pass should be written when the IR is in explicit linear use form (aka, value semantics), as it will be much simpler to understand, write, etc.
It actually becomes trivial. A measurement op must produce 1 or more wires. If those wires are used by anything that is not a sink operation, they are reused. In those case, if the reuse is not a reset operation, then insert a reset operation. Done.
Originally posted by @schweitzpgi in https://github.com/NVIDIA/cuda-quantum/pull/3450#pullrequestreview-3285634272
Note: the value semantics indeed simplifies the use tracking of qubit wire after measure. There are still some considerations around qubit wire aliasing, i.e., multiple linear wires could be referring to the same physical qubit extracted from a qubit register at a specific index.
- Dominant language
- C++
- Stars
- 1.1k
- Forks
- 455
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 165
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.
More from NVIDIA/cuda-quantum
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NVIDIA/cuda-quantum#5424 ·
-
[python] Kernel with a return only inside a dynamic-bound loop compiles without a return-type check Openstale-notified
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
NVIDIA/cuda-quantum#5369 · 2 comments ·
-
bug Exalate stale-notified
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
NVIDIA/cuda-quantum#5361 ·
-
bug Exalate stale-notified
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
NVIDIA/cuda-quantum#5356 ·
-
stale-notified
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
NVIDIA/cuda-quantum#5353 ·
All issues in NVIDIA/cuda-quantum
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Sensor initialization takes very long when `--initial-sim-time` is set to current UNIX timestamp Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
gazebosim/gz-sensors#662 · 1 comment ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
LadybirdBrowser/ladybird#12123 ·