−Table of Contents
This is an old revision of the document!
BraketDiagonal
BraketDiagonal(psi1List, O, psi2List) calculates the expectation value or matrix element ⟨ψ1[i]∣O∣ψ2[i]⟩ for all i.
In Quanty Braket(psi1, O, psi2) is the same as psi1 * O * psi2. The difference is that the function Braket can be faster. Braket can work on lists of functions and then returns a matrix or vector with all possible expectation values
Input
-
psi1 or psiList1 : Wavefunction or list of Wavefunctions
-
O : Operator
-
psi2 or psiList2 : Wavefunction or list of Wavefunctions
Output
-
real or complex number, or a list of these or a matrix of these
Example
description text
Input
- Example.Quanty
-- some example code
Result
text produced as output