You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expectation value of the [`Operator`](@ref) `O` with the state `ψ`. The state can be a [`Ket`](@ref), [`Bra`](@ref) or [`Operator`](@ref).
23
23
@@ -27,6 +27,8 @@ If `ψ` is a density matrix ([`Operator`](@ref)), the function calculates ``\tex
27
27
28
28
The function returns a real number if `O` is of `Hermitian` type or `Symmetric` type, and returns a complex number otherwise. You can make an operator `O` hermitian by using `Hermitian(O)`.
29
29
30
+
Note that `ψ` can also be given as a list of [`QuantumObject`](@ref), it returns a list of expectation values.
Variance of the [`Operator`](@ref) `O`: ``\langle\hat{O}^2\rangle - \langle\hat{O}\rangle^2``,
85
94
86
95
where ``\langle\hat{O}\rangle`` is the expectation value of `O` with the state `ψ` (see also [`expect`](@ref)), and the state `ψ` can be a [`Ket`](@ref), [`Bra`](@ref) or [`Operator`](@ref).
87
96
88
97
The function returns a real number if `O` is hermitian, and returns a complex number otherwise.
98
+
99
+
Note that `ψ` can also be given as a list of [`QuantumObject`](@ref), it returns a list of expectation values.
0 commit comments