-
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
Add indexing and inner product to Statevector #7095
Conversation
Hi @DavideFrr thanks for working on this! It looks like you've got an indentation issue that's causing the test failures and some linting (you can run |
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.
Hi there, thanks for looking at this. I've left a few comments inline in the text - there's a few of them, but most of them are very minor style tweaks. There's a couple that bear a little bit of thought, though, about how we should be handling negative keys, and inner products with items that aren't statevectors.
...otes/notes/make-statevector-subscriptable-and-add-inner-product_method-a0337393d9a5b666.yaml
Outdated
Show resolved
Hide resolved
...otes/notes/make-statevector-subscriptable-and-add-inner-product_method-a0337393d9a5b666.yaml
Outdated
Show resolved
Hide resolved
...otes/notes/make-statevector-subscriptable-and-add-inner-product_method-a0337393d9a5b666.yaml
Outdated
Show resolved
Hide resolved
Co-authored-by: Jake Lishman <jake@binhbar.com>
…r-product_method-a0337393d9a5b666.yaml Co-authored-by: Jake Lishman <jake@binhbar.com>
…r-product_method-a0337393d9a5b666.yaml Co-authored-by: Jake Lishman <jake@binhbar.com>
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.
The "suggestions" feature inline is usually for code reviewers as opposed to the person making the PR: we suggest, and then you commit them if you agree. If you want to change the code, it's your code, so you can just push the commits! In these cases, since you're suggesting stuff that was exactly in line with my comments, you can just go ahead and commit them directly, and I can review again.
Co-authored-by: Jake Lishman <jake@binhbar.com>
Co-authored-by: Jake Lishman <jake@binhbar.com>
Co-authored-by: Jake Lishman <jake@binhbar.com>
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.
Sorry it took me a little while to reply to this. The features look fine, and the tests of their working behaviour seem good, but please can we add some tests of the failure paths as well?
(When you've made a complete set of changes, if you press the "re-request review" button next to my name, it'll pop up my priority list.)
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 for sticking with this, it looks good now!
Summary
Make Statevector objects subcriptables to fix #4916
Add inner product method to Statevector objects to fix #4934
Details and comments