View source on GitHub |
Return the expectation value for the passed operator and wavefunction
fqe.expectationValue(
wfn: "wavefunction.Wavefunction",
ops: Union['hamiltonian.Hamiltonian', 'FermionOperator'],
brawfn: Optional['wavefunction.Wavefunction'] = None
) -> complex
Args | |
---|---|
wfn (wavefunction.Wavefunction) - an FQE wavefunction on the ket side
ops (FermionOperator) - a Fermion Operator string to apply to the wavefunction brawfn (wavefunction.Wavefunction) - an FQE wavefunction on the bra side if not specified, it is assumed that the bra nad ket wave functions are the same |
Returns | |
---|---|
(complex) - expectation value |