Skip to content

Factoring algorithm for resource estimation#1058

Merged
msoeken merged 9 commits into
mainfrom
msoeken/eh-sample
Feb 8, 2024
Merged

Factoring algorithm for resource estimation#1058
msoeken merged 9 commits into
mainfrom
msoeken/eh-sample

Conversation

@msoeken
Copy link
Copy Markdown
Member

@msoeken msoeken commented Jan 22, 2024

This adds a factoring algorithm based on work from Ekara-Hastad with optimizations to modular arithmetic subroutines based on work from Gidney (see https://arxiv.org/abs/1905.09749)

@github-actions
Copy link
Copy Markdown

Benchmark for 3ebfd30

Click to view benchmark
Test Base PR %
Array append evaluation 880.1±12.68µs 863.9±6.51µs -1.84%
Array update evaluation 952.2±6.81µs 938.1±5.06µs -1.48%
Deutsch-Jozsa evaluation 31.4±0.29ms 31.3±0.23ms -0.32%
Large file parity evaluation 36.2±0.09ms 36.1±0.16ms -0.28%
Large input file 40.6±0.66ms 40.5±0.55ms -0.25%
Standard library 21.7±0.28ms 21.9±0.42ms +0.92%
Teleport evaluation 104.4±1.86µs 104.1±4.80µs -0.29%

@msoeken msoeken marked this pull request as ready for review January 26, 2024 10:02
@github-actions
Copy link
Copy Markdown

Benchmark for b30d1f9

Click to view benchmark
Test Base PR %
Array append evaluation 875.5±9.08µs 862.3±5.89µs -1.51%
Array update evaluation 958.6±4.32µs 939.5±25.70µs -1.99%
Deutsch-Jozsa evaluation 31.4±0.17ms 31.4±0.30ms 0.00%
Large file parity evaluation 36.0±0.05ms 35.9±0.35ms -0.28%
Large input file 39.7±0.95ms 39.0±0.63ms -1.76%
Standard library 21.1±0.38ms 21.1±0.25ms 0.00%
Teleport evaluation 105.3±1.87µs 102.9±2.46µs -2.28%

@github-actions
Copy link
Copy Markdown

Benchmark for 9920117

Click to view benchmark
Test Base PR %
Array append evaluation 861.0±5.11µs 863.2±8.21µs +0.26%
Array update evaluation 935.8±6.80µs 935.8±6.80µs 0.00%
Deutsch-Jozsa evaluation 31.4±0.32ms 31.3±0.26ms -0.32%
Large file parity evaluation 36.1±0.26ms 36.1±0.20ms 0.00%
Large input file 37.4±0.57ms 40.8±0.84ms +9.09%
Standard library 20.8±0.20ms 23.0±1.42ms +10.58%
Teleport evaluation 103.9±2.81µs 104.3±2.30µs +0.38%

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 6, 2024

Benchmark for 96a08db

Click to view benchmark
Test Base PR %
Array append evaluation 762.9±7.00µs 778.1±5.89µs +1.99%
Array literal evaluation 512.6±5.97µs 540.0±20.25µs +5.35%
Array update evaluation 841.3±6.25µs 856.4±16.36µs +1.79%
Deutsch-Jozsa evaluation 30.4±0.18ms 30.4±0.22ms 0.00%
Large file parity evaluation 35.4±0.13ms 35.5±0.19ms +0.28%
Large input file 43.5±1.83ms 43.4±1.79ms -0.23%
Standard library 25.1±1.62ms 25.2±1.41ms +0.40%
Teleport evaluation 98.7±2.83µs 98.1±1.79µs -0.61%

@tcNickolas
Copy link
Copy Markdown
Contributor

I would add this sample to the readme at https://github.com/microsoft/qsharp/tree/main/samples/estimation, so that we document all samples uniformly.

Since this is a two-file sample (Jupyter notebook requires the .qs file to work), do we want to move both files to a separate subfolder to emphasize this? Not sure if the intent is to use them together only, or to allow using Q# file on its own as well - if it's the latter, we might want to keep them in this folder and document them separately in the README

@msoeken
Copy link
Copy Markdown
Member Author

msoeken commented Feb 8, 2024

I would add this sample to the readme at https://github.com/microsoft/qsharp/tree/main/samples/estimation, so that we document all samples uniformly.

Since this is a two-file sample (Jupyter notebook requires the .qs file to work), do we want to move both files to a separate subfolder to emphasize this? Not sure if the intent is to use them together only, or to allow using Q# file on its own as well - if it's the latter, we might want to keep them in this folder and document them separately in the README

Thanks, I addresses this comment in a recent commit.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 8, 2024

Benchmark for 3939b7c

Click to view benchmark
Test Base PR %
Array append evaluation 776.8±9.33µs 765.6±22.73µs -1.44%
Array literal evaluation 530.5±10.51µs 601.0±46.21µs +13.29%
Array update evaluation 855.3±14.36µs 841.3±6.60µs -1.64%
Deutsch-Jozsa evaluation 30.4±0.18ms 30.6±1.11ms +0.66%
Large file parity evaluation 35.4±0.10ms 35.4±0.25ms 0.00%
Large input file 43.2±2.33ms 42.5±2.28ms -1.62%
Standard library 24.0±1.03ms 24.2±1.26ms +0.83%
Teleport evaluation 98.7±7.23µs 97.8±1.83µs -0.91%

@msoeken msoeken added this pull request to the merge queue Feb 8, 2024
Merged via the queue into main with commit a9ea0a5 Feb 8, 2024
@msoeken msoeken deleted the msoeken/eh-sample branch February 8, 2024 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants