[QRE] Build trace from Q# program#3421
Conversation
msoeken
left a comment
There was a problem hiding this comment.
Looks great! I left some initial comments for now.
|
|
||
| Some(Ok(Value::unit())) | ||
| } | ||
| "BeginEstimateCaching" => Some(Ok(Value::Bool(true))), |
There was a problem hiding this comment.
Are there plans to support this later?
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Will definitely do that, but need to think how to represent it, maybe not literally as Q# intrinsic?
Intrinsics not handled in new backend TraceBuilder:
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.