zxcalc/pyzx

`extract_circuit` does not turn grounds into measurements and classically-conditioned gates

Opened this issue · 3 comments

Given a graph with grounds used to represent measurements and classically-conditioned gates, I would like to convert it into a (mixed quantum-classical) circuit preserving the semantics of the grounds. However, extract_circuit does not appear to handle grounds. Is there any way to convert such a graph into a circuit?

This is blocking dlyongemallo/qiskit-zx-transpiler#18.

This is not trivial to implement I think. @ABorgna @aborgna-q does this exist in your fork?

I didn't implement it, but It shouldn't be too hard to do so. I'll make a PR later.

Update: I did implement it before, but it's part of a bunch of changes done on top of an old pyzx version. It may take a bit longer to port :)