Skip to content

Commit 04929b4

Browse files
committed
Update in phase delay correction for punchout (axis of unwrap was worng)
1 parent b49f168 commit 04929b4

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

src/qibocal/protocols/resonator_punchout.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from qibocal.auto.operation import Data, Parameters, Results, Routine
1616

1717
from .utils import HZ_TO_GHZ, fit_punchout, norm, table_dict, table_html
18-
18+
MHZ_TO_GHZ = 1e-3
1919

2020
@dataclass
2121
class ResonatorPunchoutParameters(Parameters):
@@ -149,10 +149,13 @@ def _acquisition(
149149
for qubit, ro_pulse in ro_pulses.items():
150150
# average signal, phase, i and q over the number of shots defined in the runcard
151151
result = results[ro_pulse.serial]
152-
frequency =delta_frequency_range + ro_pulses[qubit].frequency
153-
phase = result.average.phase
152+
153+
phase = result.phase
154+
# Phase is a 2D array, we need to unwrap in the frequency dimension
154155
if params.phase_delay is not None:
155-
phase = np.unwrap(phase)-(frequency-frequency[0])*1e-6*params.phase_delay
156+
phase = np.unwrap(phase, axis = 1) + (
157+
delta_frequency_range*HZ_TO_GHZ * params.phase_delay/ (2 * np.pi*MHZ_TO_GHZ)
158+
)
156159

157160
data.register_qubit(
158161
qubit,

0 commit comments

Comments
 (0)