diff --git a/src/qibolab/instruments/qm/config.py b/src/qibolab/instruments/qm/config.py index 430ea13175..d8626ec9af 100644 --- a/src/qibolab/instruments/qm/config.py +++ b/src/qibolab/instruments/qm/config.py @@ -341,19 +341,27 @@ def register_integration_weights(self, qubit, readout_len): readout_len (int): Duration of the readout pulse in ns. """ angle = 0 + cos, sin = np.cos(angle), np.sin(angle) + if qubit.kernel is None: + convert = lambda x: [(x, readout_len)] + else: + cos = qubit.kernel * cos + sin = qubit.kernel * sin + convert = lambda x: x + self.integration_weights.update( { f"cosine_weights{qubit.name}": { - "cosine": [(np.cos(angle), readout_len)], - "sine": [(-np.sin(angle), readout_len)], + "cosine": convert(cos), + "sine": convert(-sin), }, f"sine_weights{qubit.name}": { - "cosine": [(np.sin(angle), readout_len)], - "sine": [(np.cos(angle), readout_len)], + "cosine": convert(sin), + "sine": convert(cos), }, f"minus_sine_weights{qubit.name}": { - "cosine": [(-np.sin(angle), readout_len)], - "sine": [(-np.cos(angle), readout_len)], + "cosine": convert(-sin), + "sine": convert(-cos), }, } ) diff --git a/src/qibolab/instruments/qm/controller.py b/src/qibolab/instruments/qm/controller.py index 97b5bb9c1d..d85abc0426 100644 --- a/src/qibolab/instruments/qm/controller.py +++ b/src/qibolab/instruments/qm/controller.py @@ -128,7 +128,7 @@ class QMController(Controller): """Smearing used for hardware signal integration.""" calibration_path: Optional[str] = None """Path to the JSON file that contains the mixer calibration.""" - script_file_name: Optional[str] = "qua_script.py" + script_file_name: Optional[str] = None """Name of the file that the QUA program will dumped in that after every execution.