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

feat!: #334: program stats #336

Merged
merged 79 commits into from
Mar 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
f495d04
feat: initial implementation of program-stats crate
Shadow53 Jan 30, 2024
72ef824
fix: be more flexible about allowed instructions
Shadow53 Jan 30, 2024
8222a8a
fix: add naive method to use graph for gate depths
Shadow53 Jan 30, 2024
33e263a
chore: code cleanup
Shadow53 Jan 31, 2024
a4d2d69
chore: merge program-stats into quil-rs
Shadow53 Jan 31, 2024
99aa591
refactor: make a new ProgramStats type instead of methods on Program
Shadow53 Jan 31, 2024
7d931bd
fix: correct the implementation of topological_swap_count
Shadow53 Jan 31, 2024
5ca8727
fix: implement fidelity_estimate
Shadow53 Feb 1, 2024
d80008b
refactor: introduce an 'instruction-source' trait so that we can use …
BatmanAoD Feb 3, 2024
a53f873
implement has_dynamic_control_flow, add some tests
BatmanAoD Feb 5, 2024
2eecbae
implement tests for all nontrivial functions
BatmanAoD Feb 5, 2024
400f95a
apply clippy recommendation
BatmanAoD Feb 5, 2024
3597b16
update 'indexmap' and 'itertools'; this should satisfy cargo-deny
BatmanAoD Feb 5, 2024
01d59cb
make path_fold callbacks infallible, and unwrap accordingly
BatmanAoD Feb 5, 2024
73833f5
remove error-handling from path_fold entirely
BatmanAoD Feb 5, 2024
f5d7a50
add quil test examples with jump & swap
BatmanAoD Feb 5, 2024
20a3b9f
backout of commit 73833f5229c9b640afc3052496db905a56310bbf
BatmanAoD Feb 5, 2024
418fb55
restore fallible ProgramStats signatures
BatmanAoD Feb 5, 2024
f568096
test for fallible gate-depth function
BatmanAoD Feb 5, 2024
ae8630e
add 'is_empty' to satisfy clippy
BatmanAoD Feb 5, 2024
3ca150e
associated type for qubit set
BatmanAoD Feb 5, 2024
b906714
TODO comments linking to issues
BatmanAoD Feb 5, 2024
f21e733
ProgramStats::is_empty for clippy's sake
BatmanAoD Feb 5, 2024
587544a
add InstructionBlock as a source of instructions for stats
BatmanAoD Feb 5, 2024
5f3345c
include measurements in qubits for blocks; start adding tests for sta…
BatmanAoD Feb 5, 2024
250ee4f
add initial control flow graph construction
kalzoo Feb 9, 2024
50b7436
add Program methods for basic block retrieval
kalzoo Feb 9, 2024
858b5a7
reorganize into new analysis module
kalzoo Feb 9, 2024
3f8f48f
restructure crate
kalzoo Feb 9, 2024
84d04f8
impl<'p> InstructionsSource for BasicBlock<'p>
kalzoo Feb 9, 2024
cadb72e
build ScheduledProgram from ControlFlowGraph and rename it
kalzoo Feb 9, 2024
ecf1bed
move scheduling snapshots
kalzoo Feb 9, 2024
691f281
update scheduling snapshots to reflect logical changes
kalzoo Feb 9, 2024
24b1406
chore: partial lint
kalzoo Feb 9, 2024
67961f9
Error message acknowledging possibility of empty program
BatmanAoD Feb 9, 2024
7fc8b9c
add Kalan's suggestions
BatmanAoD Feb 9, 2024
7323992
refactor; get rid of InstructionSource; add tests
BatmanAoD Feb 9, 2024
3573ae7
fix dynamic control flow analysis for BasicBlock
kalzoo Feb 10, 2024
00d31df
add dynamic control flow analysis for ControlFlowGraph
kalzoo Feb 10, 2024
a518bf4
refactor QubitGraph to support try_path_fold and path_fold separately
kalzoo Feb 10, 2024
9d965db
use correct call to build ControlFlowGraph from Program
kalzoo Feb 10, 2024
49adb1a
chore: fix import
kalzoo Feb 10, 2024
fcd648b
remove todo functions
kalzoo Feb 10, 2024
097e467
export QubitGraph
kalzoo Feb 10, 2024
9efe89a
chore: lint
kalzoo Feb 10, 2024
d2d171a
chore: document and copyright
kalzoo Feb 10, 2024
c39e98f
chore: lint
kalzoo Feb 10, 2024
f4fe902
chore: add missing exports
kalzoo Feb 10, 2024
502629d
add ScheduledProgram::into_basic_blocks
kalzoo Feb 10, 2024
60d7539
add flat schedule computation
kalzoo Feb 10, 2024
2323a4c
copmute the duration of a Schedule; add docs
kalzoo Feb 11, 2024
50e6c19
chore: tests and cleanup
kalzoo Feb 12, 2024
14742f0
refactor BasicBlockTerminator to near original form
kalzoo Feb 12, 2024
54560e3
fix graphviz display bug and update snapshots
kalzoo Feb 12, 2024
442f7fd
chore: upgrade strum
kalzoo Feb 13, 2024
4fff376
Record BasicBlock.instruction_index_offset for source mapping
kalzoo Feb 13, 2024
5faf3d5
WIP: add Python bindings for analysis functions
kalzoo Feb 14, 2024
9f96d64
quil-py: add type stubs and tests
kalzoo Feb 24, 2024
147a06b
wip: scheduling BasicBlock via calibration expansion and source mapping
kalzoo Feb 24, 2024
6f80abd
chore: cleanup
kalzoo Feb 24, 2024
f7018d8
Merge branch 'main' into 334-program-stats
kalzoo Feb 24, 2024
762db64
chore: lint
kalzoo Feb 24, 2024
8a78fa7
chore: fix test
kalzoo Feb 24, 2024
0da027c
chore: add missing types
kalzoo Feb 24, 2024
73c18b5
chore: fix py stubs
kalzoo Feb 26, 2024
4b8b43f
chore(quil-py): add docs
kalzoo Feb 26, 2024
00cedb9
chore: rename Time -> TimeUnit for clarity
kalzoo Feb 27, 2024
98b83c1
Add TimeSpan#end
kalzoo Feb 27, 2024
f836aab
impl repr on new Python types
kalzoo Feb 27, 2024
1b067f8
fix the BasicBlock.as_fixed_schedule example
kalzoo Feb 27, 2024
55a6b2b
chore: doc
kalzoo Feb 27, 2024
3c00eb3
chore: docs
kalzoo Feb 28, 2024
4e4162a
chore: wrap python errors and fix return type
kalzoo Feb 29, 2024
43358f5
chore: use .as_inner() appropriately
kalzoo Feb 29, 2024
d24a0eb
remove analytics which are trivial to compute: gate_volume, topologic…
kalzoo Feb 29, 2024
f6f955a
refactor FixedSchedule -> ScheduleSeconds, remove zero-duration param…
kalzoo Feb 29, 2024
4821de4
chore: fix stubs
kalzoo Feb 29, 2024
35e8073
remove unused Python binding
kalzoo Feb 29, 2024
f66f9a7
include zero-duration instructions in BasicBlock schedule calculation
kalzoo Mar 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ node_modules
# unreviewed insta snapshots
*.snap.new

# JetBrains Editors
# IDEs and editors
.idea/
.vscode/

# Python artifacts
*.so
Expand Down
145 changes: 70 additions & 75 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ codegen-units = 1

[workspace.dependencies]
ndarray = { version = "0.15.6", features = ["approx-0_5"] }
strum = { version = "0.24.1", features = ["derive"] }
strum = { version = "0.26.0", features = ["derive"] }
Loading
Loading