Shor Algorithm for prime factoring

版本 1.0.0 (2.0 KB) 作者: Thomas
A Version of the Shor-Algorithm for prime Factoring. Please feel free to comment on it or recommend improvements.
156.0 次下载
更新时间 2019/10/6

查看许可证

A Version of the Shor-Algorithm for prime Factoring. Please feel free to comment on it or recommend improvements.
Performance is pretty poor, since creating the "superposition" required for the analysis of hidden frequencies is quite intensive (and I do not have a quantum computer). This step consumes about 99% of the total runtime.
Performance tests produced similar results as I found in: https://scholar.colorado.edu/math_gradetds/39/ (Parsons, Elizabeth Ellen, "Simulation of a Quantum Prime Factoring Algorithm" (2016), p. 42.)

The program can also handle numbers with factors of the kind p^n with p = a prime and n>1. (not all versions of Shor I found, could do this)
Using a "parfor" inside the "order_qstyle" function would help to speed it up a bit.

Example(s):
shor(156) delivers : 2 2 3 13 in 0.060103 seconds
shor(793) delivers: 13 61 in 287.038115 seconds
shor(1185) delivers: 3 5 79 in 80.203060 seconds
(on my computer)

引用格式

Thomas (2024). Shor Algorithm for prime factoring (https://www.mathworks.com/matlabcentral/fileexchange/72945-shor-algorithm-for-prime-factoring), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2019a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Large Files and Big Data 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0