-
Notifications
You must be signed in to change notification settings - Fork 0
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
Plot expectation value benchmarks #168
Merged
Merged
Changes from 36 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
9f62ec5
remove unused QASM generation functions
jordandsullivan 47632ad
Bug fixes for save
jordandsullivan c7dcd18
Add N=10 qubits QCNN file
jordandsullivan 1ed386c
refactor expval benchmark to run single iteration
natestemen fc9a3e5
Merge branch 'plot-expectation-value' of https://github.com/unitaryfu…
jordandsullivan 019a232
Copy benchpress QASM 2 files for N=10 and N=9 qubits
jordandsullivan c32ee7c
Rename qasm file to include basis
jordandsullivan dcb4322
Add filenames to expal run
jordandsullivan 1c28fd3
Fix filenames
jordandsullivan 22a35a7
ensure observable matches circuit size
natestemen 5353c4b
add qisit aer to requirements
natestemen 683310f
remove old expval data
natestemen 1fb692f
first results
natestemen 39f4ed2
first plot
natestemen 8471ab3
more plots
natestemen 782c920
uncomment first commands to run
natestemen 011b185
s/relative/absolute for errors
natestemen e334d0c
add new data and remove relative errors
natestemen f6b6417
remove old plot
natestemen 496731a
Merge branch 'main' into plot-expectation-value
jordandsullivan d4b4eed
Merge branch 'main' into plot-expectation-value
natestemen 176e8b7
ensure noise is added to all target gates
natestemen 4869cda
fix dependency name
natestemen 12e40d6
use transpile as translate for consistency
natestemen 6afbc51
Merge branch 'main' into plot-expectation-value
natestemen c4f5134
ignore python compiled files
natestemen 2b6542b
new lockfile
natestemen ee4cc04
remove pycache from repo
natestemen 914ea08
fix botched imports
natestemen f6d634e
use `glob` for consistency
natestemen 8cb27ea
remove average from y axis
natestemen b9cbea5
fix typo
natestemen 3bb18dd
describe violin plot of expectation values
natestemen a334c7a
use poetry to run expval benchmarks
natestemen cbeaa5b
refactor expval script
natestemen 22945b6
formatting
natestemen 6ec0268
Merge branch 'main' into plot-expectation-value
natestemen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
*.ipynb_checkpoints | ||
*.jupyter_cache | ||
_build | ||
*__pycache__/ | ||
__pycache__/ | ||
docs/build/ | ||
*.egg-info/ | ||
dist/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
natestemen marked this conversation as resolved.
Show resolved
Hide resolved
natestemen marked this conversation as resolved.
Show resolved
Hide resolved
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
197 changes: 197 additions & 0 deletions
197
...arks/qasm_circuits/qasm2/benchpress/qaoa_barabasi_albert_N10_3reps_basis_rz_rx_ry_cx.qasm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,197 @@ | ||
OPENQASM 2.0; | ||
include "qelib1.inc"; | ||
qreg q[10]; | ||
ry(pi/2) q[0]; | ||
rx(pi) q[0]; | ||
ry(pi/2) q[1]; | ||
rx(pi) q[1]; | ||
cx q[0],q[1]; | ||
rz(1.5846238651156088) q[1]; | ||
cx q[0],q[1]; | ||
ry(pi/2) q[2]; | ||
rx(pi) q[2]; | ||
cx q[0],q[2]; | ||
rz(1.5846238651156088) q[2]; | ||
cx q[0],q[2]; | ||
rx(1.9993980494552113) q[2]; | ||
ry(pi/2) q[3]; | ||
rx(pi) q[3]; | ||
cx q[0],q[3]; | ||
rz(1.5846238651156088) q[3]; | ||
cx q[0],q[3]; | ||
rx(1.9993980494552113) q[0]; | ||
cx q[1],q[3]; | ||
rz(1.5846238651156088) q[3]; | ||
cx q[1],q[3]; | ||
ry(pi/2) q[4]; | ||
rx(pi) q[4]; | ||
cx q[1],q[4]; | ||
rz(1.5846238651156088) q[4]; | ||
cx q[1],q[4]; | ||
cx q[3],q[4]; | ||
rz(1.5846238651156088) q[4]; | ||
cx q[3],q[4]; | ||
ry(pi/2) q[5]; | ||
rx(pi) q[5]; | ||
cx q[1],q[5]; | ||
rz(1.5846238651156088) q[5]; | ||
cx q[1],q[5]; | ||
cx q[3],q[5]; | ||
rz(1.5846238651156088) q[5]; | ||
cx q[3],q[5]; | ||
ry(pi/2) q[6]; | ||
rx(pi) q[6]; | ||
cx q[4],q[6]; | ||
rz(1.5846238651156088) q[6]; | ||
cx q[4],q[6]; | ||
cx q[5],q[6]; | ||
rz(1.5846238651156088) q[6]; | ||
cx q[5],q[6]; | ||
rx(1.9993980494552113) q[6]; | ||
ry(pi/2) q[7]; | ||
rx(pi) q[7]; | ||
cx q[3],q[7]; | ||
rz(1.5846238651156088) q[7]; | ||
cx q[3],q[7]; | ||
cx q[4],q[7]; | ||
rz(1.5846238651156088) q[7]; | ||
cx q[4],q[7]; | ||
rx(1.9993980494552113) q[4]; | ||
rx(1.9993980494552113) q[7]; | ||
ry(pi/2) q[8]; | ||
rx(pi) q[8]; | ||
cx q[3],q[8]; | ||
rz(1.5846238651156088) q[8]; | ||
cx q[3],q[8]; | ||
cx q[5],q[8]; | ||
rz(1.5846238651156088) q[8]; | ||
cx q[5],q[8]; | ||
rx(1.9993980494552113) q[5]; | ||
rx(1.9993980494552113) q[8]; | ||
ry(pi/2) q[9]; | ||
rx(pi) q[9]; | ||
cx q[1],q[9]; | ||
rz(1.5846238651156088) q[9]; | ||
cx q[1],q[9]; | ||
rx(1.9993980494552113) q[1]; | ||
cx q[0],q[1]; | ||
rz(0.8199726992929931) q[1]; | ||
cx q[0],q[1]; | ||
cx q[0],q[2]; | ||
rz(0.8199726992929931) q[2]; | ||
cx q[0],q[2]; | ||
rx(9.808607416083087) q[2]; | ||
cx q[3],q[9]; | ||
rz(1.5846238651156088) q[9]; | ||
cx q[3],q[9]; | ||
rx(1.9993980494552113) q[3]; | ||
cx q[0],q[3]; | ||
rz(0.8199726992929931) q[3]; | ||
cx q[0],q[3]; | ||
rx(9.808607416083087) q[0]; | ||
cx q[1],q[3]; | ||
rz(0.8199726992929931) q[3]; | ||
cx q[1],q[3]; | ||
cx q[1],q[4]; | ||
rz(0.8199726992929931) q[4]; | ||
cx q[1],q[4]; | ||
cx q[1],q[5]; | ||
cx q[3],q[4]; | ||
rz(0.8199726992929931) q[4]; | ||
cx q[3],q[4]; | ||
cx q[4],q[6]; | ||
rz(0.8199726992929931) q[5]; | ||
cx q[1],q[5]; | ||
cx q[3],q[5]; | ||
rz(0.8199726992929931) q[5]; | ||
cx q[3],q[5]; | ||
cx q[3],q[7]; | ||
rz(0.8199726992929931) q[6]; | ||
cx q[4],q[6]; | ||
cx q[5],q[6]; | ||
rz(0.8199726992929931) q[6]; | ||
cx q[5],q[6]; | ||
rx(9.808607416083087) q[6]; | ||
rz(0.8199726992929931) q[7]; | ||
cx q[3],q[7]; | ||
cx q[3],q[8]; | ||
cx q[4],q[7]; | ||
rz(0.8199726992929931) q[7]; | ||
cx q[4],q[7]; | ||
rx(9.808607416083087) q[4]; | ||
rx(9.808607416083087) q[7]; | ||
rz(0.8199726992929931) q[8]; | ||
cx q[3],q[8]; | ||
cx q[5],q[8]; | ||
rz(0.8199726992929931) q[8]; | ||
cx q[5],q[8]; | ||
rx(9.808607416083087) q[5]; | ||
rx(9.808607416083087) q[8]; | ||
rx(1.9993980494552113) q[9]; | ||
cx q[1],q[9]; | ||
rz(0.8199726992929931) q[9]; | ||
cx q[1],q[9]; | ||
rx(9.808607416083087) q[1]; | ||
cx q[0],q[1]; | ||
rz(1.2724239654332838) q[1]; | ||
cx q[0],q[1]; | ||
cx q[0],q[2]; | ||
rz(1.2724239654332838) q[2]; | ||
cx q[0],q[2]; | ||
rx(4.304211127616218) q[2]; | ||
cx q[3],q[9]; | ||
rz(0.8199726992929931) q[9]; | ||
cx q[3],q[9]; | ||
rx(9.808607416083087) q[3]; | ||
cx q[0],q[3]; | ||
rz(1.2724239654332838) q[3]; | ||
cx q[0],q[3]; | ||
rx(4.304211127616218) q[0]; | ||
cx q[1],q[3]; | ||
rz(1.2724239654332838) q[3]; | ||
cx q[1],q[3]; | ||
cx q[1],q[4]; | ||
rz(1.2724239654332838) q[4]; | ||
cx q[1],q[4]; | ||
cx q[1],q[5]; | ||
cx q[3],q[4]; | ||
rz(1.2724239654332838) q[4]; | ||
cx q[3],q[4]; | ||
cx q[4],q[6]; | ||
rz(1.2724239654332838) q[5]; | ||
cx q[1],q[5]; | ||
cx q[3],q[5]; | ||
rz(1.2724239654332838) q[5]; | ||
cx q[3],q[5]; | ||
cx q[3],q[7]; | ||
rz(1.2724239654332838) q[6]; | ||
cx q[4],q[6]; | ||
cx q[5],q[6]; | ||
rz(1.2724239654332838) q[6]; | ||
cx q[5],q[6]; | ||
rx(4.304211127616218) q[6]; | ||
rz(1.2724239654332838) q[7]; | ||
cx q[3],q[7]; | ||
cx q[3],q[8]; | ||
cx q[4],q[7]; | ||
rz(1.2724239654332838) q[7]; | ||
cx q[4],q[7]; | ||
rx(4.304211127616218) q[4]; | ||
rx(4.304211127616218) q[7]; | ||
rz(1.2724239654332838) q[8]; | ||
cx q[3],q[8]; | ||
cx q[5],q[8]; | ||
rz(1.2724239654332838) q[8]; | ||
cx q[5],q[8]; | ||
rx(4.304211127616218) q[5]; | ||
rx(4.304211127616218) q[8]; | ||
rx(9.808607416083087) q[9]; | ||
cx q[1],q[9]; | ||
rz(1.2724239654332838) q[9]; | ||
cx q[1],q[9]; | ||
rx(4.304211127616218) q[1]; | ||
cx q[3],q[9]; | ||
rz(1.2724239654332838) q[9]; | ||
cx q[3],q[9]; | ||
rx(4.304211127616218) q[3]; | ||
rx(4.304211127616218) q[9]; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a little suspicious how the QAOA, QV, and QCNN circuit results are all basically identical. We should make sure this is real and not an artifact of how we perform simulation (or something else)!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you plot the expectation values themselves and standard deviations as suggested above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's compare the compiled gate counts between the different compilers in case they are returning approximately the same circuits.