ExpansionWavefunction
Simple wave function that takes a set of expansion coefficients alongside its basis. Technically this should be called a linear expansion wave function, but that was too long for my taste.
__init__(self, energy, coefficients, basis_wfns):
energy:floatenergy of the wavefunction
coefficients:Iterable[float]expansion coefficients
basis_wfns:Wavefunctionsbasis functions for the expansion
@property
coeffs(self):
@property
basis(self):
evaluate(self, *args, **kwargs):
Evaluates the wavecfunction as any other linear expansion.
args:Anycoordinates + any other args the basis takes
kwargs:Anyany keyword arguments the basis takes
:returns:_v a l u e s
o f
t h e
w a v e f u n c t i o n
expect(self, operator):
Provides the expectation value of the operator op.
Uses the basis to compute the reps and then expands with the expansion coeffs.
operator:Any:returns:_
expectation(self, op, other):
Computes the expectation value of operator op over the wavefunction other and self.
Note: the basis of other, self, and op are assumed to be the same.
op:Operatoran operator represented in the basis of the expansion
other:ExpansionWavefunctionthe other wavefunction to expand over
:returns:_
probability_density(self):
Computes the probability density of the current wavefunction
:returns:_