AnalyticWavefunction
Little extension to RepresentationBasis so that we can use p and x and stuff to evaluate out matrix elements and stuff. This will be more progressively more tightly meshed with RepresentationBasis in the future, but for now I just want to provide the scaffolding so that I can build off of it.
__init__(self, energy, data, **opts):
evaluate(self, *args, **kwargs):
plot(self, figure=None, plot_class=None, domain=(-5, 5), **opts):
Uses McUtils to plot the wavefunction on the passed figure (makes a new one if none)
figure
:Graphics | Graphics3D
:returns
:_
expect(self, operator):
Provides expectation values of operators, but the operators have to be Operator objects…
basically all the logic is inside the operator, but this is worth it for use in ExpansionWavefunction
We can also potentially add support for ExpansionOperators or SymbolicOperators in the future that are
able to very cleanly reuse stuff like the p
matrix that a RepresentationBasis defines
operator
:Operator
the operator to take the expectation of
expectation(self, op, other):
Computes the expectation value of operator op over the wavefunction other and self
other
:AnalyticWavefunction
the other wavefunction
op
:Operator
the operator to take the matrix element of
:returns
:_
probability_density(self):
Computes the probability density of the current wavefunction
:returns
:_
marginalize_out(self, dofs):
Computes the projection of the current wavefunction onto a set of degrees of freedom
:returns
:_