From 3c36a47e146e841cd25ed99b4ed70017c297e397 Mon Sep 17 00:00:00 2001 From: Jacfomg Date: Fri, 3 May 2024 17:54:40 +0400 Subject: [PATCH 01/10] feat: resonator depletion measuremant --- .../protocols/characterization/__init__.py | 2 + .../protocols/characterization/allxy/allxy.py | 8 +- .../allxy/allxy_resonator_depletion_tuning.py | 173 ++++++++++++++++++ tests/runcards/protocols.yml | 7 + 4 files changed, 188 insertions(+), 2 deletions(-) create mode 100644 src/qibocal/protocols/characterization/allxy/allxy_resonator_depletion_tuning.py diff --git a/src/qibocal/protocols/characterization/__init__.py b/src/qibocal/protocols/characterization/__init__.py index 05df60e0c..e790886fb 100644 --- a/src/qibocal/protocols/characterization/__init__.py +++ b/src/qibocal/protocols/characterization/__init__.py @@ -1,6 +1,7 @@ from enum import Enum from .allxy.allxy import allxy +from .allxy.allxy_resonator_depletion_tuning import allxy_resonator_depletion_tuning from .classification import single_shot_classification from .coherence.spin_echo import spin_echo from .coherence.spin_echo_signal import spin_echo_signal @@ -94,6 +95,7 @@ class Operation(Enum): spin_echo_signal = spin_echo_signal allxy = allxy drag_tuning = drag_tuning + allxy_resonator_depletion_tuning = allxy_resonator_depletion_tuning flipping = flipping dispersive_shift = dispersive_shift chevron = chevron diff --git a/src/qibocal/protocols/characterization/allxy/allxy.py b/src/qibocal/protocols/characterization/allxy/allxy.py index 76d9f1a38..96123e286 100644 --- a/src/qibocal/protocols/characterization/allxy/allxy.py +++ b/src/qibocal/protocols/characterization/allxy/allxy.py @@ -134,13 +134,15 @@ def add_gate_pair_pulses_to_sequence( gates, qubit, sequence, + sequence_delay=0, + readout_delay=0, beta_param=None, ): pulse_duration = platform.create_RX_pulse(qubit, start=0).duration # All gates have equal pulse duration sequenceDuration = 0 - pulse_start = 0 + pulse_start = sequence_delay for gate in gates: if gate == "I": @@ -215,7 +217,9 @@ def add_gate_pair_pulses_to_sequence( pulse_start = pulse_duration # RO pulse starting just after pair of gates - ro_pulse = platform.create_qubit_readout_pulse(qubit, start=sequenceDuration + 4) + ro_pulse = platform.create_qubit_readout_pulse( + qubit, start=sequenceDuration + 4 + readout_delay + ) sequence.add(ro_pulse) return sequence, ro_pulse diff --git a/src/qibocal/protocols/characterization/allxy/allxy_resonator_depletion_tuning.py b/src/qibocal/protocols/characterization/allxy/allxy_resonator_depletion_tuning.py new file mode 100644 index 000000000..9a7f33b4f --- /dev/null +++ b/src/qibocal/protocols/characterization/allxy/allxy_resonator_depletion_tuning.py @@ -0,0 +1,173 @@ +from dataclasses import dataclass, field +from typing import Optional + +import numpy as np +import numpy.typing as npt +import plotly.graph_objects as go +from qibolab import AveragingMode, ExecutionParameters +from qibolab.platform import Platform +from qibolab.pulses import PulseSequence +from qibolab.qubits import QubitId + +from qibocal.auto.operation import Data, Parameters, Results, Routine + +from . import allxy + + +@dataclass +class AllXYDragParameters(Parameters): + """AllXYDrag runcard inputs.""" + + delay_start: float + """Initial delay parameter for resonator depletion.""" + delay_end: float + """Final delay parameter for resonator depletion.""" + delay_step: float + """Step delay parameter for resonator depletion.""" + + +@dataclass +class AllXYDragResults(Results): + """AllXYDrag outputs.""" + + +@dataclass +class AllXYDragData(Data): + """AllXY acquisition outputs.""" + + delay_param: Optional[float] = None + """Delay parameter for resonator depletion.""" + data: dict[tuple[QubitId, float], npt.NDArray[allxy.AllXYType]] = field( + default_factory=dict + ) + """Raw data acquired.""" + + @property + def delay_params(self): + """Access qubits from data structure.""" + return np.unique([b[1] for b in self.data]) + + +def _acquisition( + params: AllXYDragParameters, + platform: Platform, + targets: list[QubitId], +) -> AllXYDragData: + r""" + Data acquisition for allXY experiment varying delay after a measurement. + The AllXY experiment is a simple test of the calibration of single qubit gatesThe qubit (initialized in the |0> state) + is subjected to two back-to-back single-qubit gates and measured. In each round, we run 21 different gate pairs: + ideally, the first 5 return the qubit to |0>, the next 12 drive it to superposition state, and the last 4 put the + qubit in |1> state. + + The AllXY iteration method allows the user to execute iteratively the list of gates playing with the drag pulse shape + in order to find the optimal drag pulse coefficient for pi pulses. + """ + + data = AllXYDragData() + + delays = np.arange(params.delay_start, params.delay_end, params.delay_step).round(4) + # sweep the parameters + for delay_param in delays: + for gates in allxy.gatelist: + # create a sequence of pulses + ro_pulses = {} + sequence = PulseSequence() + for qubit in targets: + ro_pulse = platform.create_qubit_readout_pulse(qubit, start=0) + sequence.add(ro_pulse) + sequence, ro_pulses[qubit] = allxy.add_gate_pair_pulses_to_sequence( + platform, + gates, + qubit, + sequence, + sequence_delay=delay_param + sequence.duration, + readout_delay=1000, + ) + + # execute the pulse sequence + results = platform.execute_pulse_sequence( + sequence, + ExecutionParameters( + nshots=params.nshots, + relaxation_time=params.relaxation_time, + averaging_mode=AveragingMode.CYCLIC, + ), + ) + + # retrieve the results for every qubit + for qubit in targets: + z_proj = 2 * results[ro_pulses[qubit].serial].probability(0) - 1 + # store the results + gate = "-".join(gates) + data.register_qubit( + allxy.AllXYType, + (qubit, delay_param), + dict(prob=np.array([z_proj]), gate=np.array([gate])), + ) + return data + + +def _fit(_data: AllXYDragData) -> AllXYDragResults: + """Post-processing for allXYDrag.""" + return AllXYDragResults() + + +def _plot(data: AllXYDragData, target: QubitId, fit: AllXYDragResults = None): + """Plotting function for allXYDrag.""" + + figures = [] + fitting_report = "" + + fig = go.Figure() + delay_params = data.delay_params + + for j, delay_param in enumerate(delay_params): + delay_param_data = data[target, delay_param] + fig.add_trace( + go.Scatter( + x=delay_param_data.gate, + y=delay_param_data.prob, + mode="markers+lines", + opacity=0.5, + name=f"Delay {delay_param}", + showlegend=True, + legendgroup=f"group{j}", + text=allxy.gatelist, + textposition="bottom center", + ), + ) + + fig.add_hline( + y=0, + line_width=2, + line_dash="dash", + line_color="grey", + ) + fig.add_hline( + y=1, + line_width=2, + line_dash="dash", + line_color="grey", + ) + + fig.add_hline( + y=-1, + line_width=2, + line_dash="dash", + line_color="grey", + ) + + fig.update_layout( + showlegend=True, + xaxis_title="Gate sequence number", + yaxis_title="Expectation value of Z", + ) + + figures.append(fig) + + return figures, fitting_report + + +allxy_resonator_depletion_tuning = Routine(_acquisition, _fit, _plot) +"""AllXYDrag Routine object.""" diff --git a/tests/runcards/protocols.yml b/tests/runcards/protocols.yml index b3b69a2cd..0d1358bb5 100644 --- a/tests/runcards/protocols.yml +++ b/tests/runcards/protocols.yml @@ -490,6 +490,13 @@ actions: unrolling: True nshots: 10 + - id: resonator_depletion_tuning + operation: allxy_resonator_depletion_tuning + parameters: + delay_start: 1000 + delay_end: 3000 + delay_step: 1000 + nshots: 10 - id: drag_pulse_tuning operation: drag_tuning From 8946a8476f6863470afcb9b3bd64225b8279fb3b Mon Sep 17 00:00:00 2001 From: Jacfomg Date: Fri, 3 May 2024 18:41:05 +0400 Subject: [PATCH 02/10] fix: timings --- src/qibocal/protocols/characterization/allxy/allxy.py | 9 ++++++--- .../allxy/allxy_resonator_depletion_tuning.py | 5 +++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/qibocal/protocols/characterization/allxy/allxy.py b/src/qibocal/protocols/characterization/allxy/allxy.py index 96123e286..b26214cde 100644 --- a/src/qibocal/protocols/characterization/allxy/allxy.py +++ b/src/qibocal/protocols/characterization/allxy/allxy.py @@ -141,8 +141,10 @@ def add_gate_pair_pulses_to_sequence( pulse_duration = platform.create_RX_pulse(qubit, start=0).duration # All gates have equal pulse duration - sequenceDuration = 0 - pulse_start = sequence_delay + sequenceDuration = sequence.duration + sequence_delay + pulse_start = sequence.duration + sequence_delay + + print("Pulse start: ", pulse_start) for gate in gates: if gate == "I": @@ -214,12 +216,13 @@ def add_gate_pair_pulses_to_sequence( sequence.add(RY90_pulse) sequenceDuration = sequenceDuration + pulse_duration - pulse_start = pulse_duration + pulse_start = sequence.duration # RO pulse starting just after pair of gates ro_pulse = platform.create_qubit_readout_pulse( qubit, start=sequenceDuration + 4 + readout_delay ) + sequence.add(ro_pulse) return sequence, ro_pulse diff --git a/src/qibocal/protocols/characterization/allxy/allxy_resonator_depletion_tuning.py b/src/qibocal/protocols/characterization/allxy/allxy_resonator_depletion_tuning.py index 9a7f33b4f..07cdeb1b8 100644 --- a/src/qibocal/protocols/characterization/allxy/allxy_resonator_depletion_tuning.py +++ b/src/qibocal/protocols/characterization/allxy/allxy_resonator_depletion_tuning.py @@ -81,10 +81,11 @@ def _acquisition( gates, qubit, sequence, - sequence_delay=delay_param + sequence.duration, - readout_delay=1000, + sequence_delay=delay_param, + readout_delay=996, # becuase we already add a +4 ) + print(sequence) # execute the pulse sequence results = platform.execute_pulse_sequence( sequence, From a1886691bfbce3faffb52aa784691640f8d3737f Mon Sep 17 00:00:00 2001 From: Jacfomg Date: Fri, 3 May 2024 18:47:19 +0400 Subject: [PATCH 03/10] fix: floats on the runcard --- tests/runcards/protocols.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/runcards/protocols.yml b/tests/runcards/protocols.yml index 0d1358bb5..172e522af 100644 --- a/tests/runcards/protocols.yml +++ b/tests/runcards/protocols.yml @@ -493,9 +493,9 @@ actions: - id: resonator_depletion_tuning operation: allxy_resonator_depletion_tuning parameters: - delay_start: 1000 - delay_end: 3000 - delay_step: 1000 + delay_start: 1000.0 + delay_end: 3000.0 + delay_step: 1000.0 nshots: 10 - id: drag_pulse_tuning From dabbe27665d5507e7a11db4c46cbe1a3cf89dcac Mon Sep 17 00:00:00 2001 From: Jacfomg Date: Mon, 6 May 2024 10:11:47 +0400 Subject: [PATCH 04/10] fix: float and int issue for the devices --- src/qibocal/protocols/characterization/allxy/allxy.py | 8 +++----- .../allxy/allxy_resonator_depletion_tuning.py | 7 ++++--- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/qibocal/protocols/characterization/allxy/allxy.py b/src/qibocal/protocols/characterization/allxy/allxy.py index b26214cde..7a95a6c66 100644 --- a/src/qibocal/protocols/characterization/allxy/allxy.py +++ b/src/qibocal/protocols/characterization/allxy/allxy.py @@ -141,11 +141,9 @@ def add_gate_pair_pulses_to_sequence( pulse_duration = platform.create_RX_pulse(qubit, start=0).duration # All gates have equal pulse duration - sequenceDuration = sequence.duration + sequence_delay + sequence_duration = sequence.duration + sequence_delay pulse_start = sequence.duration + sequence_delay - print("Pulse start: ", pulse_start) - for gate in gates: if gate == "I": # print("Transforming to sequence I gate") @@ -215,12 +213,12 @@ def add_gate_pair_pulses_to_sequence( ) sequence.add(RY90_pulse) - sequenceDuration = sequenceDuration + pulse_duration + sequence_duration = sequence_duration + pulse_duration pulse_start = sequence.duration # RO pulse starting just after pair of gates ro_pulse = platform.create_qubit_readout_pulse( - qubit, start=sequenceDuration + 4 + readout_delay + qubit, start=sequence_duration + 4 + readout_delay ) sequence.add(ro_pulse) diff --git a/src/qibocal/protocols/characterization/allxy/allxy_resonator_depletion_tuning.py b/src/qibocal/protocols/characterization/allxy/allxy_resonator_depletion_tuning.py index 07cdeb1b8..aac6fd8b4 100644 --- a/src/qibocal/protocols/characterization/allxy/allxy_resonator_depletion_tuning.py +++ b/src/qibocal/protocols/characterization/allxy/allxy_resonator_depletion_tuning.py @@ -81,11 +81,12 @@ def _acquisition( gates, qubit, sequence, - sequence_delay=delay_param, - readout_delay=996, # becuase we already add a +4 + sequence_delay=int( + delay_param + ), # We need conversion to int due to devices for now + readout_delay=996, # because we already add a +4 ) - print(sequence) # execute the pulse sequence results = platform.execute_pulse_sequence( sequence, From 1567c05fc269641c45e2838080b604415345ff76 Mon Sep 17 00:00:00 2001 From: Jacfomg Date: Mon, 6 May 2024 10:55:59 +0400 Subject: [PATCH 05/10] fix: With allxy working as well --- src/qibocal/protocols/characterization/allxy/allxy.py | 8 ++------ .../allxy/allxy_resonator_depletion_tuning.py | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/qibocal/protocols/characterization/allxy/allxy.py b/src/qibocal/protocols/characterization/allxy/allxy.py index 7a95a6c66..d11384070 100644 --- a/src/qibocal/protocols/characterization/allxy/allxy.py +++ b/src/qibocal/protocols/characterization/allxy/allxy.py @@ -89,7 +89,7 @@ def _acquisition( all_ro_pulses.append({}) for qubit in targets: sequences[-1], all_ro_pulses[-1][qubit] = add_gate_pair_pulses_to_sequence( - platform, gates, qubit, sequences[-1], params.beta_param + platform, gates, qubit, sequences[-1], beta_param=params.beta_param ) # execute the pulse sequence @@ -141,16 +141,15 @@ def add_gate_pair_pulses_to_sequence( pulse_duration = platform.create_RX_pulse(qubit, start=0).duration # All gates have equal pulse duration + print(sequence.duration, sequence_delay) sequence_duration = sequence.duration + sequence_delay pulse_start = sequence.duration + sequence_delay for gate in gates: if gate == "I": - # print("Transforming to sequence I gate") pass if gate == "Xp": - # print("Transforming to sequence Xp gate") if beta_param == None: RX_pulse = platform.create_RX_pulse( qubit, @@ -165,7 +164,6 @@ def add_gate_pair_pulses_to_sequence( sequence.add(RX_pulse) if gate == "X9": - # print("Transforming to sequence X9 gate") if beta_param == None: RX90_pulse = platform.create_RX90_pulse( qubit, @@ -180,7 +178,6 @@ def add_gate_pair_pulses_to_sequence( sequence.add(RX90_pulse) if gate == "Yp": - # print("Transforming to sequence Yp gate") if beta_param == None: RY_pulse = platform.create_RX_pulse( qubit, @@ -197,7 +194,6 @@ def add_gate_pair_pulses_to_sequence( sequence.add(RY_pulse) if gate == "Y9": - # print("Transforming to sequence Y9 gate") if beta_param == None: RY90_pulse = platform.create_RX90_pulse( qubit, diff --git a/src/qibocal/protocols/characterization/allxy/allxy_resonator_depletion_tuning.py b/src/qibocal/protocols/characterization/allxy/allxy_resonator_depletion_tuning.py index aac6fd8b4..72dd3f793 100644 --- a/src/qibocal/protocols/characterization/allxy/allxy_resonator_depletion_tuning.py +++ b/src/qibocal/protocols/characterization/allxy/allxy_resonator_depletion_tuning.py @@ -104,7 +104,7 @@ def _acquisition( gate = "-".join(gates) data.register_qubit( allxy.AllXYType, - (qubit, delay_param), + (qubit, float(delay_param)), dict(prob=np.array([z_proj]), gate=np.array([gate])), ) return data From ce6239f51127ff1edead726b446feffcb29b7aa5 Mon Sep 17 00:00:00 2001 From: Jacfomg Date: Mon, 6 May 2024 11:30:47 +0400 Subject: [PATCH 06/10] fix: timings allxy --- src/qibocal/protocols/characterization/allxy/allxy.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/qibocal/protocols/characterization/allxy/allxy.py b/src/qibocal/protocols/characterization/allxy/allxy.py index d11384070..729070f0d 100644 --- a/src/qibocal/protocols/characterization/allxy/allxy.py +++ b/src/qibocal/protocols/characterization/allxy/allxy.py @@ -141,9 +141,8 @@ def add_gate_pair_pulses_to_sequence( pulse_duration = platform.create_RX_pulse(qubit, start=0).duration # All gates have equal pulse duration - print(sequence.duration, sequence_delay) - sequence_duration = sequence.duration + sequence_delay - pulse_start = sequence.duration + sequence_delay + sequence_duration = sequence.get_qubit_pulses(qubit).duration + sequence_delay + pulse_start = sequence.get_qubit_pulses(qubit).duration + sequence_delay for gate in gates: if gate == "I": @@ -210,7 +209,7 @@ def add_gate_pair_pulses_to_sequence( sequence.add(RY90_pulse) sequence_duration = sequence_duration + pulse_duration - pulse_start = sequence.duration + pulse_start = sequence_duration # RO pulse starting just after pair of gates ro_pulse = platform.create_qubit_readout_pulse( From 31a670f61dfcda7b64f1ad4f3ede74696479f761 Mon Sep 17 00:00:00 2001 From: Jacfomg Date: Wed, 8 May 2024 11:38:07 +0400 Subject: [PATCH 07/10] fix: comments --- .../protocols/characterization/allxy/allxy.py | 2 +- .../allxy/allxy_resonator_depletion_tuning.py | 29 +++++++------------ 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/src/qibocal/protocols/characterization/allxy/allxy.py b/src/qibocal/protocols/characterization/allxy/allxy.py index 729070f0d..204d5763d 100644 --- a/src/qibocal/protocols/characterization/allxy/allxy.py +++ b/src/qibocal/protocols/characterization/allxy/allxy.py @@ -208,7 +208,7 @@ def add_gate_pair_pulses_to_sequence( ) sequence.add(RY90_pulse) - sequence_duration = sequence_duration + pulse_duration + sequence_duration += pulse_duration pulse_start = sequence_duration # RO pulse starting just after pair of gates diff --git a/src/qibocal/protocols/characterization/allxy/allxy_resonator_depletion_tuning.py b/src/qibocal/protocols/characterization/allxy/allxy_resonator_depletion_tuning.py index 72dd3f793..254bfd689 100644 --- a/src/qibocal/protocols/characterization/allxy/allxy_resonator_depletion_tuning.py +++ b/src/qibocal/protocols/characterization/allxy/allxy_resonator_depletion_tuning.py @@ -15,7 +15,7 @@ @dataclass -class AllXYDragParameters(Parameters): +class AllXYResonatorParameters(Parameters): """AllXYDrag runcard inputs.""" delay_start: float @@ -27,12 +27,12 @@ class AllXYDragParameters(Parameters): @dataclass -class AllXYDragResults(Results): +class AllXYResonatorResults(Results): """AllXYDrag outputs.""" @dataclass -class AllXYDragData(Data): +class AllXYResonatorData(Data): """AllXY acquisition outputs.""" delay_param: Optional[float] = None @@ -49,24 +49,17 @@ def delay_params(self): def _acquisition( - params: AllXYDragParameters, + params: AllXYResonatorParameters, platform: Platform, targets: list[QubitId], -) -> AllXYDragData: +) -> AllXYResonatorData: r""" - Data acquisition for allXY experiment varying delay after a measurement. - The AllXY experiment is a simple test of the calibration of single qubit gatesThe qubit (initialized in the |0> state) - is subjected to two back-to-back single-qubit gates and measured. In each round, we run 21 different gate pairs: - ideally, the first 5 return the qubit to |0>, the next 12 drive it to superposition state, and the last 4 put the - qubit in |1> state. - - The AllXY iteration method allows the user to execute iteratively the list of gates playing with the drag pulse shape - in order to find the optimal drag pulse coefficient for pi pulses. + Data acquisition for allXY experiment varying delay after a measurement to characterise resonator depletion time https://arxiv.org/pdf/1604.00916. """ - data = AllXYDragData() + data = AllXYResonatorData() - delays = np.arange(params.delay_start, params.delay_end, params.delay_step).round(4) + delays = np.arange(params.delay_start, params.delay_end, params.delay_step) # sweep the parameters for delay_param in delays: for gates in allxy.gatelist: @@ -110,12 +103,12 @@ def _acquisition( return data -def _fit(_data: AllXYDragData) -> AllXYDragResults: +def _fit(_data: AllXYResonatorData) -> AllXYResonatorResults: """Post-processing for allXYDrag.""" - return AllXYDragResults() + return AllXYResonatorResults() -def _plot(data: AllXYDragData, target: QubitId, fit: AllXYDragResults = None): +def _plot(data: AllXYResonatorData, target: QubitId, fit: AllXYResonatorResults = None): """Plotting function for allXYDrag.""" figures = [] From 80f6266ad3d47f539fb7ea644dae7fb8f08dceb0 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 8 May 2024 07:39:41 +0000 Subject: [PATCH 08/10] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/qibocal/protocols/characterization/__init__.py | 2 +- tests/runcards/protocols.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qibocal/protocols/characterization/__init__.py b/src/qibocal/protocols/characterization/__init__.py index 480197122..9444d02c6 100644 --- a/src/qibocal/protocols/characterization/__init__.py +++ b/src/qibocal/protocols/characterization/__init__.py @@ -1,8 +1,8 @@ from enum import Enum from .allxy.allxy import allxy -from .allxy.allxy_resonator_depletion_tuning import allxy_resonator_depletion_tuning from .allxy.allxy_drag_pulse_tuning import allxy_drag_pulse_tuning +from .allxy.allxy_resonator_depletion_tuning import allxy_resonator_depletion_tuning from .classification import single_shot_classification from .coherence.spin_echo import spin_echo from .coherence.spin_echo_signal import spin_echo_signal diff --git a/tests/runcards/protocols.yml b/tests/runcards/protocols.yml index 0a2b5e4d5..c8ce1faff 100644 --- a/tests/runcards/protocols.yml +++ b/tests/runcards/protocols.yml @@ -498,7 +498,7 @@ actions: delay_step: 1000.0 nshots: 10 - + - id: allXY drag operation: allxy_drag_pulse_tuning parameters: From 0982ca8355a1a3ef9dd98a7958a1664d904759f0 Mon Sep 17 00:00:00 2001 From: Jacfomg Date: Wed, 8 May 2024 13:04:24 +0400 Subject: [PATCH 09/10] fix: remove old +4 --- src/qibocal/protocols/characterization/allxy/allxy.py | 2 +- .../characterization/allxy/allxy_resonator_depletion_tuning.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qibocal/protocols/characterization/allxy/allxy.py b/src/qibocal/protocols/characterization/allxy/allxy.py index 204d5763d..3c52b4f72 100644 --- a/src/qibocal/protocols/characterization/allxy/allxy.py +++ b/src/qibocal/protocols/characterization/allxy/allxy.py @@ -213,7 +213,7 @@ def add_gate_pair_pulses_to_sequence( # RO pulse starting just after pair of gates ro_pulse = platform.create_qubit_readout_pulse( - qubit, start=sequence_duration + 4 + readout_delay + qubit, start=sequence_duration + readout_delay ) sequence.add(ro_pulse) diff --git a/src/qibocal/protocols/characterization/allxy/allxy_resonator_depletion_tuning.py b/src/qibocal/protocols/characterization/allxy/allxy_resonator_depletion_tuning.py index 254bfd689..ce64f998b 100644 --- a/src/qibocal/protocols/characterization/allxy/allxy_resonator_depletion_tuning.py +++ b/src/qibocal/protocols/characterization/allxy/allxy_resonator_depletion_tuning.py @@ -77,7 +77,7 @@ def _acquisition( sequence_delay=int( delay_param ), # We need conversion to int due to devices for now - readout_delay=996, # because we already add a +4 + readout_delay=1000, ) # execute the pulse sequence From 7c165eb653905ea886ca5d0f67e9644dc9d0a89f Mon Sep 17 00:00:00 2001 From: Jacfomg Date: Thu, 9 May 2024 12:49:21 +0400 Subject: [PATCH 10/10] fix: DOCS !!! --- .../allxy/allxy_resonator_depletion_tuning.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/qibocal/protocols/characterization/allxy/allxy_resonator_depletion_tuning.py b/src/qibocal/protocols/characterization/allxy/allxy_resonator_depletion_tuning.py index ce64f998b..6807ab993 100644 --- a/src/qibocal/protocols/characterization/allxy/allxy_resonator_depletion_tuning.py +++ b/src/qibocal/protocols/characterization/allxy/allxy_resonator_depletion_tuning.py @@ -54,7 +54,11 @@ def _acquisition( targets: list[QubitId], ) -> AllXYResonatorData: r""" - Data acquisition for allXY experiment varying delay after a measurement to characterise resonator depletion time https://arxiv.org/pdf/1604.00916. + Data acquisition for allXY experiment varying delay after a measurement pulse to characterise resonator depletion time: https://arxiv.org/pdf/1604.00916. + Passive resonator depletion time: Time it takes the process by which photons inside a resonator dissipate over time without any external intervention. + After a measurement is performed, photons remain in the resonator and qubits errors induced if trying to drive the qubit by leftover photons due to the coupling + resonator-qubit inducing a shift in the qubit frequency. This experiment is used to characterise the resonator depletion time by waiting an increased delay time + until the allXY pattern looks right. """ data = AllXYResonatorData()