Skip to content

[QRE] Build trace from Q# program#3421

Open
fedimser wants to merge 2 commits into
mainfrom
fedimser/qsharp-trace
Open

[QRE] Build trace from Q# program#3421
fedimser wants to merge 2 commits into
mainfrom
fedimser/qsharp-trace

Conversation

@fedimser

@fedimser fedimser commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread source/qdk_package/tests/qre/test_qsharp_interop.py Dismissed
@fedimser fedimser marked this pull request as ready for review July 7, 2026 17:13

@msoeken 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.


Some(Ok(Value::unit()))
}
"BeginEstimateCaching" => Some(Ok(Value::Bool(true))),

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.

Are there plans to support this later?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I didn't want to, because unlike with counts, caching trace fragment will not speed up resource estimaiton because size of trace is asymptotically the same as size of circuit. Am I wrong?


Some(Ok(Value::unit()))
}
_ => None,

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.

We should consider a way to reflect custom Q# intrinsics in the trace. This can be done in a separate PR though. The idea is that the user can define a custom intrinsic in Q# (e.g., a logical instruction supported by a specific QEC code) and then have it appear in the QRE trace.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Will definitely do that, but need to think how to represent it, maybe not literally as Q# intrinsic?

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