Include time_of_flight in Readout duration - #1433
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1433 +/- ##
==========================================
+ Coverage 37.36% 37.39% +0.02%
==========================================
Files 114 114
Lines 5724 5731 +7
==========================================
+ Hits 2139 2143 +4
- Misses 3585 3588 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
alecandido
reviewed
Apr 16, 2026
alecandido
left a comment
Member
There was a problem hiding this comment.
I like this PR so much that I reviewed even the tests :P
Just a minor comment, but practically good to go!
… delays with juxtapose
without including other_channels in self.align(self.channels | other_channels), pulses on different channels would be played simultaneously despite the pipe operation, e.g. q0.RX90() | q0.MZ() would play MZ and RX90 simultaneously. This commit also introuduces a test for the pipe operation
RoyStegeman
force-pushed
the
fix_tof_handling
branch
from
April 17, 2026 06:17
5b0ea40 to
cc96cae
Compare
RoyStegeman
marked this pull request as ready for review
April 17, 2026 06:51
alecandido
approved these changes
Apr 17, 2026
scarrazza
approved these changes
Apr 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When piping multiple sequences, the pipe operation considers the durations of the pulses played on each channel, and if they are not all the same, it appends delays to the shorter channels to ensure they all have an equal length. However, the time of flight was neglected in the determination of the duration of
Readout. This means that the timings would be miscalculated and the mismatch would accumulate for each additional sequence.In this PR we include a
time_of_flightattribute inReadoutand sum it to the duration of the acquisition pulse to obtain the total duration of the readout.Because we may still wish to define a sequence before knowing the time of flight, we change the pipe operation
|=ofPulseSequenceto use the symbolicAlignas opposed to calculating an exact delay at the time of constructing the sequences. This way the time of flight can be updated later (the default value is 0.0), and the exact delays can be calculated by calling thealign_to_delays()method.Finally, we introduce a test to test the new pipe behavior.