Skip to content

Commit

Permalink
fix: add gates on proper qubit
Browse files Browse the repository at this point in the history
  • Loading branch information
stavros11 committed Dec 10, 2024
1 parent b20becd commit a0dff03
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/qibolab/instruments/simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ def pulse_to_gate(
phase = pulse.relative_phase
pulse.relative_phase = 0
if is_equal(pulse, natives.RX.pulse(start=0)):
return gates.GPI(0, phi=phase)
return gates.GPI(qubit, phi=phase)
if is_equal(pulse, natives.RX90.pulse(start=0)):
return gates.GPI2(0, phi=phase)
return gates.GPI2(qubit, phi=phase)
raise ValueError(f"Unsupported pulse: {pulse}")


Expand Down Expand Up @@ -102,7 +102,7 @@ def _sequence_to_gates(sequence: PulseSequence, qubits, two_qubit_natives, qubit

for qubit in gate.qubits:
if pulse.start < clock[qubit]:
raise ValueError("Overlapping pulses.")
raise ValueError(f"Overlapping pulses in sequence:\n{sequence}")
clock[qubit] = pulse.start + pulse.duration

all_gates.append(gate)
Expand Down

0 comments on commit a0dff03

Please sign in to comment.