1
0
Fork 0
mirror of https://github.com/fjosw/pyerrors.git synced 2025-03-16 15:20:24 +01:00
pyerrors/tests/dirac_test.py

13 lines
368 B
Python
Raw Normal View History

2021-10-20 13:48:02 +01:00
import numpy as np
import pyerrors as pe
import pytest
np.random.seed(0)
def test_gamma_matrices():
2021-10-21 09:07:04 +01:00
for matrix in pe.dirac.gamma:
2021-10-20 13:48:02 +01:00
assert np.allclose(matrix @ matrix, np.identity(4))
assert np.allclose(matrix, matrix.T.conj())
2021-10-21 09:07:04 +01:00
assert np.allclose(pe.dirac.gamma5, pe.dirac.gamma[0] @ pe.dirac.gamma[1] @ pe.dirac.gamma[2] @ pe.dirac.gamma[3])