qiboteam / qibolab

Quantum hardware module and drivers for Qibo.
https://qibo.science
Apache License 2.0
40 stars 10 forks source link

Drag pulse not working on QM #844

Closed andrea-pasquale closed 3 months ago

andrea-pasquale commented 3 months ago

I'm facing some issues while playing with drag pulses on QM. I'm currently testing https://github.com/qiboteam/qibocal#689 with #835.

Here is the error message:

2024-03-20 08:33:31,828 - qm - INFO     - Starting session: c5d200e3-3226-45c9-a291-1f2825f23800
[Qibo 0.2.4|INFO|2024-03-20 08:33:32]: Loading platform qw5q_platinum
[Qibo 0.2.4|INFO|2024-03-20 08:33:32]: Using qibolab (qw5q_platinum) backend on /CPU:0
[Qibo 0.2.4|INFO|2024-03-20 08:33:32]: Loading platform qw5q_platinum
[Qibo 0.2.4|INFO|2024-03-20 08:33:32]: Using qibolab (qw5q_platinum) backend on /CPU:0
[Qibocal 0.0.8|WARNING|2024-03-20 08:33:32]: Deleting previous directory test_drag_platinum.
[Qibocal 0.0.8|INFO|2024-03-20 08:33:32]: Creating directory test_drag_platinum.
[Qibo 0.2.4|INFO|2024-03-20 08:33:32]: Connecting to instrument QMController(name='qm', address='192.168.0.101:80', opxs={'con2': OPXplus(name='con2', outputs=PortsDefaultdict(<function OPXplus.__post_init__.<locals>.<lambda> at 0x7faf02831f30>, {5: OPXOutput(device='con2', number=5, offset=0.0, filter={}), 6: OPXOutput(device='con2', number=6, offset=0.0, filter={}), 3: OPXOutput(device='con2', number=3, offset=0.0, filter={}), 4: OPXOutput(device='con2', number=4, offset=0.0, filter={}), 1: OPXOutput(device='con2', number=1, offset=0.0, filter={}), 2: OPXOutput(device='con2', number=2, offset=0.0, filter={}), 7: OPXOutput(device='con2', number=7, offset=0.0, filter={}), 8: OPXOutput(device='con2', number=8, offset=0.0, filter={}), 9: OPXOutput(device='con2', number=9, offset=0.0, filter={}), 10: OPXOutput(device='con2', number=10, offset=0.0, filter={})}), inputs=PortsDefaultdict(<function OPXplus.__post_init__.<locals>.<lambda> at 0x7faf02831fc0>, {})), 'con3': OPXplus(name='con3', outputs=PortsDefaultdict(<function OPXplus.__post_init__.<locals>.<lambda> at 0x7faf02832050>, {1: OPXOutput(device='con3', number=1, offset=0.0, filter={}), 2: OPXOutput(device='con3', number=2, offset=0.0, filter={})}), inputs=PortsDefaultdict(<function OPXplus.__post_init__.<locals>.<lambda> at 0x7faf028320e0>, {1: OPXInput(device='con3', number=1, offset=0.0, gain=10), 2: OPXInput(device='con3', number=2, offset=0.0, gain=10)})), 'con4': OPXplus(name='con4', outputs=PortsDefaultdict(<function OPXplus.__post_init__.<locals>.<lambda> at 0x7faf02832170>, {1: OPXOutput(device='con4', number=1, offset=0.299, filter={}), 2: OPXOutput(device='con4', number=2, offset=-0.25, filter={}), 3: OPXOutput(device='con4', number=3, offset=0.27, filter={}), 4: OPXOutput(device='con4', number=4, offset=0.294, filter={'feedforward': [1.0684635881381783, -1.0163217174522334], 'feedback': [0.947858129314055]}), 5: OPXOutput(device='con4', number=5, offset=-0.49, filter={})}), inputs=PortsDefaultdict(<function OPXplus.__post_init__.<locals>.<lambda> at 0x7faf02832200>, {}))}, octaves={'octave2': Octave(name='octave2', outputs=PortsDefaultdict(<function Octave.__post_init__.<locals>.<lambda> at 0x7faf02832290>, {3: OctaveOutput(device='octave2', number=3, lo_frequency=4500000000.0, gain=-10, lo_source='internal', output_mode='always_on', opx_port=OPXIQ(i=OPXOutput(device='con2', number=5, offset=0.0, filter={}), q=OPXOutput(device='con2', number=6, offset=0.0, filter={}))), 2: OctaveOutput(device='octave2', number=2, lo_frequency=4500000000.0, gain=-10, lo_source='internal', output_mode='always_on', opx_port=OPXIQ(i=OPXOutput(device='con2', number=3, offset=0.0, filter={}), q=OPXOutput(device='con2', number=4, offset=0.0, filter={}))), 1: OctaveOutput(device='octave2', number=1, lo_frequency=5800000000.0, gain=20, lo_source='internal', output_mode='always_on', opx_port=OPXIQ(i=OPXOutput(device='con2', number=1, offset=0.0, filter={}), q=OPXOutput(device='con2', number=2, offset=0.0, filter={}))), 4: OctaveOutput(device='octave2', number=4, lo_frequency=6500000000.0, gain=-10, lo_source='internal', output_mode='always_on', opx_port=OPXIQ(i=OPXOutput(device='con2', number=7, offset=0.0, filter={}), q=OPXOutput(device='con2', number=8, offset=0.0, filter={}))), 5: OctaveOutput(device='octave2', number=5, lo_frequency=6500000000.0, gain=-10, lo_source='internal', output_mode='always_on', opx_port=OPXIQ(i=OPXOutput(device='con2', number=9, offset=0.0, filter={}), q=OPXOutput(device='con2', number=10, offset=0.0, filter={})))}), inputs=PortsDefaultdict(<function Octave.__post_init__.<locals>.<lambda> at 0x7faf02832320>, {}), port=101, connectivity=OPXplus(name='con2', outputs=PortsDefaultdict(<function OPXplus.__post_init__.<locals>.<lambda> at 0x7faf02831f30>, {5: OPXOutput(device='con2', number=5, offset=0.0, filter={}), 6: OPXOutput(device='con2', number=6, offset=0.0, filter={}), 3: OPXOutput(device='con2', number=3, offset=0.0, filter={}), 4: OPXOutput(device='con2', number=4, offset=0.0, filter={}), 1: OPXOutput(device='con2', number=1, offset=0.0, filter={}), 2: OPXOutput(device='con2', number=2, offset=0.0, filter={}), 7: OPXOutput(device='con2', number=7, offset=0.0, filter={}), 8: OPXOutput(device='con2', number=8, offset=0.0, filter={}), 9: OPXOutput(device='con2', number=9, offset=0.0, filter={}), 10: OPXOutput(device='con2', number=10, offset=0.0, filter={})}), inputs=PortsDefaultdict(<function OPXplus.__post_init__.<locals>.<lambda> at 0x7faf02831fc0>, {}))), 'octave3': Octave(name='octave3', outputs=PortsDefaultdict(<function Octave.__post_init__.<locals>.<lambda> at 0x7faf028323b0>, {1: OctaveOutput(device='octave3', number=1, lo_frequency=7550000000, gain=-20, lo_source='internal', output_mode='always_on', opx_port=OPXIQ(i=OPXOutput(device='con3', number=1, offset=0.0, filter={}), q=OPXOutput(device='con3', number=2, offset=0.0, filter={})))}), inputs=PortsDefaultdict(<function Octave.__post_init__.<locals>.<lambda> at 0x7faf02832440>, {1: OctaveInput(device='octave3', number=1, lo_frequency=7550000000, lo_source='internal', IF_mode_I='direct', IF_mode_Q='direct', opx_port=OPXIQ(i=OPXInput(device='con3', number=1, offset=0.0, gain=10), q=OPXInput(device='con3', number=2, offset=0.0, gain=10)))}), port=102, connectivity=OPXplus(name='con3', outputs=PortsDefaultdict(<function OPXplus.__post_init__.<locals>.<lambda> at 0x7faf02832050>, {1: OPXOutput(device='con3', number=1, offset=0.0, filter={}), 2: OPXOutput(device='con3', number=2, offset=0.0, filter={})}), inputs=PortsDefaultdict(<function OPXplus.__post_init__.<locals>.<lambda> at 0x7faf028320e0>, {1: OPXInput(device='con3', number=1, offset=0.0, gain=10), 2: OPXInput(device='con3', number=2, offset=0.0, gain=10)})))}, time_of_flight=224, smearing=0, calibration_path=PosixPath('/home/users/andrea.pasquale/qibolab_platforms_qrc/qw5q_platinum'), script_file_name=None, manager=None, config=QMConfig(version=1, controllers={}, octaves={}, elements={}, pulses={}, waveforms={}, digital_waveforms={'ON': {'samples': [(1, 0)]}}, integration_weights={}, mixers={}), is_connected=False, simulation_duration=None, cloud=False).
/nfs/users/andrea.pasquale/default/lib/python3.10/site-packages/qm/quantum_machines_manager.py:102: DeprecationWarning: QMM was opened with OctaveConfig. Please note that from QOP2.4.0 the octave devices are managed by the cluster setting in the QM-app. It is recommended to remove the OctaveConfig from the QMM instantiation.
  warnings.warn(
2024-03-20 08:33:32,529 - qm - INFO     - Performing health check
2024-03-20 08:33:32,547 - qm - WARNING  - Health check warning: Inter-OPX connectivity issues in OPX: con1. Missing ports are: 12, 11, 10, 9. See QM-App for more info.
2024-03-20 08:33:32,547 - qm - WARNING  - Health check warning: Inter-OPX connectivity issues in OPX: con2. Missing ports are: 12, 11, 10, 9. See QM-App for more info.
2024-03-20 08:33:32,547 - qm - WARNING  - Health check warning: Inter-OPX connectivity issues in OPX: con3. Missing ports are: 12, 11, 10, 9. See QM-App for more info.
2024-03-20 08:33:32,547 - qm - WARNING  - Health check warning: Inter-OPX connectivity issues in OPX: con4. Missing ports are: 12, 11, 10, 9. See QM-App for more info.
2024-03-20 08:33:32,548 - qm - WARNING  - Health check warning: Inter-OPX connectivity issues in OPX: con5. Missing ports are: 12, 11, 10, 9. See QM-App for more info.
2024-03-20 08:33:32,548 - qm - WARNING  - Health check warning: Inter-OPX connectivity issues in OPX: con6. Missing ports are: 12, 11, 10, 9. See QM-App for more info.
2024-03-20 08:33:32,548 - qm - WARNING  - Health check warning: Inter-OPX connectivity issues in OPX: con7. Missing ports are: 12, 11, 10, 9. See QM-App for more info.
2024-03-20 08:33:32,548 - qm - WARNING  - Health check warning: Inter-OPX connectivity issues in OPX: con8. Missing ports are: 12, 11, 10, 9. See QM-App for more info.
2024-03-20 08:33:32,548 - qm - WARNING  - Health check warning: Inter-OPX connectivity issues in OPX: con9. Missing ports are: 12, 11, 10, 9. See QM-App for more info.
2024-03-20 08:33:32,548 - qm - INFO     - Health check passed
[Qibo 0.2.4|INFO|2024-03-20 08:33:32]: Connecting to instrument <qibolab.instruments.rohde_schwarz.SGS100A object at 0x7faf02668250>.
[Qibo 0.2.4|INFO|2024-03-20 08:33:32]: Connecting to instrument OPXplus(name='con2', outputs=PortsDefaultdict(<function OPXplus.__post_init__.<locals>.<lambda> at 0x7faf02831f30>, {5: OPXOutput(device='con2', number=5, offset=0.0, filter={}), 6: OPXOutput(device='con2', number=6, offset=0.0, filter={}), 3: OPXOutput(device='con2', number=3, offset=0.0, filter={}), 4: OPXOutput(device='con2', number=4, offset=0.0, filter={}), 1: OPXOutput(device='con2', number=1, offset=0.0, filter={}), 2: OPXOutput(device='con2', number=2, offset=0.0, filter={}), 7: OPXOutput(device='con2', number=7, offset=0.0, filter={}), 8: OPXOutput(device='con2', number=8, offset=0.0, filter={}), 9: OPXOutput(device='con2', number=9, offset=0.0, filter={}), 10: OPXOutput(device='con2', number=10, offset=0.0, filter={})}), inputs=PortsDefaultdict(<function OPXplus.__post_init__.<locals>.<lambda> at 0x7faf02831fc0>, {})).
[Qibo 0.2.4|INFO|2024-03-20 08:33:32]: Connecting to instrument OPXplus(name='con3', outputs=PortsDefaultdict(<function OPXplus.__post_init__.<locals>.<lambda> at 0x7faf02832050>, {1: OPXOutput(device='con3', number=1, offset=0.0, filter={}), 2: OPXOutput(device='con3', number=2, offset=0.0, filter={})}), inputs=PortsDefaultdict(<function OPXplus.__post_init__.<locals>.<lambda> at 0x7faf028320e0>, {1: OPXInput(device='con3', number=1, offset=0.0, gain=10), 2: OPXInput(device='con3', number=2, offset=0.0, gain=10)})).
[Qibo 0.2.4|INFO|2024-03-20 08:33:32]: Connecting to instrument OPXplus(name='con4', outputs=PortsDefaultdict(<function OPXplus.__post_init__.<locals>.<lambda> at 0x7faf02832170>, {1: OPXOutput(device='con4', number=1, offset=0.299, filter={}), 2: OPXOutput(device='con4', number=2, offset=-0.25, filter={}), 3: OPXOutput(device='con4', number=3, offset=0.27, filter={}), 4: OPXOutput(device='con4', number=4, offset=0.294, filter={'feedforward': [1.0684635881381783, -1.0163217174522334], 'feedback': [0.947858129314055]}), 5: OPXOutput(device='con4', number=5, offset=-0.49, filter={})}), inputs=PortsDefaultdict(<function OPXplus.__post_init__.<locals>.<lambda> at 0x7faf02832200>, {})).
[Qibo 0.2.4|INFO|2024-03-20 08:33:32]: Connecting to instrument Octave(name='octave2', outputs=PortsDefaultdict(<function Octave.__post_init__.<locals>.<lambda> at 0x7faf02832290>, {3: OctaveOutput(device='octave2', number=3, lo_frequency=4500000000.0, gain=-10, lo_source='internal', output_mode='always_on', opx_port=OPXIQ(i=OPXOutput(device='con2', number=5, offset=0.0, filter={}), q=OPXOutput(device='con2', number=6, offset=0.0, filter={}))), 2: OctaveOutput(device='octave2', number=2, lo_frequency=4500000000.0, gain=-10, lo_source='internal', output_mode='always_on', opx_port=OPXIQ(i=OPXOutput(device='con2', number=3, offset=0.0, filter={}), q=OPXOutput(device='con2', number=4, offset=0.0, filter={}))), 1: OctaveOutput(device='octave2', number=1, lo_frequency=5800000000.0, gain=20, lo_source='internal', output_mode='always_on', opx_port=OPXIQ(i=OPXOutput(device='con2', number=1, offset=0.0, filter={}), q=OPXOutput(device='con2', number=2, offset=0.0, filter={}))), 4: OctaveOutput(device='octave2', number=4, lo_frequency=6500000000.0, gain=-10, lo_source='internal', output_mode='always_on', opx_port=OPXIQ(i=OPXOutput(device='con2', number=7, offset=0.0, filter={}), q=OPXOutput(device='con2', number=8, offset=0.0, filter={}))), 5: OctaveOutput(device='octave2', number=5, lo_frequency=6500000000.0, gain=-10, lo_source='internal', output_mode='always_on', opx_port=OPXIQ(i=OPXOutput(device='con2', number=9, offset=0.0, filter={}), q=OPXOutput(device='con2', number=10, offset=0.0, filter={})))}), inputs=PortsDefaultdict(<function Octave.__post_init__.<locals>.<lambda> at 0x7faf02832320>, {}), port=101, connectivity=OPXplus(name='con2', outputs=PortsDefaultdict(<function OPXplus.__post_init__.<locals>.<lambda> at 0x7faf02831f30>, {5: OPXOutput(device='con2', number=5, offset=0.0, filter={}), 6: OPXOutput(device='con2', number=6, offset=0.0, filter={}), 3: OPXOutput(device='con2', number=3, offset=0.0, filter={}), 4: OPXOutput(device='con2', number=4, offset=0.0, filter={}), 1: OPXOutput(device='con2', number=1, offset=0.0, filter={}), 2: OPXOutput(device='con2', number=2, offset=0.0, filter={}), 7: OPXOutput(device='con2', number=7, offset=0.0, filter={}), 8: OPXOutput(device='con2', number=8, offset=0.0, filter={}), 9: OPXOutput(device='con2', number=9, offset=0.0, filter={}), 10: OPXOutput(device='con2', number=10, offset=0.0, filter={})}), inputs=PortsDefaultdict(<function OPXplus.__post_init__.<locals>.<lambda> at 0x7faf02831fc0>, {}))).
[Qibo 0.2.4|INFO|2024-03-20 08:33:32]: Connecting to instrument Octave(name='octave3', outputs=PortsDefaultdict(<function Octave.__post_init__.<locals>.<lambda> at 0x7faf028323b0>, {1: OctaveOutput(device='octave3', number=1, lo_frequency=7550000000, gain=-20, lo_source='internal', output_mode='always_on', opx_port=OPXIQ(i=OPXOutput(device='con3', number=1, offset=0.0, filter={}), q=OPXOutput(device='con3', number=2, offset=0.0, filter={})))}), inputs=PortsDefaultdict(<function Octave.__post_init__.<locals>.<lambda> at 0x7faf02832440>, {1: OctaveInput(device='octave3', number=1, lo_frequency=7550000000, lo_source='internal', IF_mode_I='direct', IF_mode_Q='direct', opx_port=OPXIQ(i=OPXInput(device='con3', number=1, offset=0.0, gain=10), q=OPXInput(device='con3', number=2, offset=0.0, gain=10)))}), port=102, connectivity=OPXplus(name='con3', outputs=PortsDefaultdict(<function OPXplus.__post_init__.<locals>.<lambda> at 0x7faf02832050>, {1: OPXOutput(device='con3', number=1, offset=0.0, filter={}), 2: OPXOutput(device='con3', number=2, offset=0.0, filter={})}), inputs=PortsDefaultdict(<function OPXplus.__post_init__.<locals>.<lambda> at 0x7faf028320e0>, {1: OPXInput(device='con3', number=1, offset=0.0, gain=10), 2: OPXInput(device='con3', number=2, offset=0.0, gain=10)}))).
[Qibocal 0.0.8|INFO|2024-03-20 08:33:32]: Executing mode autocalibration on drag_pulse_tuning iteration 0.
[Qibo 0.2.4|INFO|2024-03-20 08:33:32]: Minimal execution time (sequence): 1.21556992
Connected to: Rohde&Schwarz SGS100A (serial:1416.0505k02/113301, firmware:4.2.366.0-5.00.232.70) in 0.19s
2024-03-20 08:33:33,942 - qm - INFO     - Octave "octave2" Health check passed, current temperature 59
2024-03-20 08:33:35,216 - qm - INFO     - Octave "octave3" Health check passed, current temperature 56
Traceback (most recent call last):
  File "/nfs/users/andrea.pasquale/default/bin/qq", line 8, in <module>
    sys.exit(command())
  File "/nfs/users/andrea.pasquale/default/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/nfs/users/andrea.pasquale/default/lib/python3.10/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/nfs/users/andrea.pasquale/default/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/nfs/users/andrea.pasquale/default/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/nfs/users/andrea.pasquale/default/lib/python3.10/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/nfs/users/andrea.pasquale/qibocal/src/qibocal/cli/_base.py", line 72, in auto
    autocalibrate(runcard, folder, force, update)
  File "/nfs/users/andrea.pasquale/qibocal/src/qibocal/cli/autocalibration.py", line 56, in autocalibrate
    for _ in executor.run(mode=ExecutionMode.autocalibration):
  File "/nfs/users/andrea.pasquale/qibocal/src/qibocal/auto/execute.py", line 142, in run
    completed = task.run(
  File "/nfs/users/andrea.pasquale/qibocal/src/qibocal/auto/task.py", line 124, in run
    completed.data, completed.data_time = operation.acquisition(
  File "/nfs/users/andrea.pasquale/qibocal/src/qibocal/auto/operation.py", line 41, in wrapper
    out = func(*args, **kwds)
  File "/nfs/users/andrea.pasquale/qibocal/src/qibocal/protocols/characterization/drag.py", line 101, in _acquisition
    result = platform.execute_pulse_sequence(
  File "/nfs/users/andrea.pasquale/qibolab/src/qibolab/platform.py", line 196, in execute_pulse_sequence
    return self._execute(sequence, options, **kwargs)
  File "/nfs/users/andrea.pasquale/qibolab/src/qibolab/platform.py", line 170, in _execute
    new_result = instrument.play(
  File "/nfs/users/andrea.pasquale/qibolab/src/qibolab/instruments/qm/controller.py", line 330, in play
    return self.sweep(qubits, couplers, sequence, options)
  File "/nfs/users/andrea.pasquale/qibolab/src/qibolab/instruments/qm/controller.py", line 377, in sweep
    result = self.execute_program(experiment)
  File "/nfs/users/andrea.pasquale/qibolab/src/qibolab/instruments/qm/controller.py", line 263, in execute_program
    machine = self.manager.open_qm(self.config.__dict__)
  File "/nfs/users/andrea.pasquale/default/lib/python3.10/site-packages/qm/quantum_machines_manager.py", line 264, in open_qm
    self._octave_manager.set_octaves_from_qua_config(loaded_config.v1_beta.octaves)
  File "/nfs/users/andrea.pasquale/default/lib/python3.10/site-packages/qm/octave/octave_manager.py", line 476, in set_octaves_from_qua_config
    output_client.set_output(output_mode)
  File "/nfs/users/andrea.pasquale/default/lib/python3.10/site-packages/octave_sdk/octave.py", line 940, in set_output
    self._set_default_if_needed(crb)
  File "/nfs/users/andrea.pasquale/default/lib/python3.10/site-packages/octave_sdk/octave.py", line 917, in _set_default_if_needed
    up_conv_state = self._get_current_state()
  File "/nfs/users/andrea.pasquale/default/lib/python3.10/site-packages/octave_sdk/octave.py", line 783, in _get_current_state
    up_conv_state = response.rf_up_conv
  File "/nfs/users/andrea.pasquale/default/lib/python3.10/site-packages/betterproto/__init__.py", line 698, in __getattribute__
    value = super().__getattribute__(name)
AttributeError: 'AquireResponse' object has no attribute 'rf_up_conv'

I was testing qibocal with this runcard:

targets: [2]

actions:

  - id: drag_pulse_tuning
    priority: 0
    operation: drag_pulse_tuning
    parameters:
      beta_start: -0.4
      beta_end: 0.4
      beta_step: 0.01
Edoardo-Pedicillo commented 3 months ago

I am getting the same error running the rb

- id: standard rb
  operation: standard_rb
  parameters:
     depths: [1,5,10,15,20]
     niter: 15
     nshots: 10000