Skip to content

Commit

Permalink
Bunch of files for future testing and benchmarking
Browse files Browse the repository at this point in the history
  • Loading branch information
stand-by committed Jul 12, 2024
1 parent d87de19 commit 0fa7868
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
11 changes: 11 additions & 0 deletions benchmarks/benchmark_pauli_operations.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import numpy as np

from benchmarks.pauli_operations import *


def main():
pass


if __name__ == "__main__":
main()
14 changes: 14 additions & 0 deletions benchmarks/test_pauli_operations.py
Original file line number Diff line number Diff line change
@@ -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__])
4 changes: 4 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
numpy
scipy
numba
pytest

0 comments on commit 0fa7868

Please sign in to comment.