Skip to content

Qhc 1358 Remove ext_trigger check from platform - #1112

Open
jordivallsq wants to merge 25 commits into
mainfrom
qhc-1358-Move-ext_trigger-check-to-platform
Open

Qhc 1358 Remove ext_trigger check from platform#1112
jordivallsq wants to merge 25 commits into
mainfrom
qhc-1358-Move-ext_trigger-check-to-platform

Conversation

@jordivallsq

Copy link
Copy Markdown
Contributor

Moved qblox external trigger check from compiler to platform. This avoids raising errors related to the Runcard inside the compiler.

@linear

linear Bot commented May 18, 2026

Copy link
Copy Markdown

QHC-1358

QHC-1578

@jordivallsq
jordivallsq marked this pull request as ready for review May 18, 2026 09:19
@codecov

codecov Bot commented May 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.71%. Comparing base (59f04ed) to head (4423e33).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1112   +/-   ##
=======================================
  Coverage   98.71%   98.71%           
=======================================
  Files         209      209           
  Lines       11306    11308    +2     
=======================================
+ Hits        11161    11163    +2     
  Misses        145      145           
Flag Coverage Δ
unittests 98.71% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fedonman fedonman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Made a comment on the location of the flag.

Comment thread src/qililab/qprogram/structured_program.py Outdated
@flavie-lebars
flavie-lebars self-requested a review May 28, 2026 09:57
@pullpo-for-slack

Copy link
Copy Markdown

🔗Pullpo.io Slack PR-Channel

@flavie-lebars flavie-lebars left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why do we even need the flag in the runcard? Another architecture could be that as soon as a qprogram has a wait_trigger we set up whatever needs to be set up between the compilation and execution. The downisde would be that this would need to be done at runtime (but this would be negligible) but this would avoid the user needing to put this flag and make things simpler in my opinion.

Also, I completely agree with Vyron's comment.

Comment thread src/qililab/qprogram/qblox_compiler.py Outdated
Comment thread src/qililab/platform/platform.py Outdated
@jordivallsq jordivallsq changed the title Qhc 1358 Move ext_trigger check to platform Qhc 1358 Remove ext_trigger check from platform Jun 16, 2026
@sonarqubecloud

Copy link
Copy Markdown

@jordivallsq jordivallsq left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@flavie-lebars @fedonman Following your advice, the external_trigger flag in the runcard has been removed, now the device creates this external trigger inside the trigger network when wait_trigger is used.

The downisde would be that this would need to be done at runtime (but this would be negligible) but this would avoid the user needing to put this flag and make things simpler in my opinion.

I need to test this on hardware to see if the qblox controller has any reaction to run

self.device.ext_trigger_input_trigger_en(True)
self.device.ext_trigger_input_trigger_address(15)
self.device.ext_trigger_input_delay(0)

many consecutive times (I don't expect anything but just in case).

new changelog

Removed external_trigger parameter from within the runcard's qblox controller instrument. Now the function QbloxClusterController.set_ext_trigger is risen internally every time a qprogram contains a wait_trigger using the trigger channel 15 (last one).

Comment thread src/qililab/platform/platform.py Outdated
Comment thread src/qililab/qprogram/qblox_compiler.py Outdated
Comment thread src/qililab/qprogram/structured_program.py Outdated

@fedonman fedonman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM 💯 Thank you Jordi! 🚀

Comment thread docs/releases/changelog-dev.md Outdated
Comment thread src/qililab/qprogram/qblox_compiler.py Outdated
Comment thread src/qililab/qprogram/qblox_compiler.py Outdated
self.qprogram = qprogram
self.sequences = sequences
self.acquisitions = acquisitions
self.external_trigger = external_trigger

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

in my opinion, the flag shouldn't be inferred in the compiler (_handle_wait_trigger), it's known at qprogram-authoring time. We already have this pattern: trigger_network_required lives on QProgram._QbloxInterface, set inside measure_reset(). external_trigger should follow this. But I think @fedonman's comment suggested to move it here in the compiler. Happy to discuss this at a sprint/daily.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have implemented these changes in a single commit (Implemented requested changes) so the changes are reversible. Let's see what @fedonman thinks of the changes.

Comment thread src/qililab/platform/platform.py
@jordivallsq jordivallsq added the needs-testing-on-qblox Requires validation on a Qblox cluster (no chip connection needed). label Jul 3, 2026
@jordivallsq
jordivallsq requested a review from fedonman July 13, 2026 12:08
@jordivallsq
jordivallsq requested a review from elygoner as a code owner July 21, 2026 09:25
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-testing-on-qblox Requires validation on a Qblox cluster (no chip connection needed).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants