summaryrefslogtreecommitdiff
path: root/graphics/pgf/contrib
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-12-25 03:01:07 +0000
committerNorbert Preining <norbert@preining.info>2022-12-25 03:01:07 +0000
commit90ef58ebc56f69220f860d466e1e21ed68ce9a55 (patch)
tree1b6ae8a0cb89728c9f71447236a171da28b786a1 /graphics/pgf/contrib
parentda0bd16b0ba9d42d044af47137003788f0b7f773 (diff)
CTAN sync 202212250301
Diffstat (limited to 'graphics/pgf/contrib')
-rw-r--r--graphics/pgf/contrib/yquant/doc/yquant-doc.pdfbin1017482 -> 1021322 bytes
-rw-r--r--graphics/pgf/contrib/yquant/doc/yquant-doc.tex22
-rw-r--r--graphics/pgf/contrib/yquant/tex/yquant-config.tex2
-rw-r--r--graphics/pgf/contrib/yquant/tex/yquant-lang.tex11
-rw-r--r--graphics/pgf/contrib/yquant/tex/yquant-shapes.tex20
-rw-r--r--graphics/pgf/contrib/yquant/tex/yquant.sty2
6 files changed, 55 insertions, 2 deletions
diff --git a/graphics/pgf/contrib/yquant/doc/yquant-doc.pdf b/graphics/pgf/contrib/yquant/doc/yquant-doc.pdf
index 53c70133e7..8f70fde1c5 100644
--- a/graphics/pgf/contrib/yquant/doc/yquant-doc.pdf
+++ b/graphics/pgf/contrib/yquant/doc/yquant-doc.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/yquant/doc/yquant-doc.tex b/graphics/pgf/contrib/yquant/doc/yquant-doc.tex
index 17b105cb92..2978a461f9 100644
--- a/graphics/pgf/contrib/yquant/doc/yquant-doc.tex
+++ b/graphics/pgf/contrib/yquant/doc/yquant-doc.tex
@@ -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 @@ IndexSingle = ?number? | ( [ ?number? ], "-", [ ?number? ] );
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).
\end{option}
+ \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 @@ IndexSingle = ?number? | ( [ ?number? ], "-", [ ?number? ] );
Denotes the text that is to be printed.
\end{itemize}
+ \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.
%END_FOLD
\end{document} \ No newline at end of file
diff --git a/graphics/pgf/contrib/yquant/tex/yquant-config.tex b/graphics/pgf/contrib/yquant/tex/yquant-config.tex
index 6da9a4be66..4d7f9630bd 100644
--- a/graphics/pgf/contrib/yquant/tex/yquant-config.tex
+++ b/graphics/pgf/contrib/yquant/tex/yquant-config.tex
@@ -385,6 +385,8 @@
yquant@config@operator@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
diff --git a/graphics/pgf/contrib/yquant/tex/yquant-lang.tex b/graphics/pgf/contrib/yquant/tex/yquant-lang.tex
index 1b462d2d85..3463bc0e5a 100644
--- a/graphics/pgf/contrib/yquant/tex/yquant-lang.tex
+++ b/graphics/pgf/contrib/yquant/tex/yquant-lang.tex
@@ -499,6 +499,17 @@
}
\yquant@langhelper@setup@attrs{swap}{}{}
+% iswap
+\yquant@langhelper@declare@command%
+ {iswap}%
+ \yquant@register@get@multiassingle
+ {%
+ \yquant@prepare%
+ {}%
+ {/yquant/operators/every iswap}%
+ }
+\yquant@langhelper@setup@attrs{iswap}{}{}
+
% not
\yquant@langhelper@declare@command%
{not}%
diff --git a/graphics/pgf/contrib/yquant/tex/yquant-shapes.tex b/graphics/pgf/contrib/yquant/tex/yquant-shapes.tex
index e4cc01e63f..3e010938c3 100644
--- a/graphics/pgf/contrib/yquant/tex/yquant-shapes.tex
+++ b/graphics/pgf/contrib/yquant/tex/yquant-shapes.tex
@@ -388,6 +388,26 @@
\inheritclippath[from=yquant-circle]%
}
+\pgfdeclareshape{yquant-ocross}{%
+ \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]%
+}
+
\pgfdeclareshape{yquant-measure}{%
\saveddimen\xradius{%
\pgfmathsetlength\pgf@x{\pgfkeysvalueof{/tikz/x radius}}%
diff --git a/graphics/pgf/contrib/yquant/tex/yquant.sty b/graphics/pgf/contrib/yquant/tex/yquant.sty
index 2acb5d33b5..f62faf64be 100644
--- a/graphics/pgf/contrib/yquant/tex/yquant.sty
+++ b/graphics/pgf/contrib/yquant/tex/yquant.sty
@@ -15,7 +15,7 @@
%
% The Current Maintainer of this work is Benjamin Desef.
\NeedsTeXFormat{LaTeX2e}
-\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]
\RequirePackage{etoolbox}[2018/02/11]
\RequirePackage{tikz}[2015/08/29]