Benchmarks added

This commit is contained in:
Fabian Joswig 2021-10-26 10:20:47 +01:00
parent 8655fe2cd1
commit b5f3dd6ac3
9 changed files with 58 additions and 1 deletions

12
tests/dirac_test.py Normal file
View file

@ -0,0 +1,12 @@
import numpy as np
import pyerrors as pe
import pytest
np.random.seed(0)
def test_gamma_matrices():
for matrix in pe.dirac.gamma:
assert np.allclose(matrix @ matrix, np.identity(4))
assert np.allclose(matrix, matrix.T.conj())
assert np.allclose(pe.dirac.gamma5, pe.dirac.gamma[0] @ pe.dirac.gamma[1] @ pe.dirac.gamma[2] @ pe.dirac.gamma[3])