Skip to content

Commit

Permalink
Create test_shor.py
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Jan 19, 2025
1 parent fe7828e commit 9e69e7e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions quantum/tests/test_shor.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# test_shor.py
import unittest
from quantum.shor_circuit import shor_algorithm

class TestShorAlgorithm(unittest.TestCase):
def test_shor_algorithm(self):
number = 15 # Example number to factor
factors = shor_algorithm(number)
self.assertIn(3, factors)
self.assertIn(5, factors)

if __name__ == '__main__':
unittest.main()

0 comments on commit 9e69e7e

Please sign in to comment.