Update the qubit mapping pass to use wire sets
This PR contains a collection of changes that were originally developed on the features/qubit-mgmt branch, but they have been isolated such that they can be merged into main, independent of that feature branch. The changes have not been previously reviewed, so they need to be reviewed just like normal in this PR.
- ~~Make the
add-wiresetpass add onequake.wire_setper function. The problem with the old approach of one per module is shown in a newly added test case (test/Quake/wires_to_wireset.qke). (The problem was that nested functions could borrow the same wire twice, which is not a good idea.) I backed these changes out.~~ Edit: Adam is going to make a separate PR to resolve the issue. - Make the
qubit-mappingpass operate on wires from a wire set rather than unnumbered null wires. This is the main point of the PR. This makes the qubit IDs used in the pass explicit rather than implicit. (However, the IDs are still dropped on the floor if the IR goes through theregtomempass, which it does for now; this is no worse than it was before.) - The
qubit-mappingpass now manipulates the top level module by adding amapped_wiresetsymbol in accordance with the user-provided device topology. Hence, the pass was split into a "prep" pass (to operate on the module) and a "func" pass (to operate on each function). - Update
regtomemto understand wire sets. - Update CircuitCheck to understand wire sets to enable the existing mapping tests to continue working.
- Fix a bug in the
quake::WireSetOp::parsefunction. The bug only occurred when it was parsing an op with that was set to private.
CUDA Quantum Docs Bot: A preview of the documentation can be found here.
CUDA Quantum Docs Bot: A preview of the documentation can be found here.
CUDA Quantum Docs Bot: A preview of the documentation can be found here.
CUDA Quantum Docs Bot: A preview of the documentation can be found here.
I assume the empty file will be removed.
CUDA Quantum Docs Bot: A preview of the documentation can be found here.