texlive[65351] Master/texmf-dist: yquant (24dec22)

commits+karl at tug.org commits+karl at tug.org
Sat Dec 24 22:29:24 CET 2022

Revision: 65351
Author:   karl
Date:     2022-12-24 22:29:24 +0100 (Sat, 24 Dec 2022)
Log Message:
yquant (24dec22)

Modified Paths:

Modified: trunk/Master/texmf-dist/doc/latex/yquant/yquant-doc.pdf
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/yquant/yquant-doc.tex
--- trunk/Master/texmf-dist/doc/latex/yquant/yquant-doc.tex	2022-12-24 20:56:02 UTC (rev 65350)
+++ trunk/Master/texmf-dist/doc/latex/yquant/yquant-doc.tex	2022-12-24 21:29:24 UTC (rev 65351)
@@ -219,7 +219,7 @@
       This document outlines the scope and usage of the \Yquant{} package.
       It contains both a reference and a huge number of examples.
       \Yquant{} is a package that makes typesetting quantum circuits easy; the package is available on CTAN.
-      This beta version~0.7.1 \emph{should} be stable and interfaces are not very likely to change in an incompatible way in the future.
+      This beta version~0.7.2 \emph{should} be stable and interfaces are not very likely to change in an incompatible way in the future.
       \compat{New in 0.4}Sometimes, backwards\hyp incompatible changes are required or advisable, in which case a compatibility setting will allow to revert back to the old behavior (rather, to maximize compatibility, this is an opt\hyp in setting: unless you choose the new behavior, you will get the old one).
       Please do report all issues and desirable additions on \href{https://github.com/projekter/yquant/issues}{GitHub}.
@@ -1035,6 +1035,11 @@
             It does not have any shape on its own, apart from multi\hyp register uses, in which it will contain a brace on its left (in vertical mode: on its top).
+         \begin{option}[New in 0.7.2]{operators/every iswap}!shape=yquant-ocross, radius=.75mm, draw!
+            This style is installed for every \gate{iswap} gate that interchanges two qubits and conditionally adds phases.
+            The \texttt{yquant-iswap} shape is a cross enclosed in a circle.
+         \end{option}
          \begin{option}[Changed in 0.7]{operators/every measure}!shape=yquant-measure, x radius=4mm, y radius=2.5mm, draw, /yquant/default fill!
             This style is installed for every \gate{measure} gate.
             The \texttt{yquant-measure} shape is a rectangle that contains a ``meter'' symbol.
@@ -1436,6 +1441,18 @@
                Denotes the text that is to be printed.
+      \subsection[\texorpdfstring{\yquant!iswap!}{iswap}]{\compat{New in 0.7.2}\yquant!iswap!}\label{gate:iswap}
+         Syntax: \yquant!iswap <targets> | <pcontrol> ~ <ncontrol>;! \\
+         This is the two\hyp qubit i\textsc{swap} gate $\ketbra{00}{00} + \ii\ketbra{01}{10} + \ii\ketbra{10}{01} + \ketbra{11}{11}$ that exchanges two qubits and conditionally adds phases.
+         It is denoted by crosses within circles at the affected registers which are connected by a control line.
+         It may span multiple registers (in fact, it should always span exactly two registers, though \Yquant{} does not enforce this), and it allows for controls.
+         However, refrain from combining \emph{multiple} two\hyp qubit targets \emph{together} with controls.
+         The control line will extend from the first to the last of all registers involved in the operation, so that it is impossible to discern visually which registers should actually be swapped.
+         Using multiple swaps without controls in one operation is fine, as well as a single controlled swap.
+         The style \style{/yquant/operators/every iswap} is installed.
+         \emph{Possible attributes:} none
       \subsection[\texorpdfstring{\yquant!measure!}{measure}]{\compat{Changed in 0.4}\yquant!measure!}\label{gate:measure}
          Syntax: \yquant!measure <target>;! \\
          This is a measurement gate, denoted by a rectangle with a meter symbol.
@@ -5321,5 +5338,8 @@
       \subsection*{2022-05-07: Version 0.7.1}
          Fix issues with using handlers for attributes. \\
          Fix \href{https://github.com/projekter/yquant/issues/21}{\#21}: CSWAP scaling problems. Now the clipping of the \gate{swap} and \gate{slash} gate scale appropriately when scaling canvas transformations are in effect (no guarantee with rotations!). Multi-register lines in the same style as control lines (\style{/yquant/operator/multi as single}) will be automatically hidden if control lines are present---they would be drawn on top of each other in the exact same style.
+      \subsection*{2022-12-24: Version 0.7.2}
+         Fix \href{https://github.com/projekter/yquant/issues/23}{\#23}: Add the \gate{iswap} gate.
\ No newline at end of file

Modified: trunk/Master/texmf-dist/tex/latex/yquant/yquant-config.tex
--- trunk/Master/texmf-dist/tex/latex/yquant/yquant-config.tex	2022-12-24 20:56:02 UTC (rev 65350)
+++ trunk/Master/texmf-dist/tex/latex/yquant/yquant-config.tex	2022-12-24 21:29:24 UTC (rev 65351)
@@ -385,6 +385,8 @@
       yquant at config@operator at subcircuit@manglingreset,
    operators/every swap/.style=%
       {shape=yquant-swap, radius=.75mm, draw},%
+   operators/every iswap/.style=%
+      {shape=yquant-ocross, radius=.75mm, draw},%
    operators/every wave/.style=%
       {shape=yquant-circle, radius=.5mm, fill},%
    % every x is implicitly defined during gate declaration

Modified: trunk/Master/texmf-dist/tex/latex/yquant/yquant-lang.tex
--- trunk/Master/texmf-dist/tex/latex/yquant/yquant-lang.tex	2022-12-24 20:56:02 UTC (rev 65350)
+++ trunk/Master/texmf-dist/tex/latex/yquant/yquant-lang.tex	2022-12-24 21:29:24 UTC (rev 65351)
@@ -499,6 +499,17 @@
 \yquant at langhelper@setup at attrs{swap}{}{}
+% iswap
+\yquant at langhelper@declare at command%
+   {iswap}%
+   \yquant at register@get at multiassingle
+   {%
+      \yquant at prepare%
+         {}%
+         {/yquant/operators/every iswap}%
+   }
+\yquant at langhelper@setup at attrs{iswap}{}{}
 % not
 \yquant at langhelper@declare at command%

Modified: trunk/Master/texmf-dist/tex/latex/yquant/yquant-shapes.tex
--- trunk/Master/texmf-dist/tex/latex/yquant/yquant-shapes.tex	2022-12-24 20:56:02 UTC (rev 65350)
+++ trunk/Master/texmf-dist/tex/latex/yquant/yquant-shapes.tex	2022-12-24 21:29:24 UTC (rev 65351)
@@ -388,6 +388,26 @@
+   \inheritsavedanchors[from=yquant-slash]%
+   \foreach \anc in {center, north, north east, east, south east, south, south west, west, north west} {%
+      \inheritanchor[from=yquant-circle]{\anc}%
+   }%
+   \inheritanchorborder[from=yquant-circle]%
+   \backgroundpath{%
+      \dimen2=.70710678\dimexpr\xradius\relax%
+      \dimen4=.70710678\dimexpr\yradius\relax
+      \pgfpathmoveto{\pgfqpoint{\dimen2}{\dimen4}}%
+      \pgfpathlineto{\pgfqpoint{-\dimen2}{-\dimen4}}%
+      \pgfpathmoveto{\pgfqpoint{-\dimen2}{\dimen4}}%
+      \pgfpathlineto{\pgfqpoint{\dimen2}{-\dimen4}}%
+      \pgfpathellipse{\pgfpointorigin}%
+                     {\pgfqpoint{\xradius}{0pt}}%
+                     {\pgfqpoint{0pt}{\yradius}}%
+   }%
+   \inheritclippath[from=yquant-circle]%
       \pgfmathsetlength\pgf at x{\pgfkeysvalueof{/tikz/x radius}}%

Modified: trunk/Master/texmf-dist/tex/latex/yquant/yquant.sty
--- trunk/Master/texmf-dist/tex/latex/yquant/yquant.sty	2022-12-24 20:56:02 UTC (rev 65350)
+++ trunk/Master/texmf-dist/tex/latex/yquant/yquant.sty	2022-12-24 21:29:24 UTC (rev 65351)
@@ -15,7 +15,7 @@
 % The Current Maintainer of this work is Benjamin Desef.
-\ProvidesPackage{yquant}[2022/05/07 v0.7.1 Yet another quantum circuit library for LaTeX]
+\ProvidesPackage{yquant}[2022/12/24 v0.7.2 Yet another quantum circuit library for LaTeX]

More information about the tex-live-commits mailing list.