Replies: 4 comments
-
MWE: expect'(-im * Y, zero_state(1)=>rot(Y, 0.0))
expect(-im * Y, zero_state(1)=>rot(Y, -1e-8))
expect(-im * Y, zero_state(1)=>rot(Y, 1e-8))
expect'(Y, zero_state(1)=>rot(Y, 0.0)) |
Beta Was this translation helpful? Give feedback.
-
The expectation value should not be imaginary, it has to be real because it is the loss. |
Beta Was this translation helpful? Give feedback.
-
I'm thinking if we should give a warning or something when differentiating a non-real loss? since I don't see any use case for a non-real loss, we should just say no when someone tries |
Beta Was this translation helpful? Give feedback.
-
non-real loss requires computing Jacobian matrices. Sometimes, determining if an observable is hermitian requires obtaining its matrix representation, we do not want it as the default behavior. No good solution in my mind. |
Beta Was this translation helpful? Give feedback.
-
This is from the email
Beta Was this translation helpful? Give feedback.
All reactions