Extract shared ObservableUserData helper from Fermioniq - #5055
Open
tomers-qedma wants to merge 1 commit into
Open
Extract shared ObservableUserData helper from Fermioniq#5055tomers-qedma wants to merge 1 commit into
tomers-qedma wants to merge 1 commit into
Conversation
Share the server-side observe user_data wire format and accept global-register expectations in Future so other backends can reuse the same logic without duplicating Fermioniq-specific code. Co-authored-by: Cursor <cursoragent@cursor.com>
anpaz
self-requested a review
August 6, 2026 20:18
Renaud-K
reviewed
Aug 6, 2026
|
|
||
| // Server-side observe backends return a single expectation on the | ||
| // global register (e.g. Fermioniq / external custom QPU plugins). | ||
| if (data.has_expectation()) |
Collaborator
There was a problem hiding this comment.
Thank you for taking care of this. This indeed was a hole. This is a nice generic fix that should work for everybody.
Renaud-K
requested changes
Aug 6, 2026
| /// | ||
| /// Format matches Fermioniq / external REST plugins: | ||
| /// `[["Z0", "0.5+0.0j"], ["Z0 Z1", "0.3+0.0j"], ...]` | ||
| inline void attachObservableUserData(KernelExecution &code, |
Collaborator
There was a problem hiding this comment.
I would not share the FermionIq format with yours. You will be impacted when fermioniq wants to make a change. Anyone working on this code, will not necessarily realize that they can impact fermioniq. To test FermionIq, you need special credentials so it is not tested in the CI actions but in a separate one. It has been failing for a while despite our attempts to contact them, so we are not even getting any validation altogether. It's probably best to leave it alone. You can have make your own copy.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
user_data["observable"]attachment into sharedObservableUserData.hFutureto accept global-register expectations used by server-side observe backendsThis is a focused subset of #4980 (no docs, no mock plugin, no platform-qpu auto-load).
Test plan
test_observable_user_data— Fermioniq-compatible observable attachment + global-register expectationMade with Cursor