Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add samples of testing Q# code with classical return values #1858

Merged
merged 2 commits into from
Aug 20, 2024

Conversation

tcNickolas
Copy link
Member

Part of #1268.
Introduces a shared README.md for all testing samples and includes small edits to existing testing sample.

Copy link

Benchmark for 818ada8

Click to view benchmark
Test Base PR %
Array append evaluation 339.8±2.23µs 338.9±3.78µs -0.26%
Array literal evaluation 169.6±3.60µs 186.6±1.69µs +10.02%
Array update evaluation 416.3±1.78µs 416.5±2.48µs +0.05%
Core + Standard library compilation 24.8±2.26ms 24.3±2.13ms -2.02%
Deutsch-Jozsa evaluation 4.9±0.06ms 5.0±0.06ms +2.04%
Large file parity evaluation 34.4±0.22ms 34.6±0.59ms +0.58%
Large input file compilation 14.2±0.26ms 14.4±0.58ms +1.41%
Large input file compilation (interpreter) 54.6±2.33ms 55.4±3.07ms +1.47%
Large nested iteration 33.0±0.38ms 32.6±0.14ms -1.21%
Perform Runtime Capabilities Analysis (RCA) on Deutsch-Jozsa sample 1581.9±57.50µs 1577.4±58.82µs -0.28%
Perform Runtime Capabilities Analysis (RCA) on large file sample 8.1±0.17ms 8.1±0.40ms 0.00%
Perform Runtime Capabilities Analysis (RCA) on teleport sample 1447.4±80.09µs 1437.7±62.49µs -0.67%
Perform Runtime Capabilities Analysis (RCA) on the core and std libraries 28.4±0.62ms 28.1±0.55ms -1.06%
Teleport evaluation 93.5±3.85µs 93.6±3.64µs +0.11%

Copy link
Collaborator

@swernli swernli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking over this made me realize that our test infra doesn't validate stand-alone Python files in our samples. That is out of scope for this PR, so I'll file a follow up. I can see the Rust-based unit test infra automatically picked up the new project as expected, so that means this is consistent with our existing testing strategy.

Co-authored-by: Stefan J. Wernli <swernli@microsoft.com>
Copy link

Benchmark for 350903d

Click to view benchmark
Test Base PR %
Array append evaluation 342.6±11.40µs 336.4±2.79µs -1.81%
Array literal evaluation 168.6±1.59µs 187.3±7.92µs +11.09%
Array update evaluation 455.9±58.47µs 414.3±2.04µs -9.12%
Core + Standard library compilation 25.4±0.55ms 24.9±0.59ms -1.97%
Deutsch-Jozsa evaluation 5.0±0.05ms 5.0±0.11ms 0.00%
Large file parity evaluation 34.4±0.10ms 34.3±0.72ms -0.29%
Large input file compilation 14.9±0.49ms 14.9±0.40ms 0.00%
Large input file compilation (interpreter) 57.9±2.54ms 56.5±1.37ms -2.42%
Large nested iteration 32.9±1.10ms 32.7±0.13ms -0.61%
Perform Runtime Capabilities Analysis (RCA) on Deutsch-Jozsa sample 1575.5±70.14µs 1585.8±127.35µs +0.65%
Perform Runtime Capabilities Analysis (RCA) on large file sample 8.0±0.09ms 8.0±0.20ms 0.00%
Perform Runtime Capabilities Analysis (RCA) on teleport sample 1459.8±131.19µs 1455.3±100.38µs -0.31%
Perform Runtime Capabilities Analysis (RCA) on the core and std libraries 28.4±0.26ms 28.4±0.21ms 0.00%
Teleport evaluation 94.5±3.52µs 94.7±5.11µs +0.21%

@tcNickolas tcNickolas added this pull request to the merge queue Aug 20, 2024
Merged via the queue into main with commit 897a397 Aug 20, 2024
19 checks passed
@tcNickolas tcNickolas deleted the mariia/classical-test-samples branch August 20, 2024 18:43
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