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

Avoid panic from DumpRegister in circuit display #1554

Merged
merged 1 commit into from
May 22, 2024

Conversation

swernli
Copy link
Collaborator

@swernli swernli commented May 22, 2024

This avoids a panic on empty state that can happen when DumpRegister is called on an empty state vector, such as when generating a circuit without any underlying quantum simulation.

This avoids a panic on empty state that can happen when `DumpRegister` is called on an empty state vector, such as when generating a circuit without any underlying quantum simulation.
@swernli swernli enabled auto-merge May 22, 2024 05:33
Copy link

Benchmark for 5b807cc

Click to view benchmark
Test Base PR %
Array append evaluation 325.9±1.48µs 328.1±2.36µs +0.68%
Array literal evaluation 186.8±1.15µs 176.4±1.00µs -5.57%
Array update evaluation 409.4±2.09µs 409.7±2.43µs +0.07%
Core + Standard library compilation 19.0±0.33ms 19.3±1.05ms +1.58%
Deutsch-Jozsa evaluation 5.0±0.04ms 5.1±0.04ms +2.00%
Large file parity evaluation 33.9±0.11ms 33.9±0.26ms 0.00%
Large input file compilation 12.8±0.30ms 13.0±0.29ms +1.56%
Large input file compilation (interpreter) 47.5±0.82ms 47.7±0.93ms +0.42%
Large nested iteration 32.4±0.47ms 33.0±1.00ms +1.85%
Perform Runtime Capabilities Analysis (RCA) on Deutsch-Jozsa sample 1570.4±39.74µs 1561.9±57.08µs -0.54%
Perform Runtime Capabilities Analysis (RCA) on large file sample 7.9±0.09ms 7.8±0.18ms -1.27%
Perform Runtime Capabilities Analysis (RCA) on teleport sample 1435.5±36.88µs 1420.0±46.31µs -1.08%
Perform Runtime Capabilities Analysis (RCA) on the core and std libraries 28.3±0.30ms 28.1±0.15ms -0.71%
Teleport evaluation 88.3±5.33µs 89.1±3.70µs +0.91%

@billti billti disabled auto-merge May 22, 2024 06:00
@billti billti merged commit ed2a8fc into main May 22, 2024
16 checks passed
@billti billti deleted the swernli/fix-dumpregister-panic branch May 22, 2024 06:00
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.

None yet

2 participants