-
Notifications
You must be signed in to change notification settings - Fork 6
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
Expectation added. #40
Conversation
The question is if we want to restrict one of the arguments to explicitly be a state (vector) - so we would need something like #32? |
I think this is actually Ok for now. I would vote for changing the function name to something like |
4a91de4
to
30c57f0
Compare
@acroy I guess this is ready ! The tests pass on the release version ! |
Also a quick search on QuDirac didnt give any results for something similar :
|
@@ -198,8 +198,15 @@ tensor(bra::DualVector, ket::AbstractQuVector) = tensor(ket, bra) | |||
commute(a::AbstractQuMatrix, b::AbstractQuMatrix) = (a*b) - (b*a) | |||
anticommute(a::AbstractQuMatrix, b::AbstractQuMatrix) = (a*b) + (b*a) | |||
|
|||
############### | |||
# Expectaion # |
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.
typo: "Expectation"
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.
Fixed !
Function expectationvalue added.
Calculating the expectation for
AbstractQuVector
andAbstractQuMatrix
.