John van de Wetering

Results 99 comments of John van de Wetering

Yeah there is no way in which to simplify multiple wires between H-boxes to a single wire, so the only way to deal with this is to keep all the...

Hmm, yeah maybe I should let PyZX do this. I kinda need more examples to know what is the best thing to do in this case. And then there is...

For `Circuit`s there is the gate type `ParityPhase`, that acts as a phase-gadget on the specified set of qubits. There is no straightforward way right now to add a phase-gadget...

To get to the form on the right you unfuse the CZ gates and phases and colour change the right-most layer of spiders to X-spiders by pushing out Hadamards. I...

Ah yeah, I don't think there currently is a built-in way to do that, apart from what is implemented in the `extract_circuit` method. It shouldn't be too hard to implement...

Hi Sai, The first two of the features I've mentioned have an associated paper, while the last has a Master thesis about it: https://arxiv.org/abs/1904.00633 https://arxiv.org/abs/2109.06071 (I can't access the thesis...

Hmm, that particular one looks like a bug. But to answer your question: it is really hard to give necessary preconditions for the extraction to work, as it depends on...

The problem is that `extract_circuit` expects the diagram to be in graph-like form (only Z-spiders, all spiders fused). If it isn't then its output is just wrong. I thought `extract_circuit`...

If you want the quick fix: first call `zx.to_gh(g2)` and then `zx.spider_simp(g2)`. When you extract from `g2` then, it gives you the correct outcome.