summaryrefslogtreecommitdiff
path: root/graphics/pgf/contrib/yquant/doc/yquant-doc.tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-02-20 03:04:50 +0000
committerNorbert Preining <norbert@preining.info>2023-02-20 03:04:50 +0000
commit5eb36ac321647ea1d7118566b9520a0e8a622203 (patch)
tree529a3c9c5b42ea2f8b9cede99b3b0c61bfd79162 /graphics/pgf/contrib/yquant/doc/yquant-doc.tex
parent9fb4a5e992bb10daf1cb0ad8f298a452e50caea8 (diff)
CTAN sync 202302200304
Diffstat (limited to 'graphics/pgf/contrib/yquant/doc/yquant-doc.tex')
-rw-r--r--graphics/pgf/contrib/yquant/doc/yquant-doc.tex157
1 files changed, 103 insertions, 54 deletions
diff --git a/graphics/pgf/contrib/yquant/doc/yquant-doc.tex b/graphics/pgf/contrib/yquant/doc/yquant-doc.tex
index 2978a461f9..a944533ba9 100644
--- a/graphics/pgf/contrib/yquant/doc/yquant-doc.tex
+++ b/graphics/pgf/contrib/yquant/doc/yquant-doc.tex
@@ -9,6 +9,7 @@
\RequirePackage{fontspec}
\setmainfont{XCharter}[Scale=.98]
\RequirePackage[osf, semibold]{sourcesanspro}
+\usepackage{mathtools}
\RequirePackage[math-style=ISO, bold-style=ISO, sans-style=italic]{unicode-math}
\usepackage{xcolor}
@@ -28,12 +29,6 @@
\long\def\compat#1{\texorpdfstring{\leavevmode\makenote{#1}\penalty10000 }{}}
% BEGIN_FOLD Minted configuration
-\begingroup
-\catcode`\&=11
-% I use Intel Python, which requires using the `activate' command first
-\renewcommand{\MintedPygmentize}{activate && pygmentize}
-\endgroup
-
\definecolor{boxGrayBody}{gray}{.94}
\definecolor{boxRedHead} {RGB} {178, 34, 34}
\definecolor{boxRedBody} {RGB} {255, 255, 192}
@@ -50,17 +45,35 @@
% BEGIN_FOLD Block environments (options, code examples, ...)
\def\unskipOpt{\vskip-5mm }
-\let\unpatched@minted@inline@iii=\minted@inline@iii%
-\def\patched@minted@inline@iii#1{%
- \unpatched@minted@inline@iii{#1}%
- \par%
- \endgroup\vskip-\parskip%
- \noindent\ignorespaces%
-}
+\ifdefined\minted@inline@iii
+ % < v2.7
+ \let\unpatched@minted@inline@iii=\minted@inline@iii%
+ \def\patched@minted@inline@iii#1{%
+ \unpatched@minted@inline@iii{#1}%
+ \par%
+ \endgroup\vskip-\parskip%
+ \noindent\ignorespaces%
+ }
+ \def\patch@mintinline{%
+ \let\minted@inline@iii=\patched@minted@inline@iii%
+ }
+\else
+ % v2.7
+ \let\unpatched@RobustMintInlineProcess@ii=\RobustMintInlineProcess@ii
+ \def\patched@RobustMintInlineProcess@ii#1{%
+ \unpatched@RobustMintInlineProcess@ii{#1}%
+ \par%
+ \endgroup\vskip-\parskip%
+ \noindent\ignorespaces%
+ }
+ \def\patch@mintinline{%
+ \let\RobustMintInlineProcess@ii=\patched@RobustMintInlineProcess@ii%
+ }
+\fi
\newenvironment{option*}[3][]{\vskip5mm%
\noindent\begin{minipage}[t]{\linewidth}%
\begingroup%
- \let\minted@inline@iii=\patched@minted@inline@iii%
+ \patch@mintinline%
\raggedleft%
\hspace*{-1cm}%
\phantomsection\label{style:/#2/#3}%
@@ -91,7 +104,7 @@
\usebox\codeexamplebox%
\end{minipage}%
\begin{minipage}{\dimexpr\linewidth-\wd\codeexamplebox\relax}%
- \minted@pygmentize{\minted@lang}%
+ \expandafter\minted@pygmentize\expandafter{\minted@lang}%
\end{minipage}%
\minted@langlinenosoff%
\par%
@@ -110,7 +123,7 @@
\begin{adjustbox}{center}
\input \minted@jobname.pyg %
\end{adjustbox}\nopagebreak
- \minted@pygmentize{\minted@lang}%
+ \expandafter\minted@pygmentize\expandafter{\minted@lang}%
\minted@langlinenosoff%
\par%
}
@@ -219,7 +232,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.2 \emph{should} be stable and interfaces are not very likely to change in an incompatible way in the future.
+ This beta version~0.7.3 \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}.
@@ -885,11 +898,13 @@ IndexSingle = ?number? | ( [ ?number? ], "-", [ ?number? ] );
\end{option}
\begin{option}{this operator}!!
- This style is appended to the current style installed for an operator; it should be used only locally to overwrite any global configuration effect.
+ This style is appended to the current style installed for an operator; it should be used only locally to overwrite any global configuration effect. \\
+ \compat{New in 0.7.3}Consider using \style{/tikz/only at} and \style{/tikz/not at} \emph{within this style} if you want to selectively address certain operators when there are multiple.
\end{option}
\begin{option}{this control}!!
- This style is appended to the current style installed for a control; it should be used only locally to overwrite any global configuration effect.
+ This style is appended to the current style installed for a control; it should be used only locally to overwrite any global configuration effect. \\
+ \compat{New in 0.7.3}Consider using \style{/tikz/only at} and \style{/tikz/not at} \emph{within this style} if you want to selectively address certain controls when there are multiple.
\end{option}
\begin{option}{operator style}!/yquant/this operator/.append style={#1}!
@@ -904,6 +919,33 @@ IndexSingle = ?number? | ( [ ?number? ], "-", [ ?number? ] );
This is a shorthand that modifies the appearance of both the current operator and any controls or control lines.
\end{option}
+ \begin{option*}[New in 0.7.3]{tikz}{only at}!!
+ This is a style which is available within \style{/yquant/this operator} and \style{/yquant/this control}.
+ It allows to selectively apply its contents only to a certain part of a multi\hyp partite operator.
+ The style expects an even number of parameters.
+ The first (third, ...) parameter contains the index of the operator/control where the style should apply.
+ This index corresponds to the values that \tex!\idx! can take; i.e., it will be zero for the topmost operator/control (leftmost for vertical circuits) and then increment by one.
+ The indices of operators, positive, and negative controls are all independent.
+ You may not only give a single index, but instead also a comma\hyp separated list, and you may also use index ranges (where both the first and second part of the range can be omitted, which then means ``from the first'' or ``to the last'').
+ The second (fourth, ...) parameter then contains all the styles that should actually be applied.
+
+ \begin{codeexample}
+\begin{tikzpicture}
+ \begin{yquant}
+ qubit q[7];
+ [operator style={only at={1, 3-}{fill=yellow}
+ {0}{ultra thick}},
+ control style={only at={0}{fill=orange}}]
+ h q[-2, 4, 5] | q[3, 6];
+ \end{yquant}
+\end{tikzpicture}
+ \end{codeexample}
+ \end{option*}
+
+ \begin{option*}[New in 0.7.3]{tikz}{not at}!!
+ See \style{/tikz/not at}; this style does the same, but instead only acts if the current register is \emph{not} the one given in the odd arguments.
+ \end{option*}
+
\begin{option}[Changed in 0.7.1\\New in 0.1.2]{operator/multi as single}!/yquant/every multi line/.style=/yquant/every control line!
This style is automatically set for certain gates such as the \gate{swap} or the \gate{zz} gate.
For those gates, neighboring registers will be treated as discontiguous; and this style will enforce their connecting line to have the style used by control lines.
@@ -967,7 +1009,7 @@ IndexSingle = ?number? | ( [ ?number? ], "-", [ ?number? ] );
\end{center}
\end{option}
- \begin{option}[New in 0.7]{horizontal}
+ \begin{option}[New in 0.7]{horizontal}!!
This style is a shorthand that sets \style{/yquant/circuit/orientation} to the \texttt{horizontal} value (which is the default).
\end{option}
@@ -1303,7 +1345,7 @@ IndexSingle = ?number? | ( [ ?number? ], "-", [ ?number? ] );
Note that the \tex![value=<value>]! attribute can (and should) alternatively be given as a braced expression that follows the name of the register.
Within \tex!<value>!, unless specified differently, the macro \tex!\idx! is always available and corresponds to the index of the current register in the list of targets.
- \subsection[\texorpdfstring{\yquant!addstyle!}{addstyle}]{\compat{New in 0.1.2}\yquant!addstyle!}\label{gate:addstyle}
+ \subsection[\texorpdfstring{\yquant{addstyle}}{addstyle}]{\compat{New in 0.1.2}\yquant!addstyle!}\label{gate:addstyle}
Syntax: \yquant!setstyle <target>;! \\
This is an invisible pseudo\hyp gate that immediately changes the \TikZ{} style with which the register lines of all target registers are drawn.
It adds to the styles that are already installed.
@@ -1316,7 +1358,7 @@ IndexSingle = ?number? | ( [ ?number? ], "-", [ ?number? ] );
Denotes the new styles; this should be a string that could be passed to \tex!\tikzset!.
\end{itemize}
- \subsection{\texorpdfstring{\yquant!align!}{align}}\label{gate:align}
+ \subsection{\texorpdfstring{\yquant{align}}{align}}\label{gate:align}
Syntax: \yquant!align <target>;! \\
This is an invisible pseudo\hyp gate that enforces all affected registers to share a common horizontal position for their next gate, which is determined by the largest position of all gates involved.
It may not span multiple registers and does not allow for controls.
@@ -1324,7 +1366,7 @@ IndexSingle = ?number? | ( [ ?number? ], "-", [ ?number? ] );
\emph{Possible attributes:} none
- \subsection{\texorpdfstring{\yquant!barrier!}{barrier}}\label{gate:barrier}
+ \subsection{\texorpdfstring{\yquant{barrier}}{barrier}}\label{gate:barrier}
Syntax: \yquant!barrier <target>;! \\
This is a pseudo\hyp gate that denotes some physical barrier that ensures execution with a specific timing; it is basically a visible version of the \hyperref[gate:align]{\yquant!align!} gate, denoted by a vertical line.
It may span multiple registers, but does not allow for controls.
@@ -1332,7 +1374,7 @@ IndexSingle = ?number? | ( [ ?number? ], "-", [ ?number? ] );
\emph{Possible attributes:} none
- \subsection{\texorpdfstring{\yquant!box!}{box}}\label{gate:box}
+ \subsection{\texorpdfstring{\yquant{box}}{box}}\label{gate:box}
Syntax: \yquant!box <target> | <pcontrol> ~ <ncontrol>;! \\
This is a generic register of a rectangular shape that can be filled with arbitrary content.
It may span multiple registers and allows for controls.
@@ -1344,13 +1386,13 @@ IndexSingle = ?number? | ( [ ?number? ], "-", [ ?number? ] );
Denotes the content of the box.
\end{itemize}
- \subsection{\texorpdfstring{\yquant!cbit!}{cbit}}\label{gate:cbit}
+ \subsection{\texorpdfstring{\yquant{cbit}}{cbit}}\label{gate:cbit}
Syntax: \yquant!cbit <name>[<len>];! \\
Declares a register of type \texttt{cbit}.
\emph{see \hyperref[gate:qubit]{\yquant!qubit!}}
- \subsection[\texorpdfstring{\yquant!correlate!}{correlate}]{\compat{New in 0.1.2}\yquant!correlate!}\label{gate:correlate}
+ \subsection[\texorpdfstring{\yquant{correlate}}{correlate}]{\compat{New in 0.1.2}\yquant!correlate!}\label{gate:correlate}
Syntax: \yquant!correlate <target>;! \\
This is a pseudo\hyp gate that indicates a correlation (usually a Bell\hyp state) present between the multi\hyp registers involved.
This gate should span multiple registers and does not allow for controls.
@@ -1358,12 +1400,12 @@ IndexSingle = ?number? | ( [ ?number? ], "-", [ ?number? ] );
\emph{Possible attributes:} none
- \subsection{\texorpdfstring{\yquant!cnot!}{cnot}}\label{gate:cnot}
+ \subsection{\texorpdfstring{\yquant{cnot}}{cnot}}\label{gate:cnot}
Syntax: \yquant!cnot <target> | <pcontrol> ~ <ncontrol>;! \\
This is a synonym for the \gate{not} gate.
Note that despite its name, controls are not mandatory and also here, the style \style{/yquant/operators/every not} is installed.
- \subsection{\texorpdfstring{\yquant!discard!}{discard}}\label{gate:discard}
+ \subsection{\texorpdfstring{\yquant{discard}}{discard}}\label{gate:discard}
Syntax: \yquant!discard <target>;! \\
This is an invisible pseudo\hyp gate that changes the type of all target registers to \gate{nobit}, i.e., no line will be drawn for them.
This has effect already for the outgoing line of the last gate on the target registers.
@@ -1372,7 +1414,7 @@ IndexSingle = ?number? | ( [ ?number? ], "-", [ ?number? ] );
\emph{Possible attributes:} none
- \subsection{\texorpdfstring{\yquant!dmeter!}{dmeter}}\label{gate:dmeter}
+ \subsection{\texorpdfstring{\yquant{dmeter}}{dmeter}}\label{gate:dmeter}
Syntax: \yquant!dmeter <target>;! \\
This is a measurement gate, denoted by a ``D'' shape.
It changes the type of all targets involved.
@@ -1389,7 +1431,7 @@ IndexSingle = ?number? | ( [ ?number? ], "-", [ ?number? ] );
Default is \gate{cbit}.
\end{itemize}
- \subsection{\texorpdfstring{\yquant!h!}{h}}\label{gate:h}
+ \subsection{\texorpdfstring{\yquant{h}}{h}}\label{gate:h}
Syntax: \yquant!h <target> | <pcontrol> ~ <ncontrol>;! \\
This is a Hadamard gate, $\bigl( \ketbra00 + \ketbra01 + \ketbra10 - \ketbra11 \bigr) \fracslash \sqrt2$, denoted by a rectangle that contains the letter $H$.
It may not span multiple registers, but allows for controls. \\
@@ -1397,7 +1439,7 @@ IndexSingle = ?number? | ( [ ?number? ], "-", [ ?number? ] );
\emph{Possible attributes:} none
- \subsection{\texorpdfstring{\yquant!hspace!}{hspace}}\label{gate:hspace}
+ \subsection{\texorpdfstring{\yquant{hspace}}{hspace}}\label{gate:hspace}
Syntax: \yquant!hspace <target>;! \\
This is an invisible pseudo\hyp gate that inserts a certain amount of white space into all target registers.
It may not span multiple registers and does not allow for controls.
@@ -1409,7 +1451,7 @@ IndexSingle = ?number? | ( [ ?number? ], "-", [ ?number? ] );
Gives the amount of white space that is to be inserted. Must be a valid (nonnegative) \TeX{} dimension.
\end{itemize}
- \subsection[\texorpdfstring{\yquant!init!}{init}]{\compat{Changed in 0.4}\yquant!init!}\label{gate:init}
+ \subsection[\texorpdfstring{\yquant{init}}{init}]{\compat{Changed in 0.4}\yquant!init!}\label{gate:init}
Syntax: \yquant!init <target>;! \\
This is a pseudo\hyp gate that (re)initializes a registers to a given state.
It may span multiple registers, but does not allow for controls.
@@ -1427,7 +1469,7 @@ IndexSingle = ?number? | ( [ ?number? ], "-", [ ?number? ] );
Denotes the label that is printed to the left of the wire.
\end{itemize}
- \subsection[\texorpdfstring{\yquant!inspect!}{inspect}]{\compat{New in 0.4}\yquant!inspect!}\label{gate:inspect}
+ \subsection[\texorpdfstring{\yquant{inspect}}{inspect}]{\compat{New in 0.4}\yquant!inspect!}\label{gate:inspect}
Syntax: \yquant!inspect <target>;! \\
This is a pseudo\hyp gate that allows to print the current state of one or multiple registers within a circuit.
It may span multiple registers, but does not allow for controls.
@@ -1441,7 +1483,7 @@ 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}
+ \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.
@@ -1453,7 +1495,7 @@ IndexSingle = ?number? | ( [ ?number? ], "-", [ ?number? ] );
\emph{Possible attributes:} none
- \subsection[\texorpdfstring{\yquant!measure!}{measure}]{\compat{Changed in 0.4}\yquant!measure!}\label{gate:measure}
+ \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.
It changes the type of all targets involved.
@@ -1475,7 +1517,7 @@ IndexSingle = ?number? | ( [ ?number? ], "-", [ ?number? ] );
Temporarily sets \style{/yquant/every post measurement control}\tex!=indirect! for this particular gate.
\end{itemize}
- \subsection{\texorpdfstring{\yquant!nobit!}{nobit}}\label{gate:nobit}
+ \subsection{\texorpdfstring{\yquant{nobit}}{nobit}}\label{gate:nobit}
Syntax: \yquant!nobit <name>[<len>];! \\
Declares a register of type \gate{nobit}.
The \texttt{<name>} must be a self\hyp chosen name for the register which was not previously used as a register name in this circuit (but names can be re\hyp used in subcircuits).
@@ -1488,7 +1530,7 @@ IndexSingle = ?number? | ( [ ?number? ], "-", [ ?number? ] );
\emph{see \gate{qubit}}
\end{itemize}
- \subsection{\texorpdfstring{\yquant!not!}{not}}\label{gate:not}
+ \subsection{\texorpdfstring{\yquant{not}}{not}}\label{gate:not}
Syntax: \yquant!not <target> | <pcontrol> ~ <ncontrol>;! \\
This is a \textsc{not} gate, $\ketbra01 + \ketbra10$, denoted by the $\oplus$ symbol.
It may not span multiple registers, but allows for controls.
@@ -1497,7 +1539,7 @@ IndexSingle = ?number? | ( [ ?number? ], "-", [ ?number? ] );
\emph{Possible attributes:} none
- \subsection[\texorpdfstring{\yquant!output!}{output}]{\compat{Changed in 0.4}\yquant!output!}\label{gate:output}
+ \subsection[\texorpdfstring{\yquant{output}}{output}]{\compat{Changed in 0.4}\yquant!output!}\label{gate:output}
Syntax: \yquant!output <target>;! \\
This is a pseudo\hyp gate that allows to write some text at the very end of the register line.
It may only be specified once per register.
@@ -1511,7 +1553,7 @@ IndexSingle = ?number? | ( [ ?number? ], "-", [ ?number? ] );
Denotes the text that is to be printed.
\end{itemize}
- \subsection{\texorpdfstring{\yquant!phase!}{phase}}\label{gate:phase}
+ \subsection{\texorpdfstring{\yquant{phase}}{phase}}\label{gate:phase}
Syntax: \yquant!phase <name> | <pcontrol> ~ <ncontrol>;! \\
This is a phase gate, $\ketbra00 + \ee^{\ii\phi} \ketbra11$, denoted by a filled circle.
It may not span multiple registers, but allows for controls.
@@ -1525,7 +1567,7 @@ IndexSingle = ?number? | ( [ ?number? ], "-", [ ?number? ] );
Note that at the moment, it is not possible to change any label options on a gate\hyp type basis, only locally or fully globally (\TikZ{} feature request \href{https://github.com/pgf-tikz/pgf/issues/811}{\#811}).
\end{itemize}
- \subsection{\texorpdfstring{\yquant!qubit!}{qubit}}\label{gate:qubit}
+ \subsection{\texorpdfstring{\yquant{qubit}}{qubit}}\label{gate:qubit}
Syntax: \yquant!qubit <name>[<len>];! \\
Declares a register of type \texttt{qubit}.
The \texttt{<name>} must be a self\hyp chosen name for the register which was not previously used as a register name in this circuit (but names can be re\hyp used in subcircuits).
@@ -1558,13 +1600,13 @@ IndexSingle = ?number? | ( [ ?number? ], "-", [ ?number? ] );
Inside the value, \tex!\reg! expands to \texttt{<name>}, \tex!\len! expands to \texttt{<len>}, \tex!\idx! expands to the current index within the vector register ($0 \leq \text{\tex!\idx!} < \text{\texttt{<len>}}$), and \tex!\regidx! expands to \tex!\reg! if \texttt{<len>} is one, or to \tex!\reg[\idx]! else.
\end{itemize}
- \subsection{\texorpdfstring{\yquant!qubits!}{qubits}}\label{gate:qubits}
+ \subsection{\texorpdfstring{\yquant{qubits}}{qubits}}\label{gate:qubits}
Syntax: \yquant!qubits <name>[<len>];! \\
Declares a register of type \texttt{qubits}.
\emph{see \hyperref[gate:qubit]{\yquant!qubit!}}
- \subsection[\texorpdfstring{\yquant!setstyle!}{setstyle}]{\compat{New in 0.1.2}\yquant!setstyle!}\label{gate:setstyle}
+ \subsection[\texorpdfstring{\yquant{setstyle}}{setstyle}]{\compat{New in 0.1.2}\yquant!setstyle!}\label{gate:setstyle}
Syntax: \yquant!setstyle <target>;! \\
This is an invisible pseudo\hyp gate that immediately changes the \TikZ{} style with which the register lines of all target registers are drawn.
It replaces all previous styles.
@@ -1577,7 +1619,7 @@ IndexSingle = ?number? | ( [ ?number? ], "-", [ ?number? ] );
Denotes the new styles; this should be a string that could be passed to \tex!\tikzset!.
\end{itemize}
- \subsection[\texorpdfstring{\yquant!settype!}{settype}]{\compat{New in 0.1.2}\yquant!settype!}\label{gate:settype}
+ \subsection[\texorpdfstring{\yquant{settype}}{settype}]{\compat{New in 0.1.2}\yquant!settype!}\label{gate:settype}
Syntax: \yquant!settype <target>;! \\
This is an invisible pseudo\hyp gate that immediately changes the type of the targets registers, taking effect with the output line extending from the last drawn gate.
It may not span multiple registers and does not allow for controls.
@@ -1589,12 +1631,12 @@ IndexSingle = ?number? | ( [ ?number? ], "-", [ ?number? ] );
To change the type to \gate{nobit}, use the \hyperref[gate:discard]{\yquant!discard!} pseudo\hyp gate instead.
\end{itemize}
- \subsection[\texorpdfstring{\yquant!setwire!}{setwire}]{\compat{Removed in 0.4\\Deprecated in 0.1.2}\yquant!setwire!}\label{gate:setwire}
+ \subsection[\texorpdfstring{\yquant{setwire}}{setwire}]{\compat{Removed in 0.4\\Deprecated in 0.1.2}\yquant!setwire!}\label{gate:setwire}
\emph{Use \gate{settype} instead.}
This gate is only available if a compatibility version before \texttt{0.4} is chosen.
- \subsection[\texorpdfstring{\yquant!slash!}{slash}]{\compat{Changed in 0.4}\yquant!slash!}\label{gate:slash}
+ \subsection[\texorpdfstring{\yquant{slash}}{slash}]{\compat{Changed in 0.4}\yquant!slash!}\label{gate:slash}
Syntax: \yquant!slash <target>;! \\
This is a pseudo\hyp gate used to denote that a single line actually represents multiple registers.
It is drawn as a short slash through the line of the register.
@@ -1606,7 +1648,7 @@ IndexSingle = ?number? | ( [ ?number? ], "-", [ ?number? ] );
\emph{Possible attributes:} none
- \subsection[\texorpdfstring{\yquant!subcircuit!}{subcircuit}]{\compat{New in 0.2}\yquant!subcircuit!}\label{gate:subcircuit}
+ \subsection[\texorpdfstring{\yquant{subcircuit}}{subcircuit}]{\compat{New in 0.2}\yquant!subcircuit!}\label{gate:subcircuit}
Syntax: \yquant!subcircuit <target>;! \\
This is a subcircuit gate which inserts independent quantum circuits at the current position within the circuit.
It may span multiple registers, but is never split into contiguous slices.
@@ -1642,7 +1684,7 @@ IndexSingle = ?number? | ( [ ?number? ], "-", [ ?number? ] );
It is possible to nest subcircuits arbitrarily.
\end{itemize}
- \subsection{\texorpdfstring{\yquant!swap!}{swap}}\label{gate:swap}
+ \subsection{\texorpdfstring{\yquant{swap}}{swap}}\label{gate:swap}
Syntax: \yquant!swap <targets> | <pcontrol> ~ <ncontrol>;! \\
This is the two\hyp qubit \textsc{swap} gate $\ketbra{00}{00} + \ketbra{01}{10} + \ketbra{10}{01} + \ketbra{11}{11}$ that exchanges two qubits.
It is denoted by crosses at the affected registers which are connected by a control line.
@@ -1654,7 +1696,7 @@ IndexSingle = ?number? | ( [ ?number? ], "-", [ ?number? ] );
\emph{Possible attributes:} none
- \subsection[\texorpdfstring{\yquant!text!}{text}]{\compat{New in 0.6}\yquant!text!}\label{gate:text}
+ \subsection[\texorpdfstring{\yquant{text}}{text}]{\compat{New in 0.6}\yquant!text!}\label{gate:text}
Syntax: \yquant!text <targets> | <pcontrol> ~ <ncontrol>;! \\
This is a pseudo\hyp gate that allows to write some text within the circuit.
It may span multiple registers and allows for controls (though the situations in which controls make sense are pretty scarce).
@@ -1668,7 +1710,7 @@ IndexSingle = ?number? | ( [ ?number? ], "-", [ ?number? ] );
Denotes the text that is to be printed.
\end{itemize}
- \subsection{\texorpdfstring{\yquant!x!}{x}}\label{gate:x}
+ \subsection{\texorpdfstring{\yquant{x}}{x}}\label{gate:x}
Syntax: \yquant!x <target> | <pcontrol> ~ <ncontrol>;! \\
This is a Pauli $\sigma_{\symup x}$ gate $\ketbra01 + \ketbra10$, denoted by a rectangle that contains the letter $X$.
It may not span multiple registers, but allows for controls. \\
@@ -1676,7 +1718,7 @@ IndexSingle = ?number? | ( [ ?number? ], "-", [ ?number? ] );
\emph{Possible attributes:} none
- \subsection{\texorpdfstring{\yquant!xx!}{xx}}\label{gate:xx}
+ \subsection{\texorpdfstring{\yquant{xx}}{xx}}\label{gate:xx}
Syntax: \yquant!xx <targets>;! \\
This is a symmetric flip gate, denoted by joined open squares.
It should span multiple registers and it allows for controls.
@@ -1685,7 +1727,7 @@ IndexSingle = ?number? | ( [ ?number? ], "-", [ ?number? ] );
\emph{Possible attributes:} none
- \subsection{\texorpdfstring{\yquant!y!}{y}}\label{gate:y}
+ \subsection{\texorpdfstring{\yquant{y}}{y}}\label{gate:y}
Syntax: \yquant!y <target> | <pcontrol> ~ <ncontrol>;! \\
This is a Pauli $\sigma_{\symup y}$ gate $-\ii\ketbra01 + \ii\ketbra10$, denoted by a rectangle that contains the letter $Y$.
It may not span multiple registers, but allows for controls. \\
@@ -1693,7 +1735,7 @@ IndexSingle = ?number? | ( [ ?number? ], "-", [ ?number? ] );
\emph{Possible attributes:} none
- \subsection{\texorpdfstring{\yquant!z!}{z}}\label{gate:z}
+ \subsection{\texorpdfstring{\yquant{z}}{z}}\label{gate:z}
Syntax: \yquant!z <target> | <pcontrol> ~ <ncontrol>;! \\
This is a Pauli $\sigma_{\symup z}$ gate $\ketbra00 - \ketbra11$, denoted by a rectangle that contains the letter $Z$.
It may not span multiple registers, but allows for controls. \\
@@ -1701,7 +1743,7 @@ IndexSingle = ?number? | ( [ ?number? ], "-", [ ?number? ] );
\emph{Possible attributes:} none
- \subsection{\texorpdfstring{\yquant!zz!}{zz}}\label{gate:zz}
+ \subsection{\texorpdfstring{\yquant{zz}}{zz}}\label{gate:zz}
Syntax: \yquant!zz <targets>;! \\
This is a symmetric phase gate, denoted by joined filled circles.
It should span multiple registers, but does not allow for controls.
@@ -3865,7 +3907,7 @@ $=$
\end{example}
\subsubsection{3.2 Gates}
- \paragraph{3.2.1 Controlled NOT and controlled $Z$}
+ \paragraph{3.2.1 Controlled NOT and controlled \texorpdfstring{$Z$}{Z}}
\begin{example}
\begin{codeexample}
\begin{tikzpicture}
@@ -5341,5 +5383,12 @@ $=$
\subsection*{2022-12-24: Version 0.7.2}
Fix \href{https://github.com/projekter/yquant/issues/23}{\#23}: Add the \gate{iswap} gate.
+
+ \subsection*{2023-01-21: Version 0.7.3}
+ Fix \href{https://github.com/projekter/yquant/issues/24}{\#24}: Clipping in subcircuits can under very special circumstances fail. Change all clipping paths to a most conservative huge rectangle---before, we tried to be economical.
+ Also use a more meticulous way of subcircuit position alignment (which will probably consume more resources during compilation, but multiple subcircuits may cancel each other in height and depth calculation if we don't do it). \\
+ Address \href{https://github.com/projekter/yquant/issues/25}{\#25}: We now provide the styles \style{/tikz/only at} and \style{/tikz/not at} that allow to easily use styles on an multi\hyp register operator that just affect some parts of their register representation. \\
+ Now the size of controls is taken into account when calculating the size of an operation---so extremely large controls will appropriate enlarge the height/depth or horizontal increment.
+ This is more useful when putting labels to controls.
%END_FOLD
\end{document} \ No newline at end of file