From 4bdfa08369d0c4014ca9f9214c8b0035047d3106 Mon Sep 17 00:00:00 2001 From: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Thu, 17 Oct 2024 14:22:14 +0400 Subject: [PATCH] chore: compatibility with OPX1000 --- src/qibocal/protocols/qua/rb_ondevice.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/qibocal/protocols/qua/rb_ondevice.py b/src/qibocal/protocols/qua/rb_ondevice.py index 14b40673f..ecb4fad66 100644 --- a/src/qibocal/protocols/qua/rb_ondevice.py +++ b/src/qibocal/protocols/qua/rb_ondevice.py @@ -8,7 +8,7 @@ import numpy.typing as npt from qibolab.platform import Platform from qibolab.qubits import QubitId -from qm import generate_qua_script +from qm import CompilerOptionArguments, generate_qua_script from qm.qua import * # nopycln: import from qualang_tools.bakery.randomized_benchmark_c1 import c1_table from qualang_tools.results import fetching_tool @@ -241,6 +241,11 @@ def _acquisition( if save_sequences: sequence_st = declare_stream() + # force offset setting due to bug in QOP320 + for qb in platform.qubits.values(): + if qb.flux is not None: + set_dc_offset(qb.flux.name, "single", qb.sweetspot) + with for_( m, 0, m < num_of_sequences, m + 1 ): # QUA for_ loop over the random sequences @@ -377,13 +382,16 @@ def _acquisition( # Open the quantum machine config = generate_config(platform, list(platform.qubits.keys())) qm = qmm.open_qm(config) - # Send the QUA program to the OPX, which compiles and executes it - job = qm.execute(rb) if params.debug: with open("qua_script.py", "w") as file: file.write(generate_qua_script(rb, config)) + # Send the QUA program to the OPX, which compiles and executes it + job = qm.execute( + rb, compiler_options=CompilerOptionArguments(flags=["not-strict-timing"]) + ) + # Get results from QUA program if state_discrimination: results = fetching_tool(job, data_list=["state_avg", "iteration"], mode="live")