Implementation of Shor's algorithm in Python using state vectors