Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
documentation:language_reference:functions:braket [2022/09/30 17:50] – Maurits W. Haverkort | documentation:language_reference:functions:braket [2022/09/30 18:51] (current) – Maurits W. Haverkort | ||
---|---|---|---|
Line 38: | Line 38: | ||
print(Braket(psi0, | print(Braket(psi0, | ||
- | print(" | + | print(" |
print(Braket(psi0, | print(Braket(psi0, | ||
-- note that I made one list of length 3, the other of length 2 so that the order is clear | -- note that I made one list of length 3, the other of length 2 so that the order is clear | ||
- | print(" | + | print(" |
print(Braket({psi0, | print(Braket({psi0, | ||
</ | </ | ||
Line 50: | Line 50: | ||
The expectation value of a single state | The expectation value of a single state | ||
-0.5 | -0.5 | ||
- | The expectation value of a single state with two other states | + | The expectation value of two states with a single state |
{ 0 , 0.5 } | { 0 , 0.5 } | ||
- | The expectation value of a two states with two other states | + | The expectation value of a three states with two other states |
{ { 0 , (0 + 0.5 I) , (0 + 0.5 I) } , | { { 0 , (0 + 0.5 I) , (0 + 0.5 I) } , | ||
{ (0 - 0.5 I) , 0 , 0 } } | { (0 - 0.5 I) , 0 , 0 } } |