Skip to content

Extract shared ObservableUserData helper from Fermioniq - #5055

Open
tomers-qedma wants to merge 1 commit into
NVIDIA:mainfrom
tomers-qedma:feature/extract-observable-user-data
Open

Extract shared ObservableUserData helper from Fermioniq#5055
tomers-qedma wants to merge 1 commit into
NVIDIA:mainfrom
tomers-qedma:feature/extract-observable-user-data

Conversation

@tomers-qedma

Copy link
Copy Markdown

Summary

  • Extract Fermioniq's server-side observe user_data["observable"] attachment into shared ObservableUserData.h
  • Teach Future to accept global-register expectations used by server-side observe backends
  • Add unit coverage for the shared helper

This 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 expectation
  • Confirm Fermioniq still builds against the shared helper

Made with Cursor

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>
@copy-pr-bot

copy-pr-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions Bot added the runtime CUDA quantum runtime label Aug 5, 2026
@anpaz
anpaz self-requested a review August 6, 2026 20:18
Comment thread runtime/common/Future.h

// Server-side observe backends return a single expectation on the
// global register (e.g. Fermioniq / external custom QPU plugins).
if (data.has_expectation())

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.

Thank you for taking care of this. This indeed was a hole. This is a nice generic fix that should work for everybody.

///
/// Format matches Fermioniq / external REST plugins:
/// `[["Z0", "0.5+0.0j"], ["Z0 Z1", "0.3+0.0j"], ...]`
inline void attachObservableUserData(KernelExecution &code,

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.

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.

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

Labels

runtime CUDA quantum runtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants