mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-14 19:43:41 +02:00
Benchmarks added
This commit is contained in:
parent
8655fe2cd1
commit
b5f3dd6ac3
9 changed files with 58 additions and 1 deletions
12
tests/dirac_test.py
Normal file
12
tests/dirac_test.py
Normal 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])
|
Loading…
Add table
Add a link
Reference in a new issue