mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-03-15 14:50:25 +01:00
g5H operation of Npr_matrix optimized
This commit is contained in:
parent
d4b86f5f73
commit
a24e608413
1 changed files with 3 additions and 4 deletions
|
@ -26,10 +26,9 @@ class Npr_matrix(np.ndarray):
|
|||
if self.shape != (12, 12):
|
||||
raise Exception('g5H only works for 12x12 matrices.')
|
||||
extended_g5 = np.kron(np.eye(3, dtype=int), gamma5)
|
||||
new_matrix = extended_g5 @ self.conj().T @ extended_g5
|
||||
new_matrix.mom_in = self.mom_out
|
||||
new_matrix.mom_out = self.mom_in
|
||||
return new_matrix
|
||||
return Npr_matrix(matmul(extended_g5, self.conj().T, extended_g5),
|
||||
mom_in=self.mom_out,
|
||||
mom_out=self.mom_in)
|
||||
|
||||
def _propagate_mom(self, other, name):
|
||||
s_mom = getattr(self, name, None)
|
||||
|
|
Loading…
Add table
Reference in a new issue