shor

Crates.ioshor
lib.rsshor
version0.0.2
sourcesrc
created_at2021-10-07 03:11:04.221316
updated_at2023-04-29 09:14:59.958871
descriptionShor's factoring algorithm written in rust
homepage
repositoryhttps://github.com/itsubaki/shor
max_upload_size
id461568
size24,965
(itsubaki)

documentation

README

shor

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
Commit count: 105

cargo fmt