Skip to content

Commit

Permalink
Merge pull request #655 from qiboteam/fix_couplers_rfsoc
Browse files Browse the repository at this point in the history
Fix problems with RFSoC driver after adding couplers
  • Loading branch information
andrea-pasquale authored Nov 9, 2023
2 parents 2452631 + f7d2a68 commit 1a2f031
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/qibolab/instruments/rfsoc/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ def classify_shots(
def play_sequence_in_sweep_recursion(
self,
qubits: dict[int, Qubit],
couplers: dict[int, Coupler],
sequence: PulseSequence,
or_sequence: PulseSequence,
execution_parameters: ExecutionParameters,
Expand All @@ -230,7 +231,7 @@ def play_sequence_in_sweep_recursion(
Odd indexes correspond to readout pulses serials and are convert
to match the original sequence (of the sweep) and not the one just executed.
"""
res = self.play(qubits, sequence, execution_parameters)
res = self.play(qubits, couplers, sequence, execution_parameters)
newres = {}
serials = [pulse.serial for pulse in or_sequence.ro_pulses]
for idx, key in enumerate(res):
Expand All @@ -244,6 +245,7 @@ def play_sequence_in_sweep_recursion(
def recursive_python_sweep(
self,
qubits: dict[int, Qubit],
couplers: dict[int, Coupler],
sequence: PulseSequence,
or_sequence: PulseSequence,
*sweepers: rfsoc.Sweeper,
Expand Down Expand Up @@ -273,7 +275,7 @@ def recursive_python_sweep(
# Last layer for recursion.

if len(sweepers) == 0:
return self.play_sequence_in_sweep_recursion(qubits, sequence, or_sequence, execution_parameters)
return self.play_sequence_in_sweep_recursion(qubits, couplers, sequence, or_sequence, execution_parameters)

if not self.get_if_python_sweep(sequence, *sweepers):
toti, totq = self._execute_sweeps(sequence, qubits, sweepers)
Expand Down Expand Up @@ -309,7 +311,7 @@ def recursive_python_sweep(
sequence[kdx].start_delay = values[jdx][idx]

res = self.recursive_python_sweep(
qubits, sequence, or_sequence, *sweepers[1:], execution_parameters=execution_parameters
qubits, couplers, sequence, or_sequence, *sweepers[1:], execution_parameters=execution_parameters
)
results = self.merge_sweep_results(results, res)
return results # already in the right format
Expand Down Expand Up @@ -474,6 +476,7 @@ def sweep(

results = self.recursive_python_sweep(
qubits,
couplers,
sweepsequence,
sequence.ro_pulses,
*rfsoc_sweepers,
Expand Down

0 comments on commit 1a2f031

Please sign in to comment.