Closed amitjamadagni closed 8 years ago
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 expectationvalue
(is there something similar in QuDirac?). Tests are missing though.
@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 :
amit@esornep:~/Downloads/QuDirac.jl$ cd src/
amit@esornep:~/Downloads/QuDirac.jl/src$ grep -r -i "expect" .
amit@esornep:~/Downloads/QuDirac.jl/src$ grep -r -i "expectation" .
amit@esornep:~/Downloads/QuDirac.jl/src$ grep -r -i "expectationvalue" .
amit@esornep:~/Downloads/QuDirac.jl$ grep -r -i "expectation" .
./docs/op_math.md:Thus, expectation values are naturally obtained in this manner:
amit@esornep:~/Downloads/QuDirac.jl$ grep -r -i "expect" .
./docs/op_math.md:Thus, expectation values are naturally obtained in this manner:
./docs/d_str.md:When using `d"..."` literals, the `|`, `>` and `<` characters *cannot be used for anything other than as symbols for Kets, Bras, and inner products*. Other than that, any other Julia syntax should evaluate properly. For example, assignments and function calls work as expected:
amit@esornep:~/Downloads/QuDirac.jl$ grep -r -i "expectionvalue" .
Calculating the expectation for
AbstractQuVector
andAbstractQuMatrix
.