KEMBAR78
New pass to expand veqs into individual arguments when used as controls by atgeller · Pull Request #1829 · NVIDIA/cuda-quantum · GitHub
Skip to content

Conversation

@atgeller
Copy link
Contributor

@atgeller atgeller commented Jun 17, 2024

Description

Adds a pass expand-control-veqs to expand veqs used as controls into individual control qubits.

For example, given an operation of the form quake.any [%veq] %r : (!quake.veq<n>, !quake.ref) -> (), this pass will extract each qubit from %veq% and explicitly provide them as qubits:

 %arg0 = quake.extract_ref %veq[0] : (!quake.veq<n>) -> !quake.ref
 ...
 %argn = quake.extract_ref %veq[n] : (!quake.veq<n>) -> !quake.ref
 quake.any [%arg0, ..., %argn] %0 : (!quake.ref, ..., !quake.ref, !quake.ref) -> ()

@copy-pr-bot
Copy link

copy-pr-bot bot commented Jun 17, 2024

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.

@github-actions
Copy link

github-actions bot commented Jun 17, 2024

CLA Assistant Lite bot All Contributors have signed the CLA.

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.

Nice work, Adam. Let's see if we can't deploy this using rewrite patterns.

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.

Looks great and quick work. Thanks for doing this, Adam.

A few minor nits.

@schweitzpgi
Copy link
Collaborator

Looks like it'll need a clang-format run on the .cpp file.

atgeller and others added 2 commits June 18, 2024 12:11
Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
@atgeller atgeller requested a review from schweitzpgi June 18, 2024 19:19
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.

This looks good. We should move ahead with merging it.

@atgeller atgeller marked this pull request as ready for review July 2, 2024 23:16
@schweitzpgi
Copy link
Collaborator

schweitzpgi commented Jul 2, 2024

/ok to test

Command Bot: Processing...

@schweitzpgi schweitzpgi enabled auto-merge (squash) July 2, 2024 23:18
@github-actions
Copy link

github-actions bot commented Jul 2, 2024

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

github-actions bot pushed a commit that referenced this pull request Jul 2, 2024
auto-merge was automatically disabled July 3, 2024 18:43

Head branch was pushed to by a user without write access

@1tnguyen
Copy link
Collaborator

1tnguyen commented Jul 4, 2024

/ok to test

Command Bot: Processing...

@1tnguyen 1tnguyen enabled auto-merge (squash) July 4, 2024 02:37
@1tnguyen 1tnguyen merged commit 3c187ad into NVIDIA:main Jul 4, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jul 4, 2024
@bettinaheim bettinaheim added this to the release 0.8.0 milestone Jul 29, 2024
@bettinaheim bettinaheim added the release notes Changes need to be captured in the release notes label Jul 29, 2024
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