Skip to content

Feat/linspace measurements reversed registers divisor #901

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 97 commits into
base: master
Choose a base branch
from

Conversation

Nomos11
Copy link
Collaborator

@Nomos11 Nomos11 commented Jul 1, 2025

just to see how experimental branch differs

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move to root examples directory

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move to root examples directory

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reconsidered and remembered I did not put them there for a reason. The idea is that SimpleExpressions are more like context sensitive numbers than expressions.

Copy link
Collaborator Author

@Nomos11 Nomos11 Jul 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only needed to move them due to some circular import otherwise i believe. The name might indeed be misleading

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should move most program specific stuff out of here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good

parsed.extend(t.transformations)
else:
parsed.append(t)
self._transformations = tuple(parsed)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use chain_transformations or Transformation.chain instead. Or is there a reason you can't?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I vaguely remember contemplating to do that or attempting to do that, but uncertain if it did not work for some reason or I just forgot to try it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will resolve this by adding documentation that you should not construct ChainedTransformation directly

"""

def _hash_only_subset(self, channel_subset: Set[ChannelID]) -> int:
"""Return a hash value of this Comparable object."""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

???

Copy link
Collaborator Author

@Nomos11 Nomos11 Jul 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this was to further optimize waveform deduplication; i.e. try to reuse waveform data already sampled for one channel for another one. Otherwise the comparison included the channel name which prevented reusage across channels I believe.

The performance increase was minimal and noticeable only in specifically constructed examples, which means it is probably unnecessary




class WaveformCollection():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also was for the "nested stepping", to have a collection of waveforms in a nested structure at hand that would be iterated over with the command table indices



class AtomicTimeReversalPulseTemplate(AtomicPulseTemplate):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still required?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure; i vaguely remember @maxbeer99 requesting some time reversal features for the T-junction and this was somehow the easiest way to do it, but I'd need to look into the usecase again

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ths was probably before the to_single_waveform kwarg was introduced

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There may have been some other reason i need to think about again

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no valid reason comes to my mind now so this can probably be discarded

@shumpohl
Copy link
Member

shumpohl commented Jul 1, 2025

My estimate is that the changes that are not directly in linspace.py are roughly a day of work to incorporate into the master branch. Those are:

  • The examples (move to hdawg driver)
  • Treating simple expression as a proper expression somehow
    • move to expression (trivial)
    • Transformation changes. Here we need to evaluate transformations that contain hardware dependent exprssions. Right now these are by default assumed to be the neutral element of the corresponding operation. The programbuilder is responsible for enusring that this assumption does not brek the program. However this code breaks if the TransformingWaveform is nested.
  • Waveform changes (need to understand reasoning and motivation)
  • pad_all_atomic_subtemplates_to -> add map_subtemplates function
  • ...

@Nomos11
Copy link
Collaborator Author

Nomos11 commented Jul 25, 2025

So as a checkbox list of what the main branch should support:

  • DynamicLinearValue with new methods if deemed sufficiently logical; including abs, eq, gt, lt, hash
  • the linspace-program-specific adaptions that on this branch live in awgs/base.py
  • alazar.py channel is None convenience
  • program.defined_channels or similar in hwardware/setup.py instead of iterator over Loop -> some changes in loop.py required
  • Albeit hacky on this branch, some way to selectively downsample waveforms by powers of 2 - this can probably not be outsourced to qupules_hdawg. Needed coordination between packages here
  • plotting deduplication Plotting constant deduplication #903
  • some of the "features" for the supposedly to be outsourced linspacebuilder (->HDAWGBuilder on qupulse_hdawg or so) in the protocol definition in program/init.py?
  • handling of moving this linspacebuilder to qupulse_hdawg for now while ensuring compatibility -> most of the small additions in other files here and there had some usage in there
  • Transformation chain clarification; contains_sweepval property
  • waveforms _to_time_type->_to_hardware_time
  • WaveformCollection feature in one way or another
  • pad all atomic subtemplates
  • padding automatically creating atomic pt by default (here the SingleWFTimeExtensionPulseTemplate)
  • handle pt.create_program hacks currently living in this method
  • checked_is_close
  • linspace.ResolutionDependentValue (rounding increment commands to bit-values to avoid drift in nD-scans) could actually be included in qupulse if appropriate tests are there
  • all integration-tests with the example_checker working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants