-
Notifications
You must be signed in to change notification settings - Fork 644
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
[DLA 3] Add qml.dla.adjoint_repr
function
#5406
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…into lieclosure2
Co-authored-by: David Wierichs <david.wierichs@xanadu.ai> Co-authored-by: Vincent Michaud-Rioux <vincentm@nanoacademic.com>
…into lieclosure
…into lieclosure2
…(currently failing, need fix)
…into lieclosure2
…into lieclosure2
…into lieclosure2
…into adjointrepr
trbromley
approved these changes
Apr 19, 2024
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.
Thanks @Qottmann! This is great 🚀
…into lieclosure2
Co-authored-by: Thomas R. Bromley <49409390+trbromley@users.noreply.github.com>
…into lieclosure2
Co-authored-by: Thomas R. Bromley <49409390+trbromley@users.noreply.github.com>
…into adjointrepr
Qottmann
added a commit
that referenced
this pull request
Apr 22, 2024
…ndent vectors (#5161) This class enables easy implementation for `qml.dla.lie_closure` realized in the follow-up PR. The class VSpace is currently not (yet) user-facing and acts as a utility to lie_closure. We could consider making it user-facing though. Open to discussing this! The main reason I am holding back is that the UI is experimental and some things may be subject to change / improvement, so I dont want to lock in just yet. The main point of this class is to efficiently keep track of linearly independent operators that span a vector space, specifically for PauliSentences. This is done by storing and processing ``M``, which is a dictionary-of-keys (DOK) style sparse representation of the set of basis vectors. You can think of it as the numpy-equivalent of a PauliSentence: each ``PauliWord`` (key of ``PauliSentence``) represents one row of ``M`` with the coefficient (value of ``PauliSentence``). For example the set of 3 linearly independent generators ``X(0) + X(1), X(0) + X(2), X(0) + 0.5 * Y(0)`` can be represented as ``` [ [1, 1, 1], [1, 0, 0], [0, 1, 0], [0, 0, 0.5] ] ``` where each column represents one sentence, and each row represents the coefficient of the respective word in the sentence. To make sense of this representation one additionally needs to keep track of the mapping between keys and rows. In this case we have ``` pw_to_idx = { X(0) : 0, X(1) : 1, X(2) : 2, Y(0) : 3 } ``` where we have set the numbering based on appearance in the list of generators. This mapping is in general not unique. ToDo - [x] VSpace class init - [x] VSpace.add() method - [x] test init - [x] test VSpace.add() - [x] add cheaper check for proportionality before performing rank computation - [x] add test for util accordingly - [x] increase test coverage (i.e. add examples) - [x] check edge cases - [x] changelog (no changelog since this is private functionality) - [x] Fix equality check - [x] Overhaul `VSpace.add` logic (inplace vs not) Based off @dwierichs 's [prototype](#4852) Follow-up PR adding lie_closure #5169 [sc-51430] #5161 (DLA1) #5169 (DLA2) #5406 (DLA3) --------- Co-authored-by: David Wierichs <david.wierichs@xanadu.ai> Co-authored-by: Vincent Michaud-Rioux <vincentm@nanoacademic.com> Co-authored-by: Mudit Pandey <mudit.pandey@xanadu.ai> Co-authored-by: Thomas R. Bromley <49409390+trbromley@users.noreply.github.com>
Qottmann
added a commit
that referenced
this pull request
Apr 22, 2024
[WIP] - [x] Basic functionality - [x] Basic tests - [x] compatibility with PauliWord + tests - [x] compatibility with Operators + tests - [x] Figure out normalization standard - [x] changelog Follow-up on #5161 **Shortcut Stories:** [sc-51421] #5161 (DLA1) #5169 (DLA2) #5406 (DLA3) --------- Co-authored-by: David Wierichs <david.wierichs@xanadu.ai> Co-authored-by: Vincent Michaud-Rioux <vincentm@nanoacademic.com> Co-authored-by: Mudit Pandey <mudit.pandey@xanadu.ai> Co-authored-by: Thomas R. Bromley <49409390+trbromley@users.noreply.github.com>
Qottmann
added a commit
that referenced
this pull request
Apr 25, 2024
A simple `qml.dla.center` function #5161 (DLA1) #5169 (DLA2) #5406 (DLA3) #5477 (DLA4) Implement center [sc-51435] --------- Co-authored-by: Vincent Michaud-Rioux <vincentm@nanoacademic.com> Co-authored-by: David Wierichs <david.wierichs@xanadu.ai> Co-authored-by: Thomas R. Bromley <49409390+trbromley@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
A function to compute the adjoint representation of a DLA
[sc-51422]
#5161 (DLA1) #5169 (DLA2) #5406 (DLA3)