Skip to content

New pass to expand veqs into individual arguments when used as controls - #1829

Merged
1tnguyen merged 12 commits into
NVIDIA:mainfrom
atgeller:expand_control_veqs
Jul 4, 2024
Merged

1tnguyen merged 12 commits into
NVIDIA:mainfrom
atgeller:expand_control_veqs

Conversation

@atgeller

@atgeller atgeller commented Jun 17, 2024 •

Copy link
Copy Markdown
Collaborator

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-pr-bot Bot commented Jun 17, 2024

Copy link
Copy Markdown

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

github-actions Bot commented Jun 17, 2024 •

Copy link
Copy Markdown

CLA Assistant Lite bot All Contributors have signed the CLA.

@schweitzpgi schweitzpgi left a comment

Copy link
Copy Markdown
Collaborator

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.

@schweitzpgi schweitzpgi left a comment

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
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

@schweitzpgi schweitzpgi left a comment

Copy link
Copy Markdown
Collaborator

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

schweitzpgi commented Jul 2, 2024 •

Copy link
Copy Markdown
Collaborator

/ok to test

Command Bot: Processing...

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

github-actions Bot commented Jul 2, 2024

Copy link
Copy Markdown

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

1tnguyen commented Jul 4, 2024 •

Copy link
Copy Markdown
Collaborator

/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