-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Several of the guppy_opt.rs tests currently fail to optimize down to the identity despite all quantum gates being removed. We are left with circuits of the form QAlloc - MeasureFree. (Neither of these are passed into pytket because of the order edges.)
There are two tasks to optimise these:
- Elide the statically-predictable measurements. This could be done by
- enhancing constant-folding (returning a bool for the measurement output), which would disconnect the bool outport; plus a pass to convert such disconnected MeasureFree's into simple QFrees (followed by the second task, below)
- @mark-koch and @willsimmons1465 quantum relational analysis
- possibly encoding the QAlloc(/Reset) + Measure(Free) so pytket can predict the measurement output?
- elide QAlloc - QFree. Pytket decoding may remove these following pytket producing a circuit with an extra (ancilla) qubit input+output, and/or we may need a separate pass.
- The assumption here is that optimizing programs that panic in
qallocto programs that don't, is desirable, rather than a semantic change to be avoided. I.e. that qalloc succeeds on a "best-effort basis" rather than according to some precisely specified (statically-predictable) semantics that should be preserved.
- The assumption here is that optimizing programs that panic in
Metadata
Metadata
Assignees
Labels
No labels