From af0d7f904ef1dfe19d6c135696fdbc2bcf18cf3d Mon Sep 17 00:00:00 2001 From: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Sun, 11 Aug 2024 13:49:21 +0400 Subject: [PATCH] chore: apply suggestion from review --- src/qibolab/compilers/compiler.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/qibolab/compilers/compiler.py b/src/qibolab/compilers/compiler.py index 5d77356ec..c23308e31 100644 --- a/src/qibolab/compilers/compiler.py +++ b/src/qibolab/compilers/compiler.py @@ -155,9 +155,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: