Skip to content

Conversation

boldar99
Copy link
Contributor

@boldar99 boldar99 commented Oct 13, 2025

Implements several fault-equivalent (FE) rewrite rules, including:

  • elim_FE
  • color_change_FE
  • fuse_1_FE
  • unfuse_1_FE
  • unfuse_4_FE
  • unfuse_5_FE
  • unfuse_2n_FE
  • recursive_unfuse_2n_FE

Adds support for w-fault-equivalent rewrites via a w parameter for unfuse_2n_FE and recursive_unfuse_2n_FE.

Implements several fault-equivalent (FE) rewrite rules, including:
 - `elim_FE`
 - `color_change_FE`
 - `fuse_1_FE`
 - `unfuse_1_FE`
 - `unfuse_4_FE`
 - `unfuse_5_FE`
 - `unfuse_2n_FE`
 - `recursive_unfuse_2n_FE`

Adds support for w-fault-equivalent rewrites via a `w` parameter for `unfuse_2n_FE` and `recursive_unfuse_2n_FE`.
@boldar99 boldar99 force-pushed the fault-equivalent-rewrites branch from f6c5427 to 3af7515 Compare October 13, 2025 15:20
@jvdwetering
Copy link
Collaborator

We are currently working on refactoring how the rewrites work in PyZX, so I don't think I would want to merge in a bunch of new rewrites at this point. I think we can keep working on this separately for a while, and also see where it goes before we merge anything into main.
Maybe it even makes sense to have the fault-tolerant stuff be an extension you can install separately rather than having it inside of PyZX? This might no longer be feasible if we also want support for idealised edges though.

@RazinShaikh
Copy link
Contributor

The simple edge is pyzx should be treated as idealized edges as you can do any ZX rewrites freely. Additionally, we should add a new edge type for faulty edges, on which you should only allow fault-equivalent rewrites.

@RazinShaikh
Copy link
Contributor

@y-richie-y told me that he is also working on this so it would be good to coordinate the effort in this direction

@jvdwetering
Copy link
Collaborator

Jackie was also working on an implementation of faulty/idealised edges in a different fork 🙃

@RazinShaikh
Copy link
Contributor

Can you set up a discussion channel or forum (I'm not sure but Lia mentioned this in the ZX software meeting) on the ZX discord? It seems less effective to have 3 people working on the same thing in different ways. We can discuss and set up a todo list of features and tasks.

@jvdwetering
Copy link
Collaborator

I can't make new channels in that Discord, but I can ask Miriam

@y-richie-y y-richie-y mentioned this pull request Oct 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants