Skip to content

Commit

Permalink
fix placer
Browse files Browse the repository at this point in the history
  • Loading branch information
changsookim committed Nov 15, 2024
1 parent 7964cce commit cbc0c2f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/qibo/transpiler/placer.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,14 @@ def __call__(self, circuit: Circuit):
Returns:
(dict): physical to logical qubit mapping.
"""
if self.connectivity is not None:
if circuit.wire_names is not None:
trivial_layout = dict(
zip(
circuit.wire_names,
range(circuit.nqubits),
)
)
elif self.connectivity is not None:
if self.connectivity.number_of_nodes() != circuit.nqubits:
raise_error(
PlacementError,
Expand Down

0 comments on commit cbc0c2f

Please sign in to comment.