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

Workarounds for IPython cell timing and output buffering #1712

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

swernli
Copy link
Collaborator

@swernli swernli commented Jul 9, 2024

This change adds some workarounds that help with accurately reporting timing and avoiding output buffering when running either %%qsharp cell magic or qsharp.eval (and similar calls) in Python cells.

Fixes #1557

This change adds some workarounds that help with accurately reporting timing and avoiding output buffering when running either `%%qsharp` cell magic or `qsharp.eval` (and similar calls) in Python cells.

Fixes #1557
Copy link

github-actions bot commented Jul 9, 2024

Benchmark for cc712c5

Click to view benchmark
Test Base PR %
Array append evaluation 327.8±2.32µs 331.7±1.71µs +1.19%
Array literal evaluation 169.4±2.58µs 185.9±1.00µs +9.74%
Array update evaluation 407.5±1.59µs 411.9±2.47µs +1.08%
Core + Standard library compilation 22.0±0.72ms 22.1±0.63ms +0.45%
Deutsch-Jozsa evaluation 4.8±0.08ms 4.8±0.04ms 0.00%
Large file parity evaluation 34.3±0.30ms 34.2±0.59ms -0.29%
Large input file compilation 12.7±0.32ms 12.9±0.83ms +1.57%
Large input file compilation (interpreter) 50.5±1.18ms 50.2±1.07ms -0.59%
Large nested iteration 32.7±2.81ms 32.4±1.13ms -0.92%
Perform Runtime Capabilities Analysis (RCA) on Deutsch-Jozsa sample 1566.4±54.19µs 1575.5±110.35µs +0.58%
Perform Runtime Capabilities Analysis (RCA) on large file sample 7.9±0.13ms 7.9±0.12ms 0.00%
Perform Runtime Capabilities Analysis (RCA) on teleport sample 1428.1±50.51µs 1432.8±60.76µs +0.33%
Perform Runtime Capabilities Analysis (RCA) on the core and std libraries 28.2±0.29ms 28.2±0.27ms 0.00%
Teleport evaluation 90.5±4.30µs 90.7±3.23µs +0.22%

@swernli swernli added this pull request to the merge queue Jul 9, 2024
Merged via the queue into main with commit c72c235 Jul 9, 2024
19 checks passed
@swernli swernli deleted the swernli/issue1557 branch July 9, 2024 14:38
swernli added a commit that referenced this pull request Nov 5, 2024
This change fixes an issue where the workaround introduced in #1712 for timing in Jupyter cells could cause some environments (notably VS Code) to exceed the 500 item limit on displays and prevent other output from being shown.
github-merge-queue bot pushed a commit that referenced this pull request Nov 5, 2024
This change fixes an issue where the workaround introduced in #1712 for
timing in Jupyter cells could cause some environments (notably VS Code)
to exceed the 500 item limit on displays and prevent other output from
being shown.
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.

Notebook cells running qsharp calls always report 0.0s execution time
3 participants