-
Notifications
You must be signed in to change notification settings - Fork 368
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
Snapshot circuit extensions #317
Conversation
test test test test test test test test test test test test test
typo in test test test fixes uncommenting important things test test test tidying up renaming files; testing density_matrix snapshot renamed file renamed file small typo fix fixed import in __init__.py
@kanejess To match terra I would suggest making a separate file for each type of snapshot and placing them inside |
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.
This looks good so far, I have a few comments/questions inline.
Hi @kanejess , what is left to remove the [WIP]?. We targeted this to be included in 0.3 release which will happen very soon. |
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.
This looks better! Once you have address these changes I think we can remove the [WIP]
. Also can you take a look at the linting, as that has failed on Travis.
There's a lot of code repetition in this PR, and other things that could be simplified, but that would probably require a deep redesign on how snapshots are implemented so I'm not going to postpone it as far as it works. |
I'd need confirmation from @kanejess for tomorrow to include this in the release. |
* Adding SnapshotStatevector and tests * Adding StabilizerSnapshot and tests * Adding SnapshotDensityMatrix and tests * Adding SnapshotExpectationValue and tests
Summary
Getting started on #300 - i.e. improving usability of different snapshot types.
Details and comments
Subclasses and methods written for
SnapshotStatevector
#301,SnapshotStabilizer
#302,SnapshotDensityMatrix
#303,SnapshotProbabilities
#304, andSnapshotExpectationValue
#305.So far, tests are only checking that the snapshots have been created, and do not check that snapshot data is correct.
Still needs fixing:
'density_matrix'
test gives error'ERROR: Circuit contains invalid instructions ( invalid snapshot instructions: {density_matrix})'