Skip to content

Commit

Permalink
feat: Add readout constructor from probe pulse
Browse files Browse the repository at this point in the history
  • Loading branch information
alecandido committed Aug 23, 2024
1 parent 9ff37e4 commit a6a115e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/qibolab/pulses/pulse.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,14 @@ class Readout(_PulseLike):
acquisition: Acquisition
probe: Pulse

@classmethod
def from_probe(cls, probe: Pulse):
"""Create a whole readout operation from its probe pulse.
The acquisition is made to match the same probe duration.
"""
return cls(acquisition=Acquisition(duration=probe.duration), probe=probe)

@property
def duration(self) -> float:
"""Duration in ns."""
Expand Down

0 comments on commit a6a115e

Please sign in to comment.