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

[BUG] - Loops of repeated instructions not combined into seqc loops. #13

Closed
2 tasks
GlaserN opened this issue Dec 7, 2022 · 4 comments
Closed
2 tasks
Assignees
Labels
bug Something isn't working fix commited fix / enhancment will be deployed in the next release jira Sync the issue to ZI LabOneQ internal issue tracker.

Comments

@GlaserN
Copy link

GlaserN commented Dec 7, 2022

Describe the bug
Especially on the UHFQA with it's limited instruction memory we notice that repeating the same measurement in same intervals leads to N repetitions of the same instruction blocks. This leads to not being able to perform more than 50 measurements on the UHFQA, e.g., as for example in the following example.

To Reproduce
experiment.zip
Compile the attached experiment and try to run it on a UHFQA device.

The UHFQA compiler will notice that too many instructions are used. Looking at the generated seqc code: i.e.:

seq_UHFQA1_0.txt

shows that alot of repetions can be combined into a small loop. Performing this step will make the execution of a long experiment possible.

Versions used:

  • laboneq: 1.4
  • zhinst-core
  • others

Context

  • Do you know a workaround for the issue? If yes, please provide a short description.
    Manually postprocess seqc code (dangerous)
  • Does the issue block your experiments?
@mforoozandeh mforoozandeh self-assigned this Dec 8, 2022
@mforoozandeh
Copy link
Collaborator

Hi @GlaserN,

Thanks for reporting this. We will investigate and get back to you soon.

@QuantumClemens QuantumClemens added the bug Something isn't working label Dec 14, 2022
@QuantumClemens QuantumClemens added the fix commited fix / enhancment will be deployed in the next release label Apr 5, 2023
@QuantumClemens
Copy link
Collaborator

Hi @GlaserN ,
the code compression was significantly improved with release 2.4, I will close this ticket. Let us know if you find other issues.

@polw-zi
Copy link
Contributor

polw-zi commented Apr 28, 2023

@GlaserN, happy to hear that version 2.4 successfully solved the issue for you!

Version 2.5 (released yesterday) should improve the speed of the code compression significantly over 2.4. In 2.4, I could construct some examples where the code compression had severe impacts on total compilation time; that should no longer be the case in 2.5.

However, the compressor is slightly less determined now, so the compression ratio may be lower. If you indeed encounter a regression from 2.4 to 2.5, I would love to have a look. (And add the example to our regression test suite!)

@GlaserN
Copy link
Author

GlaserN commented Jul 3, 2023

@polw-zi I found the following example, which has a again many repeating commands for the UHFQA.
Although the full experiment has a constant trigger rate, The measurements are grouped to several batches of 100 with finally 100 expanded measurement commands.

experiment.zip
seq_UHFQA1_0.txt

@QuantumClemens QuantumClemens added the jira Sync the issue to ZI LabOneQ internal issue tracker. label Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fix commited fix / enhancment will be deployed in the next release jira Sync the issue to ZI LabOneQ internal issue tracker.
Projects
None yet
Development

No branches or pull requests

4 participants