Skip to content

Commit

Permalink
chore: apply suggestion from review
Browse files Browse the repository at this point in the history
  • Loading branch information
stavros11 committed Aug 11, 2024
1 parent 6316c44 commit 8be2dbc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/qibolab/compilers/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,8 @@ def find_max(channels: list[Channel]):
return max(channel_clock[ch.name] for ch in channels)

def qubit_clock(el: QubitId):
if el in platform.qubits:
return find_max(platform.qubits[el].channels)
return find_max(platform.couplers[el].channels)
elements = platform.qubits if el in platform.qubits else platform.couplers
return max(channel_clock[ch.name] for ch in elements[el].channels)

# process circuit gates
for moment in circuit.queue.moments:
Expand Down

0 comments on commit 8be2dbc

Please sign in to comment.