Skip to content
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

Add support for time dependent expressions in transformations. #704

Merged
merged 17 commits into from
Dec 5, 2022

Conversation

shumpohl
Copy link
Member

@shumpohl shumpohl commented Nov 18, 2022

The original idea was to enable time dependent expressions for arithmetic pulse templates. However this will not produce reasonable results when the other PT is not atomic because the waveform i.e. the transformation will not get the correct time during sampling of a composite PT.

One could circumvent this by adding a time delay for SequencePT and ForLoopPT but if there is a RepetitionPT it cannot be handled correctly because the waveform itself is not actually repeated i.e. it needs to be unrolled.

We could adapt the Program type to be more powerful and cover the representation of a modulated or otherwise altered sub-program. This could allow efficient playback on supporting hardware.

The current solution is to enforce atomicity via the newly added _is_atomic method.

  • Remove composite PT support
  • Add transformation unit tests
  • Update docstring

Examples will be added in a separate PR.

Enables time dependent expressions for arithmetic pulse templates.
@github-actions
Copy link

github-actions bot commented Nov 18, 2022

Test Results

       6 files         6 suites   6m 25s ⏱️
1 207 tests 1 154 ✔️   53 💤 0
7 242 runs  6 916 ✔️ 326 💤 0

Results for commit 309ac1a.

♻️ This comment has been updated with latest results.

@shumpohl shumpohl mentioned this pull request Dec 5, 2022
5 tasks
@shumpohl shumpohl marked this pull request as ready for review December 5, 2022 17:04
@@ -362,6 +371,23 @@ def test_get_transformation(self):
expected_trafo = ScalingTransformation(inv_scalar)
self.assertEqual(expected_trafo, trafo)

def test_time_dependent_expression(self):
Copy link
Member Author

Choose a reason for hiding this comment

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

Modulated gauss example

@shumpohl shumpohl merged commit b0f0d89 into master Dec 5, 2022
@shumpohl shumpohl mentioned this pull request Dec 5, 2022
6 tasks
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.

1 participant