Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Magic drag and drop understands H-boxes #359

Merged
merged 4 commits into from
Jan 30, 2025
Merged

Conversation

jvdwetering
Copy link
Collaborator

@jvdwetering jvdwetering commented Oct 23, 2024

This makes some of the convienence features for rewriting Z- and X-spiders available to H-boxes.
In particular:

  • double clicking a Hadamard edge turns it into an H-box, and vice versa.
  • The magic drag and drop now also works for some actions involving H-boxes. In particular, dragging an X(0) onto an H-box 'explodes' it, A X(pi) gets fused into it, a Z(pi) also 'explodes' it (i.e. copies through).

I think I also want to implement that you can drag a Z- or X-spider onto a H-box representing a Hadamard in order to do color change.

See also #162 . This PR requires some new pushes onto the PyZX repo.

@jvdwetering jvdwetering marked this pull request as ready for review January 30, 2025 20:20
@jvdwetering jvdwetering merged commit 545168d into master Jan 30, 2025
2 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant