Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract Circuits Performance Improvement #291

Merged
merged 16 commits into from
Mar 13, 2024

Conversation

bcdonovan
Copy link
Contributor

This PR improves the performance of the ExtractCircuitsPass by replacing insertArguments with getBody().addArugment.

Also fixes a bug by inserting call_circuit after location of last operation in circuit rather than the first.

@bcdonovan bcdonovan requested a review from a team as a code owner March 12, 2024 02:36
@bcdonovan bcdonovan added the no-reno Disable checking for a releasenote label Mar 12, 2024
Copy link
Collaborator

@taalexander taalexander left a comment

Choose a reason for hiding this comment

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

This change looks good to me! I also found it necessary to update the way the circuit operations are being walked on my machine in bcdonovan#1. With this I get performance of

0.0676 ( 0.1%) 0.0676 ( 0.4%) Extract Circuits Pass

without this it was closer to 1 min 50s.

for 100x100x1 circuits.

taalexander
taalexander previously approved these changes Mar 12, 2024
Copy link
Collaborator

@taalexander taalexander left a comment

Choose a reason for hiding this comment

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

LGTM

mbhealy
mbhealy previously approved these changes Mar 12, 2024
Copy link
Contributor

@mbhealy mbhealy left a comment

Choose a reason for hiding this comment

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

LGTM

@bcdonovan bcdonovan dismissed stale reviews from mbhealy and taalexander via a0bdec7 March 12, 2024 14:30
kitbarton
kitbarton previously approved these changes Mar 12, 2024
Copy link
Collaborator

@kitbarton kitbarton left a comment

Choose a reason for hiding this comment

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

LGTM.

kitbarton
kitbarton previously approved these changes Mar 12, 2024
@taalexander taalexander merged commit 25c9de1 into openqasm:main Mar 13, 2024
3 checks passed
bcdonovan added a commit to bcdonovan/qe-compiler that referenced this pull request Mar 13, 2024
This PR improves the performance of the ExtractCircuitsPass by replacing
`insertArguments` with `getBody().addArugment`.

Also fixes a bug by inserting call_circuit after location of last
operation in circuit rather than the first.

---------

Co-authored-by: Thomas Alexander <[email protected]>
bcdonovan added a commit that referenced this pull request Mar 13, 2024
This PR improves the performance of the ExtractCircuitsPass by replacing
`insertArguments` with `getBody().addArugment`.

Also fixes a bug by inserting call_circuit after location of last
operation in circuit rather than the first.

---------

Co-authored-by: Thomas Alexander <[email protected]>
@bcdonovan bcdonovan deleted the bd-ec-perf branch March 13, 2024 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-reno Disable checking for a releasenote
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants