Implemented Shor's algorithm in Python using state vectors