From 8f4c4e2f68bf2fb2903f89759a43ccef3a8457c3 Mon Sep 17 00:00:00 2001 From: Andrea Date: Thu, 5 Sep 2024 17:54:35 +0400 Subject: [PATCH 1/5] refactor: Update calibration runcards to latest version --- .../calibration_tutorial/classification.yaml | 4 +- runcards/calibration_tutorial/ef.yml | 13 ++++++ runcards/calibration_tutorial/flipping.yaml | 11 +++++ .../qubit_flux_dependence.yaml | 43 +++++++++++++----- .../qubit_spectroscopy.yaml | 37 ++++++++++++--- runcards/calibration_tutorial/rabi.yaml | 45 ++++++++++++++----- runcards/calibration_tutorial/ramsey.yaml | 24 +++++++--- runcards/calibration_tutorial/rb.yaml | 10 ++--- .../readout_optimization.yaml | 20 +++++++++ .../resonator_punchout.yaml | 14 +++--- .../resonator_spectroscopy_high.yaml | 11 +++-- .../resonator_spectroscopy_low.yaml | 15 ++++--- runcards/calibration_tutorial/t1.yaml | 8 ++-- runcards/calibration_tutorial/validation.yaml | 28 ++++++++++++ src/qibocal/protocols/rabi/length_signal.py | 2 +- src/qibocal/protocols/ramsey/ramsey.py | 2 +- 16 files changed, 222 insertions(+), 65 deletions(-) create mode 100644 runcards/calibration_tutorial/ef.yml create mode 100644 runcards/calibration_tutorial/flipping.yaml create mode 100644 runcards/calibration_tutorial/readout_optimization.yaml create mode 100644 runcards/calibration_tutorial/validation.yaml diff --git a/runcards/calibration_tutorial/classification.yaml b/runcards/calibration_tutorial/classification.yaml index c76a4ff6d..b6d423651 100644 --- a/runcards/calibration_tutorial/classification.yaml +++ b/runcards/calibration_tutorial/classification.yaml @@ -1,6 +1,6 @@ -platform: +platform: qw11q -qubits: [0] +targets: [D1] actions: - id: single shot classification 1 diff --git a/runcards/calibration_tutorial/ef.yml b/runcards/calibration_tutorial/ef.yml new file mode 100644 index 000000000..c419a1947 --- /dev/null +++ b/runcards/calibration_tutorial/ef.yml @@ -0,0 +1,13 @@ +targets: [D4] + +actions: + - id: qubit spectroscopy + + operation: qubit_spectroscopy_ef + parameters: + drive_amplitude: 0.09 + drive_duration: 4000 + freq_width: 20_000_000 + freq_step: 100_000 + nshots: 1024 + relaxation_time: 50_000 diff --git a/runcards/calibration_tutorial/flipping.yaml b/runcards/calibration_tutorial/flipping.yaml new file mode 100644 index 000000000..e6c283e4b --- /dev/null +++ b/runcards/calibration_tutorial/flipping.yaml @@ -0,0 +1,11 @@ +platform: qw11q + +targets: [D1] + +actions: + - id: flipping + + operation: flipping + parameters: + nflips_max: 20 + nflips_step: 1 diff --git a/runcards/calibration_tutorial/qubit_flux_dependence.yaml b/runcards/calibration_tutorial/qubit_flux_dependence.yaml index 0f6efa560..0150d00a6 100644 --- a/runcards/calibration_tutorial/qubit_flux_dependence.yaml +++ b/runcards/calibration_tutorial/qubit_flux_dependence.yaml @@ -1,16 +1,39 @@ -platform: +platform: qw11q -qubits: [0] +targets: [D1] actions: - - id: qubit flux dependence - operation: qubit_flux + - id: resonator_spectroscopy high power + operation: resonator_spectroscopy parameters: - freq_width: 100_000_000 - freq_step: 500_000 - bias_width: 0.20 - bias_step: 0.01 - drive_amplitude: 0.1 + freq_width: 10_000_000 + freq_step: 100_000 + amplitude: 0.002 + fit_function: s21 + power_level: high nshots: 1024 - relaxation_time: 20_000 + relaxation_time: 100000 + + # - id: qubit flux dependence + + # operation: qubit_flux + # parameters: + # bias_step: 0.002 + # bias_width: 0.1 + # drive_amplitude: 0.001 + # drive_duration: 4000 + # freq_step: 500000 + # freq_width: 10000000 + # nshots: 1024 + # relaxation_time: 20_000 + + - id: resonator flux dependence + operation: resonator_flux + parameters: + bias_step: 0.05 + bias_width: 0.5 + freq_step: 100_000 + freq_width: 10_000_000 + nshots: 1024 + relaxation_time: 20000 diff --git a/runcards/calibration_tutorial/qubit_spectroscopy.yaml b/runcards/calibration_tutorial/qubit_spectroscopy.yaml index 560194553..0b7c4bb38 100644 --- a/runcards/calibration_tutorial/qubit_spectroscopy.yaml +++ b/runcards/calibration_tutorial/qubit_spectroscopy.yaml @@ -1,14 +1,41 @@ -platform: +platform: qw11q -qubits: [0] +targets: [D1] actions: + + - id: resonator_spectroscopy high power + operation: resonator_spectroscopy + parameters: + freq_width: 10_000_000 + freq_step: 100_000 + amplitude: 0.002 + fit_function: s21 + power_level: high + nshots: 1024 + relaxation_time: 100000 + + # - id: qubit spectroscopy 01 + + # operation: qubit_spectroscopy + # parameters: + # drive_amplitude: 0.01 + # drive_duration: 4000 + # freq_width: 100_000_000 + # freq_step: 100_000 + # nshots: 1024 + # relaxation_time: 5000 + + - id: qubit spectroscopy 01 - operation: qubit_spectroscopy + operation: qubit_power_spectroscopy parameters: - drive_amplitude: 0.5 - drive_duration: 4000 + amplitude: 0.01 + min_amp_factor: 0.1 + max_amp_factor: 2 + step_amp_factor: 0.1 + duration: 4000 freq_width: 100_000_000 freq_step: 100_000 nshots: 1024 diff --git a/runcards/calibration_tutorial/rabi.yaml b/runcards/calibration_tutorial/rabi.yaml index e7ef947fd..0263e824c 100644 --- a/runcards/calibration_tutorial/rabi.yaml +++ b/runcards/calibration_tutorial/rabi.yaml @@ -1,16 +1,39 @@ -platform: +platform: qw11q -qubits: [0] +targets: [D1] actions: - - id: rabi + # - id: resonator_spectroscopy high power + # operation: resonator_spectroscopy + # parameters: + # freq_width: 10_000_000 + # freq_step: 100_000 + # amplitude: 0.002 + # fit_function: s21 + # power_level: high + # nshots: 1024 + # relaxation_time: 100000 - operation: rabi_amplitude_signal - parameters: - min_amp_factor: 0 - max_amp_factor: 1.1 - step_amp_factor: 0.1 - pulse_length: 40 - relaxation_time: 100_000 - nshots: 1024 + # - id: rabi + + # operation: rabi_amplitude_signal + # parameters: + # min_amp_factor: 0 + # max_amp_factor: 2 + # step_amp_factor: 0.1 + # pulse_length: 40 + # relaxation_time: 100_000 + # nshots: 1024 + + + # - id: rabi + + # operation: rabi_length_signal + # parameters: + # pulse_duration_start: 20 + # pulse_duration_end: 40 + # pulse_duration_step: 1 + # pulse_amplitude: 0.06 + # relaxation_time: 100_000 + # nshots: 1024 diff --git a/runcards/calibration_tutorial/ramsey.yaml b/runcards/calibration_tutorial/ramsey.yaml index d22ac2fb9..5b2494027 100644 --- a/runcards/calibration_tutorial/ramsey.yaml +++ b/runcards/calibration_tutorial/ramsey.yaml @@ -1,15 +1,27 @@ -platform: +platform: qw11q -qubits: [0] +targets: [D1] actions: - id: ramsey detuned operation: ramsey parameters: - delay_between_pulses_end: 40000 - delay_between_pulses_start: 100 + delay_between_pulses_end: 1000 + delay_between_pulses_start: 10 + delay_between_pulses_step: 20 + detuning: 3_000_000 + nshots: 1024 + relaxation_time: 200000 + + + - id: t2 + + operation: t2 + parameters: + delay_between_pulses_end: 50_000 + delay_between_pulses_start: 10 delay_between_pulses_step: 1000 - n_osc: 0 - nshots: 4096 + # detuning: 3_000_000 + nshots: 1024 relaxation_time: 200000 diff --git a/runcards/calibration_tutorial/rb.yaml b/runcards/calibration_tutorial/rb.yaml index 87a38da5b..35bbd15b8 100644 --- a/runcards/calibration_tutorial/rb.yaml +++ b/runcards/calibration_tutorial/rb.yaml @@ -1,11 +1,11 @@ -platform: +platform: qw11q -qubits: [0] +targets: [D1] actions: - id: standard rb operation: standard_rb parameters: - depths: [10, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500] - niter: 256 - nshots: 128 + depths: [1, 5, 10, 20] + niter: 20 + nshots: 100 diff --git a/runcards/calibration_tutorial/readout_optimization.yaml b/runcards/calibration_tutorial/readout_optimization.yaml new file mode 100644 index 000000000..fa35c94ac --- /dev/null +++ b/runcards/calibration_tutorial/readout_optimization.yaml @@ -0,0 +1,20 @@ +platform: qw11q + +targets: [D1] + +actions: + # - id: dispersive_shift + + # operation: dispersive_shift + # parameters: + # freq_width: 10_000_000 + # freq_step: 100_000 + + + - id: resonator_amplitude + + operation: resonator_amplitude + parameters: + amplitude_step: 0.0005 + amplitude_start: 0.001 + amplitude_stop: 0.005 diff --git a/runcards/calibration_tutorial/resonator_punchout.yaml b/runcards/calibration_tutorial/resonator_punchout.yaml index e5aa8744f..eea540224 100644 --- a/runcards/calibration_tutorial/resonator_punchout.yaml +++ b/runcards/calibration_tutorial/resonator_punchout.yaml @@ -1,17 +1,17 @@ -platform: +platform: qw11q -qubits: [0] +targets: [D1] actions: - id: resonator punchout operation: resonator_punchout parameters: - freq_width: 40_000_000 - freq_step: 500_000 - amplitude: 0.03 + freq_width: 10_000_000 + freq_step: 100_000 + amplitude: 0.05 min_amp_factor: 0.1 - max_amp_factor: 2.4 - step_amp_factor: 0.3 + max_amp_factor: 1 + step_amp_factor: 0.01 nshots: 2048 relaxation_time: 5000 diff --git a/runcards/calibration_tutorial/resonator_spectroscopy_high.yaml b/runcards/calibration_tutorial/resonator_spectroscopy_high.yaml index 41ee955c2..9df5cdc3a 100644 --- a/runcards/calibration_tutorial/resonator_spectroscopy_high.yaml +++ b/runcards/calibration_tutorial/resonator_spectroscopy_high.yaml @@ -1,16 +1,15 @@ -platform: +platform: qw11q -qubits: [0] +targets: [D1] actions: - id: resonator_spectroscopy high power - operation: resonator_spectroscopy parameters: - freq_width: 60_000_000 - freq_step: 200_000 - amplitude: 0.6 + freq_width: 10_000_000 + freq_step: 100_000 + amplitude: 0.2 power_level: high nshots: 1024 relaxation_time: 100000 diff --git a/runcards/calibration_tutorial/resonator_spectroscopy_low.yaml b/runcards/calibration_tutorial/resonator_spectroscopy_low.yaml index 81191db95..80007c91c 100644 --- a/runcards/calibration_tutorial/resonator_spectroscopy_low.yaml +++ b/runcards/calibration_tutorial/resonator_spectroscopy_low.yaml @@ -1,15 +1,16 @@ -platform: +platform: qw11q -qubits: [0] +targets: [D1] actions: - - id: resonator_spectroscopy low power + - id: resonator_spectroscopy high power operation: resonator_spectroscopy parameters: - freq_width: 60_000_000 - freq_step: 200_000 - amplitude: 0.03 - power_level: low + freq_width: 10_000_000 + freq_step: 100_000 + amplitude: 0.009 + fit_function: s21 + power_level: high nshots: 1024 relaxation_time: 100000 diff --git a/runcards/calibration_tutorial/t1.yaml b/runcards/calibration_tutorial/t1.yaml index dac797604..d7bb94327 100644 --- a/runcards/calibration_tutorial/t1.yaml +++ b/runcards/calibration_tutorial/t1.yaml @@ -1,6 +1,6 @@ -platform: +platform: qw11q -qubits: [0] +targets: [D1] actions: @@ -8,8 +8,8 @@ actions: operation: t1 parameters: - delay_before_readout_end: 200000 - delay_before_readout_start: 50 + delay_before_readout_end: 100_000 + delay_before_readout_start: 10 delay_before_readout_step: 1000 nshots: 1024 relaxation_time: 300000 diff --git a/runcards/calibration_tutorial/validation.yaml b/runcards/calibration_tutorial/validation.yaml new file mode 100644 index 000000000..fe3541e89 --- /dev/null +++ b/runcards/calibration_tutorial/validation.yaml @@ -0,0 +1,28 @@ +platform: qw11q + +targets: [D1] + +actions: + # - id: all_xy + + # operation: allxy + # parameters: + # nshots: 1024 + # relaxation_time: 200000 + + + # - id: state_tomography + + # operation: state_tomography + # parameters: + # nshots: 1024 + # relaxation_time: 200000 + + + - id: readout + + operation: readout_characterization + parameters: + nshots: 5000 + delay: 1000 + relaxation_time: 200000 diff --git a/src/qibocal/protocols/rabi/length_signal.py b/src/qibocal/protocols/rabi/length_signal.py index 51513ca0f..80de6aefe 100644 --- a/src/qibocal/protocols/rabi/length_signal.py +++ b/src/qibocal/protocols/rabi/length_signal.py @@ -85,7 +85,7 @@ def _acquisition( [qd_pulses[qubit] for qubit in targets], type=SweeperType.ABSOLUTE, ) - + print(sweeper) data = RabiLengthSignalData(amplitudes=amplitudes) # execute the sweep diff --git a/src/qibocal/protocols/ramsey/ramsey.py b/src/qibocal/protocols/ramsey/ramsey.py index f85244e77..cf33eb2f7 100644 --- a/src/qibocal/protocols/ramsey/ramsey.py +++ b/src/qibocal/protocols/ramsey/ramsey.py @@ -307,7 +307,7 @@ def _plot(data: RamseyData, target: QubitId, fit: RamseyResults = None): fig.update_layout( showlegend=True, xaxis_title="Time [ns]", - yaxis_title="Excited state probability", + yaxis_title="Ground state probability", ) figures.append(fig) From f708c5cae5dcec6715562b4ec45f3ba8cd2b0b13 Mon Sep 17 00:00:00 2001 From: Andrea Date: Thu, 5 Sep 2024 21:35:25 +0400 Subject: [PATCH 2/5] feat: update calibration runcards --- .../calibration_tutorial/resonator_spectroscopy_low.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/runcards/calibration_tutorial/resonator_spectroscopy_low.yaml b/runcards/calibration_tutorial/resonator_spectroscopy_low.yaml index 80007c91c..60b679fb1 100644 --- a/runcards/calibration_tutorial/resonator_spectroscopy_low.yaml +++ b/runcards/calibration_tutorial/resonator_spectroscopy_low.yaml @@ -7,9 +7,9 @@ actions: - id: resonator_spectroscopy high power operation: resonator_spectroscopy parameters: - freq_width: 10_000_000 - freq_step: 100_000 - amplitude: 0.009 + freq_width: 8_000_000 + freq_step: 50_000 + amplitude: 0.001 fit_function: s21 power_level: high nshots: 1024 From 8a7b972717b53c73920ddb294eadb415b924a94e Mon Sep 17 00:00:00 2001 From: Andrea Date: Sun, 8 Sep 2024 13:36:07 +0400 Subject: [PATCH 3/5] refactor: Update runcards --- .../calibration_tutorial/qubit_spectroscopy.yaml | 4 ++-- runcards/calibration_tutorial/rabi.yaml | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/runcards/calibration_tutorial/qubit_spectroscopy.yaml b/runcards/calibration_tutorial/qubit_spectroscopy.yaml index 0b7c4bb38..e92ff4df7 100644 --- a/runcards/calibration_tutorial/qubit_spectroscopy.yaml +++ b/runcards/calibration_tutorial/qubit_spectroscopy.yaml @@ -36,7 +36,7 @@ actions: max_amp_factor: 2 step_amp_factor: 0.1 duration: 4000 - freq_width: 100_000_000 - freq_step: 100_000 + freq_width: 300_000_000 + freq_step: 500_000 nshots: 1024 relaxation_time: 5000 diff --git a/runcards/calibration_tutorial/rabi.yaml b/runcards/calibration_tutorial/rabi.yaml index 0263e824c..c4f24962d 100644 --- a/runcards/calibration_tutorial/rabi.yaml +++ b/runcards/calibration_tutorial/rabi.yaml @@ -37,3 +37,15 @@ actions: # pulse_amplitude: 0.06 # relaxation_time: 100_000 # nshots: 1024 + + - id: rabi amplitude frequency + operation: rabi_amplitude_frequency_signal + parameters: + min_amp_factor: 0.0 + max_amp_factor: 2 + step_amp_factor: 0.1 + min_freq: -50_000_000 + max_freq: 50_000_000 + step_freq: 1_000_000 + pulse_length: 40 + nshots: 1024 From 3912c430af7359405175f37435cba487a3545619 Mon Sep 17 00:00:00 2001 From: Andrea Date: Sun, 8 Sep 2024 13:38:47 +0400 Subject: [PATCH 4/5] fix: Minor fix in tomography plot --- src/qibocal/protocols/state_tomography.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qibocal/protocols/state_tomography.py b/src/qibocal/protocols/state_tomography.py index 21411ef61..6094de710 100644 --- a/src/qibocal/protocols/state_tomography.py +++ b/src/qibocal/protocols/state_tomography.py @@ -278,7 +278,10 @@ def plot_reconstruction(ideal, measured): ) tickvals = list(range(len(ideal))) - ticktext = ["{:02b}".format(i) for i in tickvals] + if len(tickvals) == 2: # single qubit tomography + ticktext = ["{:01b}".format(i) for i in tickvals] + else: # two qubit tomography + ticktext = ["{:02b}".format(i) for i in tickvals] fig.update_scenes( xaxis=dict(tickvals=tickvals, ticktext=ticktext), yaxis=dict(tickvals=tickvals, ticktext=ticktext), From 2cac34a6e43e2c9c4ac2e9c072b7db70583bf11e Mon Sep 17 00:00:00 2001 From: Andrea Pasquale Date: Mon, 16 Sep 2024 14:42:20 +0400 Subject: [PATCH 5/5] style: remove print statement Co-authored-by: Edoardo Pedicillo --- src/qibocal/protocols/rabi/length_signal.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/qibocal/protocols/rabi/length_signal.py b/src/qibocal/protocols/rabi/length_signal.py index 80de6aefe..fc139197d 100644 --- a/src/qibocal/protocols/rabi/length_signal.py +++ b/src/qibocal/protocols/rabi/length_signal.py @@ -85,7 +85,6 @@ def _acquisition( [qd_pulses[qubit] for qubit in targets], type=SweeperType.ABSOLUTE, ) - print(sweeper) data = RabiLengthSignalData(amplitudes=amplitudes) # execute the sweep