Adam Kelly 5 éve
szülő
commit
7ad739b6da
1 módosított fájl, 12 hozzáadás és 0 törlés
  1. 12 0
      tests/test_state.py

+ 12 - 0
tests/test_state.py

@@ -0,0 +1,12 @@
+from qcgpu import State
+import pytest
+
+def test_state_creation():
+    # Any machine should be able to handle 14 qubits
+    for i in range(1, 15):
+        State(i)
+
+def test_state_with_no_qubits_fails():
+    with pytest.raises(Exception):
+        State(0)
+