zxlive icon indicating copy to clipboard operation
zxlive copied to clipboard

Animations for graph rewrite rules

Open RazinShaikh opened this issue 2 years ago • 6 comments

The graph rewrite rules from https://github.com/Quantomatic/zxlive/commit/44cf15e431fbf094108d3855668c7b27a84ff949 are missing animations

RazinShaikh avatar Oct 10 '23 22:10 RazinShaikh

How can I fuse two phase gadgets? I've selected two below, but the "fuse phase gadgets" rewrite action is still disabled.

Screenshot 2023-12-17 at 9 39 25 pm

wlcsm avatar Dec 17 '23 21:12 wlcsm

This applies to phase gadgets in graph-like form if I'm not mistaken. So if you colour-change the red ones and fuse the green spiders, it should match.

jvdwetering avatar Dec 17 '23 22:12 jvdwetering

Ah okay, is this what you mean?

Screenshot 2023-12-18 at 5 10 10 pm

This also isn't enabling the rewrite, so I'm probably missing something

wlcsm avatar Dec 18 '23 17:12 wlcsm

Hmm that's weird. I believe that should be matching. Not sure why it isn't working. Maybe because it is connected directly to the boundaries?

jvdwetering avatar Dec 19 '23 14:12 jvdwetering

Tried adding some vertices between the boundaries with no luck. I was wondering if we could use some DSL for graphs that would allow us more easily create matchers, as it isn't obvious when looking at the matcher's code, why it isn't registering the match. What do you think?

Screenshot 2023-12-20 at 11 25 20 am

wlcsm avatar Dec 20 '23 11:12 wlcsm

Ah, I see why it doesn't match. The matcher in pyzx checks that the phase is non-Clifford first. I don't really remember why I did it this way. I think that check can be removed without breaking anything. This is indeed confusing behaviour.

jvdwetering avatar Dec 21 '23 10:12 jvdwetering