Skip to content

Commit

Permalink
chore: simplify QM acquisition
Browse files Browse the repository at this point in the history
  • Loading branch information
stavros11 committed Sep 3, 2024
1 parent 6bc3080 commit 7b9d16c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/qibolab/instruments/qm/program/acquisition.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
def _collect(i, q, npulses):
"""Collect I and Q components of signal."""
signal = np.stack([i, q])
return np.moveaxis(signal, 0, -1 - int(self.npulses > 1))
return np.moveaxis(signal, 0, -1 - int(npulses > 1))


def _split(data, npulses):
Expand Down Expand Up @@ -114,7 +114,7 @@ def fetch(self, handles):
qres = handles.get(f"{self.name}_Q").fetch_all()
# convert raw ADC signal to volts
u = unit()
signal = _collect(u.raw2volts(ires), u.raw2volts(qres), npulses)
signal = _collect(u.raw2volts(ires), u.raw2volts(qres), self.npulses)
return _split(signal, self.npulses)


Expand Down Expand Up @@ -165,7 +165,7 @@ def download(self, *dimensions):
def fetch(self, handles):
ires = handles.get(f"{self.name}_I").fetch_all()
qres = handles.get(f"{self.name}_Q").fetch_all()
signal = _collect(i, q, self.npulses)
signal = _collect(ires, qres, self.npulses)
return _split(signal, self.npulses)


Expand Down

0 comments on commit 7b9d16c

Please sign in to comment.