Crates.io | shor |
lib.rs | shor |
version | 0.0.2 |
source | src |
created_at | 2021-10-07 03:11:04.221316 |
updated_at | 2023-04-29 09:14:59.958871 |
description | Shor's factoring algorithm written in rust |
homepage | |
repository | https://github.com/itsubaki/shor |
max_upload_size | |
id | 461568 |
size | 24,965 |
Shor's factoring algorithm written in rust
cargo install shor
$ shor 15
N: 15 (a: 8, t: 3)
[0100001](+0.2500 +0.0000): 0.0625; s/r= 1/ 4; p=3, q=5
[1100001](+0.2500 +0.0000): 0.0625; s/r= 3/ 4; p=3, q=5
$ shor 85
N: 85 (a: 2, t: 3)
[0010000001](+0.1250 +0.0000): 0.0156; s/r= 1/ 8; p=5, q=17
[0110000001](+0.1250 +0.0000): 0.0156; s/r= 3/ 8; p=5, q=17
[1010000001](+0.1250 +0.0000): 0.0156; s/r= 5/ 8; p=5, q=17
[1110000001](+0.1250 +0.0000): 0.0156; s/r= 7/ 8; p=5, q=17
$ shor 21 5
N: 21 (a: 11, t: 5)
[0010100001](+0.0822 +0.1230): 0.0219; s/r= 1/ 6; p=7, q=3
[1101100001](+0.0822 -0.1230): 0.0219; s/r= 5/ 6; p=7, q=3