Closed drodper closed 1 year ago
Please check whether the current commit satisfies what you'd expect from the iSWAP gate, then I'll push the new version to CTAN. By the way, you should never mix yquant and TikZ code in this way. Here, you hardcoded the positions of the gates. If you instead use yquant's naming mechanism, you can use positions that are relative to gates and therefore will automatically always be at the correct position.
I changed the internal way of drawing by creating a new shape (so that anchors are correct and not rotated) and set the default size so the one of SWAP for consistency. Since there were no further comments, this is now v0.7.2, which should be available on CTAN within the next days.
Is your feature request related to a problem? Please describe. Not really a problem, but I've been writing several circuits that use a lot of iSWAPS, and it's a nice compact way to write them the way it is written in the qiskit documentation. Currently, I can only do this by manually adding crossed out circles with tikz, and it looks great but it's cumbersome. It seems there should be a way to have the gate representation added but I'm not very savy with latex.
Describe the solution you'd like Just like we would have
for swap gates, it would be nice if we could write
and get the outputs from the screenshots below
Describe alternatives you've considered Currently, the way I get the desired output as mentioned above is by following this mwe:
which produces the screenshot below. But this is very cumbersome since I have to manually edit the numbers in the
\draw
instructions to align the crossed circles.