fix not unique UUID in native gates rotation#1357
Conversation
… 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 Report❌ Patch coverage is
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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
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 callself.RX90()andself.RX()instead of passing the Native objects directly
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
@copilot commit on this branch changes based on this feedback
|
@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. |
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.