diff --git a/tests/correlators_test.py b/tests/correlators_test.py index 7a0294f9..7eb3d9b6 100644 --- a/tests/correlators_test.py +++ b/tests/correlators_test.py @@ -608,15 +608,20 @@ def test_matmul_overloading(): mat = np.array(ll).reshape(N, N) # Multiply with gamma matrix - mat @ pe.dirac.gammaX corr = pe.Corr([mat] * 4, padding=[0, 1]) - pe.dirac.gammaX @ corr - mcorr = corr @ pe.dirac.gammaX + # __matmul__ + mcorr = corr @ pe.dirac.gammaX comp = mat @ pe.dirac.gammaX for i in range(4): assert np.all(mcorr[i] == comp) + # __rmatmul__ + mcorr = pe.dirac.gammaX @ corr + comp = pe.dirac.gammaX @ mat + for i in range(4): + assert np.all(mcorr[i] == comp) + test_mat = pe.dirac.gamma5 + pe.dirac.gammaX icorr = corr @ test_mat @ np.linalg.inv(test_mat) tt = corr - icorr