-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Improve clifford_decompose_greedy
algorithm`
#12560
Improve clifford_decompose_greedy
algorithm`
#12560
Conversation
One or more of the following people are relevant to this code:
|
Pull Request Test Coverage Report for Build 9490163205Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9496416834Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9498328834Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
|
||
# Calculate the adjoint of clifford_current without the phase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this comment still correct? do you calculate the adjoint or the evolved cliffords directly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, please look at the comments again, since some of them are irrelevant now.
e.g.:
# Compute the decoupling operator of cliff_ox and cliff_oz |
there is no
cliff_ox
or cliff_oz
The point of this PR was to resolve a certain inefficiency in |
Summary
This PR improves the performance of the
clifford_decompose_greedy
algorithm by noticing that evolving a Pauli of the formI..IXI...I
or of the formI..IZI...I
by a CliffordC
is essentially equivalent to grabbing a row fromC
's tableau representation, except that the phase needs to be multiplied by 2. (In fact, we can think of the tableau ofC
as representing howC
acts on the basis Pauli stringsI..IXI...I
andI..IZI...
). As a sanity check, I have also verified this experimentally on random cliffords of various sizes.Details and comments
Here is the data for running the synthesis algorithm for 10 random Cliffords of various sizes.
Before this PR:
With this PR:
The runtime improvement is at least 2x.