diff --git a/benchmarks/benchmark_pauli_operations.py b/benchmarks/benchmark_pauli_operations.py new file mode 100644 index 0000000..9021980 --- /dev/null +++ b/benchmarks/benchmark_pauli_operations.py @@ -0,0 +1,11 @@ +import numpy as np + +from benchmarks.pauli_operations import * + + +def main(): + pass + + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/benchmarks/test_pauli_operations.py b/benchmarks/test_pauli_operations.py new file mode 100644 index 0000000..af76cca --- /dev/null +++ b/benchmarks/test_pauli_operations.py @@ -0,0 +1,14 @@ +import pytest +import numpy as np + +from pauli_operations import * + + +def test_sparse_pauli_string(): + assert PauliComposer(PauliString("IZ")).sparse_pauli() == SparsePauliString(1.0, np.array([0,1]), np.array([1.0, 1.0])) + +# TODO test correspondance to strings made from dense mutliplications + + +if __name__ == "__main__": + pytest.main([__file__]) \ No newline at end of file diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 0000000..c813e86 --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1,4 @@ +numpy +scipy +numba +pytest \ No newline at end of file