Skip to content

Commit

Permalink
Improve doc of tensor methods in fock drudges
Browse files Browse the repository at this point in the history
  • Loading branch information
tschijnmo committed Feb 19, 2017
1 parent 2979b78 commit 37dbbe4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drudge/fock.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def __init__(self, *args, exch=FERMI, **kwargs):
raise ValueError('Invalid exchange', exch, 'expecting plus/minus 1')

self.set_tensor_method('eval_vev', self.eval_vev)
self.set_tensor_method('eval_phys_vec', self.eval_phys_vev)
self.set_tensor_method('eval_phys_vev', self.eval_phys_vev)

@property
def contractor(self):
Expand Down Expand Up @@ -162,6 +162,7 @@ def eval_vev(self, tensor: Tensor, contractor):
"""Evaluate vacuum expectation value.
The contractor needs to be given as a callable accepting two operators.
And this function is also set as a tensor method by the same name.
"""

return Tensor(self, self.normal_order(
Expand All @@ -171,7 +172,8 @@ def eval_vev(self, tensor: Tensor, contractor):
def eval_phys_vev(self, tensor: Tensor):
"""Evaluate expectation value with respect to the physical vacuum.
Here the contractor from normal-ordering will be used.
Here the contractor from normal-ordering will be used. And this
function is also set as a tensor method by the same name.
"""

return Tensor(
Expand Down Expand Up @@ -726,7 +728,7 @@ def eval_fermi_vev(self, tensor: Tensor):
This is just an alias to the actual :py:meth:`FockDrudge.eval_phys_vev`
method to avoid confusion about the terminology in particle-hole
problems.
problems. And it is set as a tensor method by the same name.
"""
return self.eval_phys_vev(tensor)

Expand Down

0 comments on commit 37dbbe4

Please sign in to comment.