Skip to content

fix not unique UUID in native gates rotation#1357

Merged
RoyStegeman merged 1 commit intomainfrom
hotfix_rs
Jan 15, 2026
Merged

fix not unique UUID in native gates rotation#1357
RoyStegeman merged 1 commit intomainfrom
hotfix_rs

Conversation

@RoyStegeman
Copy link
Member

When creating a rotation from a SingleQubtNatives instance, make sure… that the returned gates are unique instances

Without this, when running AllXY gates such as X9-Yp had the same UUID. This caused problems with the qblox driver.

… that the returned gates are unique instances

without this, when running AllXY gates such as X9-Yp had the same UUID. This caused problems with the qblox driver
@codecov
Copy link

codecov bot commented Jan 15, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 40.08%. Comparing base (d3bc9a7) to head (05fb160).
⚠️ Report is 73 commits behind head on main.

Files with missing lines Patch % Lines
src/qibolab/_core/native.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1357   +/-   ##
=======================================
  Coverage   40.08%   40.08%           
=======================================
  Files         114      114           
  Lines        5596     5596           
=======================================
  Hits         2243     2243           
  Misses       3353     3353           
Flag Coverage Δ
unittests 40.08% <50.00%> (ø)

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

☔ View full report in Codecov by Sentry.
📢 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.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request fixes a bug where rotation gates created from SingleQubitNatives instances would share the same UUID, causing issues with the qblox driver. The fix ensures that each rotation gate gets a unique UUID by calling the Native objects as functions (invoking create_sequence()) rather than passing them directly.

Changes:

  • Modified SingleQubitNatives.R() method to call self.RX90() and self.RX() instead of passing the Native objects directly

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +97 to +99
return rotation(self.RX90(), theta, phi, rx90=True)
assert self.RX is not None
return rotation(self.RX, theta, phi)
return rotation(self.RX(), theta, phi)
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

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

The UUID uniqueness behavior fixed by calling self.RX90() and self.RX() lacks test coverage. Consider adding a test to verify that multiple calls to SingleQubitNatives.R() with different parameters return sequences with unique pulse UUIDs, similar to the existing test in test_fixed_sequence_factory that checks fseq1[0][1].id != fseq2[0][1].id.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

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

@copilot commit on this branch changes based on this feedback

Copy link
Contributor

Copilot AI commented Jan 15, 2026

@RoyStegeman I've opened a new pull request, #1358, to work on those changes. Once the pull request is ready, I'll request review from you.

@RoyStegeman RoyStegeman merged commit 1e760d6 into main Jan 15, 2026
69 checks passed
@RoyStegeman RoyStegeman deleted the hotfix_rs branch January 15, 2026 12:17
@RoyStegeman RoyStegeman added the bug Something isn't working label Feb 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants