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

SABRE + CircuitMap Optimization #1419

Merged
merged 25 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
ddbc78d
update v1
Aug 14, 2024
0111a6e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 14, 2024
18f4d66
Update src/qibo/transpiler/router.py
csookim Aug 26, 2024
47ef393
change func blocks_qubits_pairs name
Aug 26, 2024
204b9ac
add _update_mappings_swap / remove swap_l, swap_p
Aug 26, 2024
9917b5d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 26, 2024
8eccc76
add setter and getter of p2l and l2p
Aug 26, 2024
4fe9f7d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 26, 2024
6fe1749
Merge branch 'master' into router_sabre
Aug 27, 2024
2a3438e
circuit -> circuit_map / docstring / one-line for
Aug 28, 2024
7d128ae
Update src/qibo/transpiler/router.py
csookim Aug 28, 2024
e46f341
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 28, 2024
1506b78
enable custom qubit names / wire_names
Aug 29, 2024
19d3737
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 29, 2024
32364fc
add helper func / update test func
Sep 5, 2024
2b8cdc0
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 5, 2024
387afb4
add test func
Sep 5, 2024
6dd6ced
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 5, 2024
c5a4af8
Update src/qibo/transpiler/router.py
csookim Sep 9, 2024
9ba69dc
Update src/qibo/transpiler/router.py
csookim Sep 9, 2024
98fd9f1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 9, 2024
8641a0c
remove comments
Sep 9, 2024
fced73c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 9, 2024
5e25ecf
merge master
Sep 9, 2024
24ecc7a
Merge branch 'master' into router_sabre
Sep 16, 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
4 changes: 2 additions & 2 deletions src/qibo/transpiler/placer.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def assert_mapping_consistency(layout: dict, connectivity: nx.Graph = None):
ref_keys = (
["q" + str(i) for i in nodes] if isinstance(physical_qubits[0], str) else nodes
)
if physical_qubits != ref_keys:
if sorted(physical_qubits) != sorted(ref_keys):
raise_error(
PlacementError,
"Some physical qubits in the layout may be missing or duplicated.",
Expand Down Expand Up @@ -411,7 +411,6 @@ def __init__(
):
self.connectivity = connectivity
self.routing_algorithm = routing_algorithm
self.routing_algorithm.connectivity = connectivity
self.depth = depth

def __call__(self, circuit: Circuit):
Expand All @@ -425,6 +424,7 @@ def __call__(self, circuit: Circuit):
"""
initial_placer = Trivial(self.connectivity)
initial_placement = initial_placer(circuit=circuit)
self.routing_algorithm.connectivity = self.connectivity
new_circuit = self._assemble_circuit(circuit)
final_placement = self._routing_step(initial_placement, new_circuit)

Expand Down
Loading