Description Usage Arguments Value Examples
Implements Shor's algorithm by applying the quantum oracle, performing a QFT, measuring the output, and using continued fractions algorithm to find period. Period is then used with Euclidean algorithm to check if factors are legitimate prime factors. Is probabilistic and may fail. Factors 15 with ease and 21 occassionally.
1 |
N |
Number that Shor's algorithm is to factor |
trials |
Number of times to attempt before giving up |
random |
Boolean which determines whether seed is random or not |
Vector containing prime factors
1 | Shor(15,trials=2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.