Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Implementing pluggable HighLevelSynthesis #8548
Implementing pluggable HighLevelSynthesis #8548
Changes from 41 commits
e62c79e
530ac33
975d0de
f2e1380
c139421
dea4544
2d55fa4
51acb33
b0f8c87
a63d112
15e22b7
e52eb16
206d87e
ba0edb5
0fd32f2
6abbf07
9b28157
233d798
3d06999
b625cc5
4186bb2
4abaff3
8a38922
054125b
738ed62
def3b50
4f6c95c
0ffd981
5fa8387
bb680ca
5b382e0
9c06042
af9d498
517007b
bda0ac4
ed35b50
ba96369
f65cfac
5cee799
cba889d
9e22d1b
0a41fba
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Can you add a comment here on how the pass will handle cases where an
Operation
could be of multiple types when anHLSConfig
is provided? e.g. ALinearFunction
operation could be synthesized by any of the available synthesis methods for aClifford
.My expectation is that when you specify an
HLSConfig
, the list of applicable synthesis methods is strictly tied to the name of the type of theOperation
, but it would be good to clarify this. (I also want to leave room for the case when a user doesn't specify anHLSConfig
, for the pass to automatically select applicable synthesis methods which may include those from other types.)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.
Right now the list of applicable synthesis methods is indeed strictly tried to the name of the
Operation
(I have tried to clarify this in the documentation following your comment).I completely agree that we want to have a way to synthesize
LinearFunctions
with synthesis methods forCliffords
, but at the moment I don't see a perfect solution for this. Internally,LinearFunctions
are represented very differently fromCliffords
(the former is anxn
binary linear matrix, the latter is represented using stabilizer/destabilizer tableaux -- or maybe this has changed recently), so we can't applyClifford
methods toLinearFunctions
without first convertingLinearFunctions
intoCliffords
. Do we want to have a transpiler pass for that? Or do we want to synthesize linear functions into CX-gates and then re-collect these as Clifford gates (with possibly additional adjacentClifford
gates)? And what should eventually be added to the optimization loop in terms of resynthesizing linear and clifford subcircuits?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.
For now, it's sufficient to clarify the behavior of the current pass.
Moving forward, we'll likely need some investigation to weigh the relative cost of converting from the binary linear matrix we use for
LinearFunctions
to a stabilzer tableau and the likelihood of finding an improved synthesis by using one of the availableClifford
methods over what is known forLinearFunction
s. I could imagine the implementations being different depending on the answers there (and likewise for anywhere there is overlap of available synthesis methods, e.g. LinearFunctions -> Clifford, Clifford -> Unitary, etc.)