-
Notifications
You must be signed in to change notification settings - Fork 586
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
[WIP] Add is_hermitian
property to Operator
#2629
Conversation
is_hermitian
property to Operator
is_hermitian
property to Operator
Hello. You may have forgotten to update the changelog!
|
Codecov Report
@@ Coverage Diff @@
## master #2629 +/- ##
=======================================
Coverage 99.58% 99.58%
=======================================
Files 244 244
Lines 19667 19673 +6
=======================================
+ Hits 19585 19591 +6
Misses 82 82
Continue to review full report at Codecov.
|
[sc-20262] |
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.
Looks good 👍
Context:
Typically we use the type of an object to determine whether it can be used in a
MeasurementProcess
. We explicitly check if the type isObservable
. This conflicts with operator-arithmetic classes which may or may not be observables depending on the instance. (eg. aSum
of observables may not be an observable unless their coefficients were real)Description of the Change:
Add a property
is_hermitian
to the baseOperator
class, use this to determine if an operator can be used in aMeasurementProcess
.