KEMBAR78
Create qubit-mapping pass by boschmitt · Pull Request #610 · NVIDIA/cuda-quantum · GitHub
Skip to content

Conversation

@boschmitt
Copy link
Collaborator

@boschmitt boschmitt commented Sep 6, 2023

This PR adds a pass to do mapping. For more information see #669.

(From @bmhowe23): This PR does not add the mapping pass to any existing pipelines or backends. Those will come in separate PRs.

@copy-pr-bot
Copy link

copy-pr-bot bot commented Sep 6, 2023

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@boschmitt boschmitt changed the title [opt] Mapping pass: prototype [DRAFT] [RFC] Mapping pass: prototype Sep 6, 2023
@bettinaheim
Copy link
Collaborator

@boschmitt Thank you for putting together this outline. As discussed, here is the additional information to add to this PR:

  • what is needed to complete the work on the pass (e.g. add a way to represent the qubit id in the IR, update the pass to populate that information, adjust the QIR lowering to respect that, ...)
  • what is needed for getting a good test coverage (unit tests and e2e tests), e.g. dedicated "simulator"/validator, additional large-scale test case(s), ...
  • what is needed for e2e support for IQM backend (e.g. fix the value semantic issue, define/populate device geometry for IQM, adjustments to the IQM lowering pipeline, e2e tests, ...)
  • future improvements you think we should consider for the mapping transformation (e.g. "forward looking instead of greedy" algorithm, handle control flow, mapping on top of quake/MLIR vs mapping on custom low level representation?, separate logic/pass for qubit reused upon allocation before the conversion to value semantic, ...)

@boschmitt boschmitt mentioned this pull request Sep 19, 2023
12 tasks
@boschmitt boschmitt changed the title [DRAFT] [RFC] Mapping pass: prototype [DRAFT] Mapping pass Sep 19, 2023
@bmhowe23 bmhowe23 added this to the release 0.5.0 milestone Sep 25, 2023
@bmhowe23
Copy link
Collaborator

This mapping PR depends on #761 in order to properly handle measurements.

@bmhowe23
Copy link
Collaborator

bmhowe23 commented Oct 26, 2023

/ok to test

Command Bot: Processing...

@github-actions
Copy link

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

github-actions bot pushed a commit that referenced this pull request Oct 26, 2023
Copy link
Collaborator

@schweitzpgi schweitzpgi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Round 1

@bmhowe23
Copy link
Collaborator

bmhowe23 commented Oct 27, 2023

/ok to test

Command Bot: Processing...

@github-actions
Copy link

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

github-actions bot pushed a commit that referenced this pull request Oct 27, 2023
Update mapping to support add'l topologies and specifications

Support reading device information from a file.

Support a star, include the ability to specify the index of the center
qubit.

Add device.computeAllPairShortestPaths() to all the device constructors.

Print a better error message if the device is too small for the user's
circuit.

Create auxillary qubits if needed. Also remove them at the end of the
pass if a subset (or all) of them did not end up being needed.

Create a new mapping_v2p[] attribute so that downstream passes can
determine exactly how the mapping changed the qubit placement. This will
be particularly important for "observe"-type circuits that add
measurements at the very end.

Update tests
@bmhowe23
Copy link
Collaborator

bmhowe23 commented Oct 27, 2023

/ok to test

Command Bot: Processing...

@github-actions
Copy link

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

github-actions bot pushed a commit that referenced this pull request Oct 27, 2023
Copy link
Collaborator

@bmhowe23 bmhowe23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have two forthcoming PR's that use these changes. One for IQM and one for OQC.

Copy link
Collaborator

@schweitzpgi schweitzpgi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to separate pass initialization and pass execution more and make use of pass options.

Sorry for the delay in the review.

@bmhowe23
Copy link
Collaborator

bmhowe23 commented Oct 31, 2023

/ok to test

Command Bot: Processing...

@github-actions
Copy link

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

github-actions bot pushed a commit that referenced this pull request Oct 31, 2023
@bmhowe23 bmhowe23 changed the title Mapping pass Create qubit-mapping pass Oct 31, 2023
@bmhowe23 bmhowe23 merged commit 8ff763e into NVIDIA:main Oct 31, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Oct 31, 2023
@bettinaheim bettinaheim added the release notes Changes need to be captured in the release notes label Nov 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release notes Changes need to be captured in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants