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

Reproduce Table 1 of arXiv:2404.18809 #198

Merged
merged 116 commits into from
Jan 23, 2025
Merged
Changes from 1 commit
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
610b4df
add script to reproduce table 1 in arXiv:2404.18809
perlinm Jan 13, 2025
d84e4f1
rearrange script
perlinm Jan 13, 2025
684c314
fix data qubits
perlinm Jan 13, 2025
0e2d738
minor cleanup
perlinm Jan 13, 2025
fffb8b3
Merge branch 'main' into reproduce-arxiv
perlinm Jan 14, 2025
89aad46
Merge branch 'main' into reproduce-arxiv
perlinm Jan 14, 2025
876155c
Merge branch 'main' into reproduce-arxiv
perlinm Jan 14, 2025
0b56892
Merge branch 'main' into reproduce-arxiv
perlinm Jan 14, 2025
a9e004c
comment out codes for debugging purposes
perlinm Jan 15, 2025
72f81cc
Merge branch 'main' into reproduce-arxiv
perlinm Jan 15, 2025
8ecf9a6
Using a bipartite matching algorithm (#192)
jmlarson1 Jan 16, 2025
4591573
Merge branch 'main' into reproduce-arxiv
perlinm Jan 17, 2025
a814366
Merge branch 'main' into reproduce-arxiv
perlinm Jan 17, 2025
469f26f
Precomputing distances and locations to greatly improve the time need…
jmlarson1 Jan 17, 2025
dc86e36
Simple typo checker
jmlarson1 Jan 17, 2025
dc929f1
Using numpy to vectorize distance calculations
jmlarson1 Jan 17, 2025
639231d
Bugfix: Can't use the bipartite algorithm for disconnected graphs
jmlarson1 Jan 17, 2025
1219dc0
formatting
perlinm Jan 18, 2025
4af56d5
more cleanup
perlinm Jan 18, 2025
b28fdee
fix comment
perlinm Jan 18, 2025
739a4ff
pre-compute the entire node-loc placement matrix
perlinm Jan 18, 2025
f8fc0d7
Merge branch 'main' into reproduce-arxiv
perlinm Jan 18, 2025
d68f257
Merge branch 'reproduce-arxiv' into precompute_positions_locations
perlinm Jan 18, 2025
15e5730
fix docstring
perlinm Jan 18, 2025
6b70085
speed up graph construction
perlinm Jan 18, 2025
2e9d19c
ensure that the placement graph tries to place every node
perlinm Jan 18, 2025
1ebb62f
remove method used only once
perlinm Jan 18, 2025
36b52e0
more vectorization and less type casting
perlinm Jan 18, 2025
4033325
uncomment other codes
perlinm Jan 18, 2025
ce371f1
add early stopping criteria
perlinm Jan 18, 2025
ae5a49f
minor method rename
perlinm Jan 18, 2025
9e5ec1c
always use nx.bipartite.maximum_matching
perlinm Jan 18, 2025
68192e6
remove unnecessary type hint
perlinm Jan 18, 2025
3ea0daf
stricter return typing
perlinm Jan 18, 2025
0ba18d2
more minor cleanup
perlinm Jan 18, 2025
0da59ac
better boolean logic
perlinm Jan 19, 2025
2db48a6
better comment
perlinm Jan 19, 2025
3ca9cbe
identify perfect matchings with scipy.optimize.linear_sum_assignment
perlinm Jan 19, 2025
3d2e422
type fix
perlinm Jan 19, 2025
7d249d8
expand comment
perlinm Jan 19, 2025
c4220f5
Merge branch 'main' into reproduce-arxiv
perlinm Jan 19, 2025
ac415ec
Merge branch 'reproduce-arxiv' into precompute_positions_locations
perlinm Jan 19, 2025
3b3f231
better docstring
perlinm Jan 19, 2025
3e772a2
typo
perlinm Jan 19, 2025
60950dd
Merge branch 'reproduce-arxiv' into precompute_positions_locations
perlinm Jan 19, 2025
a6e19b5
iterate over parity check matrix instead of Tanner graph
perlinm Jan 19, 2025
2d4824b
clarifying comment
perlinm Jan 19, 2025
f4981eb
one word
jmlarson1 Jan 19, 2025
57f4d96
Merge pull request #194 from Infleqtion/precompute_positions_locations
jmlarson1 Jan 19, 2025
ac3b240
minor simplification
perlinm Jan 19, 2025
3e4bb98
fix docstring
perlinm Jan 19, 2025
cecab9b
change how lattice vectors are used to determine BBCode qubit coordin…
perlinm Jan 21, 2025
69f0f0a
fully reproduce results in arXiv:2404.18809
perlinm Jan 21, 2025
1496e28
remove stray print
perlinm Jan 21, 2025
378a6c6
more verbose outputs
perlinm Jan 21, 2025
b605f62
inject validation
perlinm Jan 21, 2025
64d900d
better docstrings
perlinm Jan 22, 2025
e66b928
Merge branch 'reproduce-arxiv' into actually-reproduce
perlinm Jan 22, 2025
b7a39c3
cheat
perlinm Jan 22, 2025
4224719
simplify BBCode.get_qubit_pos
perlinm Jan 22, 2025
9e3cd25
Merge branch 'reproduce-arxiv' into actually-reproduce
perlinm Jan 22, 2025
b55caf2
speed up optimization over lattice vectors
perlinm Jan 22, 2025
a8a303c
fix typo
perlinm Jan 22, 2025
3279008
Merge branch 'reproduce-arxiv' into actually-reproduce
perlinm Jan 22, 2025
7c15bf0
more precomputing
perlinm Jan 22, 2025
f63d0bc
fix sign error
perlinm Jan 22, 2025
1395c48
Merge branch 'reproduce-arxiv' into actually-reproduce
perlinm Jan 22, 2025
3442f23
fix right-sector shifts
perlinm Jan 22, 2025
7a1021b
cache qubit positions
perlinm Jan 22, 2025
4dc1cd7
code rearrangement
perlinm Jan 22, 2025
093ca94
Merge branch 'reproduce-arxiv' into actually-reproduce
perlinm Jan 22, 2025
5c3c53c
minor cleanup
perlinm Jan 22, 2025
b09f290
Merge branch 'reproduce-arxiv' into actually-reproduce
perlinm Jan 22, 2025
bdd229f
factor out BBCode.basis_change_coefs
perlinm Jan 22, 2025
200bec6
Merge branch 'reproduce-arxiv' into actually-reproduce
perlinm Jan 22, 2025
c6d677e
better docstring
perlinm Jan 22, 2025
8cc7ac1
Merge branch 'reproduce-arxiv' into actually-reproduce
perlinm Jan 22, 2025
2ece73e
fix typo
perlinm Jan 22, 2025
da9304a
Merge branch 'reproduce-arxiv' into actually-reproduce
perlinm Jan 22, 2025
cdb335e
lots of cleanup in BBCode
perlinm Jan 22, 2025
5475e57
Merge branch 'reproduce-arxiv' into actually-reproduce
perlinm Jan 22, 2025
62b03c9
cleanup and remove redundancies
perlinm Jan 22, 2025
fa49619
validate
perlinm Jan 22, 2025
b96dd37
Merge branch 'main' into reproduce-arxiv
perlinm Jan 22, 2025
7e5b929
Merge branch 'reproduce-arxiv' into actually-reproduce
perlinm Jan 22, 2025
0d70f4d
speed up finding qubit positions
perlinm Jan 22, 2025
9ac90d2
fix sector bug
perlinm Jan 22, 2025
bac12b5
Merge branch 'main' into reproduce-arxiv
perlinm Jan 22, 2025
b2c8708
Merge branch 'reproduce-arxiv' into actually-reproduce
perlinm Jan 22, 2025
22c7d86
simplify get_qubit_pos
perlinm Jan 22, 2025
4189c14
Merge branch 'reproduce-arxiv' into actually-reproduce
perlinm Jan 22, 2025
0946006
precompute the supports of parity checks
perlinm Jan 22, 2025
28c9e03
nit newline
perlinm Jan 22, 2025
bcc983c
remove debugging code
perlinm Jan 22, 2025
ad4b8e8
fix typo
perlinm Jan 22, 2025
8aecf84
Merge branch 'reproduce-arxiv' into actually-reproduce
perlinm Jan 22, 2025
56fedbb
type fix
perlinm Jan 22, 2025
c8614b3
more typing cleanup
perlinm Jan 22, 2025
b83e791
clarify docstring
perlinm Jan 22, 2025
31dcb85
faster distances_squared
perlinm Jan 22, 2025
006bfdf
factor out known layout parameters
perlinm Jan 22, 2025
160f0fd
expand docstrings and comments
perlinm Jan 22, 2025
85b0b26
API and typing cleanup
perlinm Jan 22, 2025
0679e19
simplify BBCode.modular_inverse and fix coverage
perlinm Jan 22, 2025
7bcb5c9
Merge branch 'reproduce-arxiv' into actually-reproduce
perlinm Jan 22, 2025
49b0726
nit rearrangement
perlinm Jan 22, 2025
647846b
some renaming and docstring additions
perlinm Jan 22, 2025
9110929
fix typo
perlinm Jan 23, 2025
d9d6034
now that we have a scipy dependency, use scipy.linalg.block_diag
perlinm Jan 23, 2025
654433a
change docstring and rename file
perlinm Jan 23, 2025
a35652e
update docstring
perlinm Jan 23, 2025
3791360
minor speedup: cache candidate locations for check qubits
perlinm Jan 23, 2025
f1ea366
get best known params
perlinm Jan 23, 2025
02266ac
coverage fixes
perlinm Jan 23, 2025
58ad6ab
typos
jmlarson1 Jan 23, 2025
4ca3603
typos
jmlarson1 Jan 23, 2025
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
Prev Previous commit
Next Next commit
Using a bipartite matching algorithm (#192)
jmlarson1 authored Jan 16, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 8ecf9a65598a2fb82def12a2b42d0eb50f3706d8
2 changes: 1 addition & 1 deletion examples/find_optimal_communication_distance.py
Original file line number Diff line number Diff line change
@@ -60,7 +60,7 @@ def get_qubit_assignment(
graph = build_placement_graph(code, folded_layout, max_comm_dist)
if graph is None:
return None
matching = nx.max_weight_matching(graph, maxcardinality=True)
matching = nx.bipartite.maximum_matching(graph)
return matching if nx.is_perfect_matching(graph, matching) else None