Warn or Fail QIR generation when program uses no qubits/measurements
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1k
- Forks
- 212
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 65
Description
A quantum program that uses no qubits or performs no measurements is almost never valid, and many backends reject or fail on such programs. Given that, would it make sense to warn or fail earlier during local processing? For example, since we annotate the QIR with the number of qubits and number of measurements, we could emit a Python warning if generating QIR results in a program that is effectively a no-op because of either of those counts being zero. If we want to be even more strict, we could reject these cases entirely and fail QIR codegen with an error for such programs.
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.
Research direction
Start at QIR generation, specifically the annotation of qubit and measurement counts described in the issue. Determine the appropriate behavior for programs with zero qubits or zero measurements, then verify the chosen warning or failure behavior for those cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- compilers, quantum-computing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100