catalyst icon indicating copy to clipboard operation
catalyst copied to clipboard

Interpret with qubit tracer values directly in dynamic qubit allocation's implmentation

Open paul0403 opened this issue 1 month ago • 0 comments

The current implementation of dynamic qubit allocation uses the python id of the qreg tracer as the global wire index of the allocated qubits #2002

Essentially, I was trying to give each dynamically allocated wire index an actual integer during plxpr-to-cat-jaxpr interpretation. The gates/operations would then see these integers as targets during interpretation.

This made the implementation very complicated, since the plxpr interpreter needs to now keep track of which integer wire label came from which registers. The map to keep track of the current qubit SSA values for each wire label can just use the plxpr wire label tracers directly.

I expect this refactor to take around ~1 week. I don't want to spend extra time within the quarter to I'll do this during Q4 hack week (which is an individual hack week).

paul0403 avatar Oct 22 '25 02:10 paul0403