zxlive icon indicating copy to clipboard operation
zxlive copied to clipboard

Disable the simplification routines that are not applicable on the current diagram

Open RazinShaikh opened this issue 2 years ago • 3 comments

Currently all the PyZX simplification routines are shown and can be applied from the "Simplify" menu. But some simplifications would not change the current diagram, for instance, in the case when the same routine was applied previously. We want to disable menu buttons for simplifications that are not possible.

RazinShaikh avatar Jul 31 '23 23:07 RazinShaikh

The simplest way to implement this would be after every change to the graph calculate whether doing a change affects the graph. This is however quite computationally wasteful. The more involved but nicer solution is that each simplify function should have a matcher function that sees whether the rewrite is actually applicable.

jvdwetering avatar Aug 01 '23 14:08 jvdwetering

Has this been resolved? I can't find any rewrite actions that don't have matchers

wlcsm avatar Dec 17 '23 21:12 wlcsm

This is about the full rewrite stragies, like full_reduce or clifford_simp that are in their own category. These don't have dedicated matchers.

jvdwetering avatar Dec 17 '23 22:12 jvdwetering