Skip to content

Commit 7813870

Browse files
committed
Add formatting GraphMonomorphismMapper initial placement strategy
1 parent 6a1cc7d commit 7813870

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

cirq-core/cirq/transformers/routing/graph_monomorphism_mapper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
from __future__ import annotations
2929

30-
from typing import TYPE_CHECKING, Dict, Iterable, Optional, Tuple
30+
from typing import Dict, Iterable, Optional, Tuple, TYPE_CHECKING
3131

3232
import networkx as nx
3333

@@ -187,4 +187,4 @@ def __repr__(self):
187187
"cirq.GraphMonomorphismMapper("
188188
f"nx.{graph_type}({dict(self.device_graph.adjacency())}), "
189189
f"max_matches={self.max_matches}, timeout_steps={self.timeout_steps})"
190-
)
190+
)

cirq-core/cirq/transformers/routing/graph_monomorphism_mapper_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
import cirq
2121

2222
# Unit tests: keep N small and VF2 bounded.
23-
_MAX_MATCHES = 1 # stop at first embedding
24-
_TIMEOUT_STEPS = 2_000 # hard cap search work
23+
_MAX_MATCHES = 1 # stop at first embedding
24+
_TIMEOUT_STEPS = 2_000 # hard cap search work
2525

2626

2727
def construct_star_circuit_5q():
@@ -132,4 +132,4 @@ def test_more_logical_than_physical_fails_fast() -> None:
132132
def test_repr() -> None:
133133
g = cirq.testing.construct_grid_device(4, 4).metadata.nx_graph
134134
mapper = cirq.GraphMonomorphismMapper(g, max_matches=123, timeout_steps=456)
135-
cirq.testing.assert_equivalent_repr(mapper, setup_code="import cirq\nimport networkx as nx")
135+
cirq.testing.assert_equivalent_repr(mapper, setup_code="import cirq\nimport networkx as nx")

0 commit comments

Comments
 (0)