Skip to content

[QRE] Build trace from Q# program - #3421

Draft
Dima Fedoriaka (fedimser) wants to merge 8 commits into
mainfrom
fedimser/qsharp-trace
Draft

[QRE] Build trace from Q# program#3421
Dima Fedoriaka (fedimser) wants to merge 8 commits into
mainfrom
fedimser/qsharp-trace

Conversation

@fedimser

@fedimser Dima Fedoriaka (fedimser) commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Intrinsics not handled in new backend TraceBuilder:

  • BeginEstimateCaching/EndEstimateCaching - no-op (which is correct) because there is not significant speedup from caching trace fragment (copying it has the same complexity as genrating it).
  • Load/Store - supported partially. They emit read/write gate, but do not affect memory/compute qubit counts. This needs to be fixed when we finalize how we treat memory/compute architrcure.
  • EnableMemoryComputeArchitecture - no-op until we finalize design for memory/compute architecture. To properly support this, we need to maintain untyped->typed qubit id mapping (which we don't do in counts.rs).
  • AccountForEstimatesInternal - rejected (error) because trace doesn't support gates with explicit resource counts.

Comment thread source/qdk_package/tests/qre/test_qsharp_interop.py Dismissed

@msoeken Mathias Soeken (msoeken) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks great! I left some initial comments for now.

Comment thread source/qre/src/trace_builder.rs
Comment thread source/qre/src/trace_builder.rs
@fedimser
Dima Fedoriaka (fedimser) marked this pull request as draft July 20, 2026 17:42
@fedimser

Dima Fedoriaka (fedimser) commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

It is ready for review, but moved to draft because it's not going in July release.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants