-
Notifications
You must be signed in to change notification settings - Fork 191
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
Fix TDM "modes" validation to match XQC API #566
Conversation
Codecov Report
@@ Coverage Diff @@
## master #566 +/- ##
=======================================
Coverage 98.36% 98.36%
=======================================
Files 76 76
Lines 8332 8332
=======================================
Hits 8196 8196
Misses 136 136
Continue to review full report at Codecov.
|
Is the weird behavior of codecov expected? I just changed a few lines, no way to have decreased coverage by 40% ;) |
I guess |
Looks good overall! 🙂 Thank you! Indeed, as Luke mentioned, probably this line needs an update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @lneuhaus, since SF now uses API versioning, my understanding is this shouldn't be changed unless the pinned API version is also increased as needed.
Unless somehow the current API version that SF targets was changed?
But maybe someone from platform can clarify this (@jswinarton?)
Is the weird behavior of codecov expected? I just changed a few lines, no way to have decreased coverage by 40% ;)
I think this is because the
Tests / core-tests (0, frontend or apps or api or gaussian)
CI is failing, so it is not updating its coverage info to Codecov. And this CI check tests the majority of the code base :)
Co-authored-by: Josh Izaac <josh146@gmail.com>
What I know for sure:
Either we admit that the API 0.2.0 spec is wrong and expand it
to be consistent with what's being returned by the API anyways, or we take the API 0.2.0 as the ultimate source of truth, in which case I could modify this PR to take that into account. Definitely curious to get @jswinarton, @gtr8, or @Mandrenkov 's input on this. |
True, but I think this statement is weaker than you think. Here is how the 0.3.0 endpoint is currently implemented:
If you try and request the device specifications for a TD2 device using the 0.3.0 endpoint, you will get an empty dictionary.
The platform 0.2.0 API specification does indeed state that "modes": {
"equal": {
"concurrent": 2,
"spatial": 1
},
"max": {
"temporal": 100
}
} Note the
I think performing either change is not great for semantic versioning so we should do the one that leaves the API in the most desirable state. That is, we either
I'm not sure which of these options is more convenient for Strawberry Fields. |
@Mandrenkov and I have run a test with this branch - it is now in line with how the platform presents the
is what both the platform and this PR went with, so I suggest to simply merge this PR and move on. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
As @lneuhaus mentioned, the discrepancy can be fixed by updating the TD2 hardware certificate version; however, it will be a week or so before we deploy support for the new certificate version on the platform side. I think it would sense to hold off merging this PR until then (to minimize the TD2 downtime).
TD2 is effectively down until this fix is applied since a platform upgrade around January (introduction of device API) - therefore I suggest we merge this now in order to be sure to integrate this behavior into the next Strawberry Fields release. |
Okay, sounds good! |
Context:
Device specifications for TDM programs that are exposed by Xanadu's device API used to include a field
modes
with data likeThis format was recently changed into (ex generis):
Description of the Change:
This PR brings Strawberry Fields up to date with the new format.
Benefits:
TDM programs can run on Xanadu hardware.
Possible Drawbacks:
None.
Related GitHub Issues:
None.