Open csookim opened 1 month ago
I believe this is duplicating #921
(it's because you're running on the iqm5q
chip, attached to Qblox - you should try with qw5q_platinum
or qw11q
, which are respectively powered by Zurich and QM)
I also got this error. Is there a problem with my code?
[Qibo 0.2.11|INFO|2024-08-13 10:54:23]: Loading platform /nfs/tools/qibolab_platforms_qrc/qw5q_platinum
[Qibo 0.2.11|INFO|2024-08-13 10:54:23]: Using qibolab (/nfs/tools/qibolab_platforms_qrc/qw5q_platinum) backend on /CPU:0
[Qibo 0.2.11|INFO|2024-08-13 10:54:23]: Connecting to instrument <qibolab.instruments.zhinst.executor.Zurich object at 0x7c7b2026c460>.
Before unrolling:
q0: ─H─x─
q1: ───|─
q2: ───x─
After unrolling:
q0: ─Z─GPI2─o─Z─GPI2─Z─Z─GPI2─o────────
q1: ────────|────────|────────|────────
q2: ─Z─GPI2─Z─Z─GPI2─o─Z─GPI2─Z─Z─GPI2─
[2024.08.13 10:54:23.919] INFO Logging initialized from [Default inline config in laboneq.laboneq_logging] logdir is /nfs/users/changsoo.kim/laboneq_output/log
[2024.08.13 10:54:23.920] INFO VERSION: laboneq 2.25.0
[2024.08.13 10:54:23.920] INFO Connecting to data server at localhost:8004
[2024.08.13 10:54:23.940] INFO Connected to Zurich Instruments LabOne Data Server version 24.01 at localhost:8004
[2024.08.13 10:54:24.101] WARNING HDAWG:dev8660: Include the device options 'HDAWG8/' in the device setup ('options' field of the 'instruments' list in the device setup descriptor). This will become a strict requirement in the future.
[2024.08.13 10:54:24.629] WARNING SHFQC/QA:dev12146: Include the device options 'SHFQC/QC6CH' in the device setup ('options' field of the 'instruments' list in the device setup descriptor). This will become a strict requirement in the future.
[2024.08.13 10:54:25.963] INFO Configuring the device setup
[2024.08.13 10:54:26.067] INFO The device setup is configured
[Qibo 0.2.11|INFO|2024-08-13 10:54:26]: Connecting to instrument <qibolab.instruments.dummy.DummyLocalOscillator object at 0x7c7b2026c7f0>.
[Qibo 0.2.11|INFO|2024-08-13 10:54:26]: Connecting to instrument <qibolab.instruments.dummy.DummyLocalOscillator object at 0x7c7b2026e800>.
[Qibo 0.2.11|INFO|2024-08-13 10:54:26]: Connecting to instrument <qibolab.instruments.rohde_schwarz.SGS100A object at 0x7c7b2026e380>.
[Qibo 0.2.11|INFO|2024-08-13 10:54:26]: Connecting to instrument <qibolab.instruments.dummy.DummyLocalOscillator object at 0x7c7b2026e8c0>.
[Qibo 0.2.11|INFO|2024-08-13 10:54:26]: Connecting to instrument <qibolab.instruments.dummy.DummyLocalOscillator object at 0x7c7b2026e110>.
[Qibo 0.2.11|INFO|2024-08-13 10:54:26]: Minimal execution time (sequence): 0.0400237
Connected to: Rohde&Schwarz SGS100A (serial:1416.0505k02/113301, firmware:4.2.366.0-5.00.232.70) in 0.24s
Traceback (most recent call last):
File "/nfs/users/changsoo.kim/test.py", line 19, in <module>
results = transpiled_circuit(nshots=100)
File "/nfs/tools/qibo/lib/python3.10/site-packages/qibo/models/circuit.py", line 1113, in __call__
return self.execute(initial_state=initial_state, nshots=nshots)
File "/nfs/tools/qibo/lib/python3.10/site-packages/qibo/models/circuit.py", line 1109, in execute
return GlobalBackend().execute_circuit(self, initial_state, nshots)
File "/nfs/tools/qibo/lib/python3.10/site-packages/qibolab/backends.py", line 105, in execute_circuit
readout = self.platform.execute_pulse_sequence(
File "/nfs/tools/qibo/lib/python3.10/site-packages/qibolab/platform/platform.py", line 196, in execute_pulse_sequence
return self._execute(sequence, options, **kwargs)
File "/nfs/tools/qibo/lib/python3.10/site-packages/qibolab/platform/platform.py", line 170, in _execute
new_result = instrument.play(
File "/nfs/tools/qibo/lib/python3.10/site-packages/qibolab/instruments/zhinst/executor.py", line 395, in play
return self.sweep(qubits, couplers, sequence, options)
File "/nfs/tools/qibo/lib/python3.10/site-packages/qibolab/instruments/zhinst/executor.py", line 716, in sweep
self.experiment_flow(qubits, couplers, sequence, options)
File "/nfs/tools/qibo/lib/python3.10/site-packages/qibolab/instruments/zhinst/executor.py", line 386, in experiment_flow
self.sub_sequences, self.unsplit_channels = self.create_sub_sequences(
File "/nfs/tools/qibo/lib/python3.10/site-packages/qibolab/instruments/zhinst/executor.py", line 356, in create_sub_sequences
start, _ = measurement_start_end[measurement_index]
KeyError: 0
I also got this error. Is there a problem with my code?
Not necessarily. The two problems are unrelated to each other. Before you were not able to pass the compiler, since there was a problem with the natives. Now the problem seems related to measurements: the Zurich driver seems to expect at least one measurement, and there are none in your circuit. Assuming I interpreted correctly, I guess the error could be improved (and raised earlier).
In any case, Qibolab is not that stable, and mainly supporting calibration. Sharp edges for circuit execution should be expected (even because it doesn't depend only on Qibolab, but even on the platforms' definition and calibration itself - which is much work-in-progress).
Try to add measurements to your circuit, and check whether you could receive any result. Do not expect to reproduce simulation, especially if 2-qubit gates are involved. But you should receive some shots.
Btw: you suspected an issue, and that was correct. However, if you're unsure about what is happening, and you'd like to ask for some support, discussions are better place. Though they are currently disabled. Could we open them for Qibolab as well? @scarrazza
Sure, I have just enabled it.
Thanks, @alecandido. I got the result after adding the measurements.
@stavros11 in principle, we should have failed right after compilation
https://github.com/qiboteam/qibolab/blob/4f1459444a88666bad3b360dd728b0b88fa9c366/src/qibolab/backends.py#L100-L108
as soon as we know the measurement_map
, and we know it's empty. Not inside compilation, because it would not be modular (it may still be useful to compile a circuit without measurements, e.g. for testing).
If you agree, I would open a dedicated issue, and close this one, since it's not very specific (and the Qblox issue is already documented, as discussed before).
I tried running the following code using Slurm:
However, I got this error: