Wires to wire sets pass needs to be robust
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1.1k
- Forks
- 456
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 165
Description
When converting wires (null_wire) to wire sets (borrow_wire), we are mapping from the domain of an unlimited number of qubits to the domain of a finite (and small) number of qubits. At this point, the circuit is no longer target agnostic. The number of qubits, their interconnect, etc. ought to be defined by the target.
At present, it is assumed that this sort of mapping from the virtual domain to the actual target is done very late in the compilation process. It is further assumed that it must be done exhaustively and that the quantum program must consist of exactly 1 function. None of these assumptions need to be true and each may unjustifiably limit the general applicability and solution space of the IR.
For example, it may be the case that we want the quantum program to consist of separate functions. Or we may want to incrementally map some functions or phases of functions from the virtual/infinite qubit domain but not others. Or CUDA-Q may want to allow the programmer to explicitly map a qubit variable to a target qubit in the source code.
These considerations can and may change the implementation of passes such as wires to wire sets.
Originally posted by @schweitzpgi in https://github.com/NVIDIA/cuda-quantum/pull/2163#discussion_r1733529671
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 by locating the wires-to-wire-sets pass that converts null_wire to borrow_wire, then review the discussion in PR #2163. Determine how the pass currently handles qubit domains, target topology, exhaustive mapping, and single-function programs. Done means the assumptions are addressed with an agreed design and corresponding implementation scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100