zxcalc / zxlive

A graphical tool for the ZX calculus
Apache License 2.0
50 stars 19 forks source link

Command to snap spiders on to the wire #311

Closed RazinShaikh closed 2 months ago

RazinShaikh commented 3 months ago

Suppose we have a lot of phase gadgets and we want to connect the top row of spiders together through a wire. We then need to connect each spider to the next threading our way from left to right. This is very tedious. It would be useful to have a shortcut which can connect the selected spiders to the wire below it. image

jvdwetering commented 3 months ago

As a suggestion for how this could work: when we have the "merge nodes" command from Tikzit implemented #253, then holding the m key while dragging an edge should connect the edge through all the spiders you pass in the order that you pass them. Although it might be a bit difficult to drag a straight line for this long, so perhaps the original suggestion for just merging everything the line passes through is better.

jvdwetering commented 2 months ago

Implemented by #337