texlive[76181] Master/texmf-dist: yquant (29aug25)

commits+karl at tug.org commits+karl at tug.org
Fri Aug 29 23:28:01 CEST 2025


Revision: 76181
          https://tug.org/svn/texlive?view=revision&revision=76181
Author:   karl
Date:     2025-08-29 23:28:00 +0200 (Fri, 29 Aug 2025)
Log Message:
-----------
yquant (29aug25)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/yquant/yquant-doc.pdf
    trunk/Master/texmf-dist/doc/latex/yquant/yquant-doc.tex
    trunk/Master/texmf-dist/tex/latex/yquant/yquant-circuit.tex
    trunk/Master/texmf-dist/tex/latex/yquant/yquant-lang.tex
    trunk/Master/texmf-dist/tex/latex/yquant/yquant-registers.tex
    trunk/Master/texmf-dist/tex/latex/yquant/yquant.sty

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	2025-08-29 21:27:24 UTC (rev 76180)
+++ trunk/Master/texmf-dist/doc/latex/yquant/yquant-doc.tex	2025-08-29 21:28:00 UTC (rev 76181)
@@ -26,7 +26,7 @@
 
 \makeatletter
 
-% currently, cleveref is broken and the patch has not landed in MikTeX yet: https://tex.stackexchange.com/a/737207/32357
+% if labels are not built correctly, a bugfix to AMS is already in the kernel, but the corresponding fix to cleveref not yet. Then apply (https://tex.stackexchange.com/a/737207/32357)
 \AtBeginDocument
  {
    \def\ltx at label#1{\cref at label{#1}}%add braces
@@ -270,7 +270,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.8 \emph{should} be stable and interfaces are not very likely to change in an incompatible way in the future.
+      This beta version~0.8.1 \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}.
 
@@ -289,7 +289,7 @@
          While the repository may contain new additions, they are not thoroughly tested until they end up on CTAN; features that are not documented in this manual are entirely unreliable.
 
          \compat{New in 0.4}The CTAN repository reflects the most current version tag on Git; the \href{https://github.com/projekter/yquant/releases}{Releases} section on GitHub additionally provides a single\hyp file version of the main package, which can for example conveniently be included in arXiv submissions.
-         Note that the arXiv currently provides \Yquant{}~0.3.2 out\hyp of\hyp the\hyp box.
+         Note that the arXiv currently provides \Yquant{}~0.7.4 out\hyp of\hyp the\hyp box.
 
       \subsection{Purpose of \Yquant, alternatives}\label{sec:alt}
          \Yquant{} is the acronym for ``yet another quantum circuit package.''
@@ -841,11 +841,11 @@
                   This can make registers with no or only very small gates larger than before; therefore, this setting is compatibility\hyp protected.
                \item \linkdef\len\tex!\len! contains the length of the current register vector.
                   Note that \emph{current} means \emph{at the stage of creation}.
-                  As this was always documented in this way (while the behavior of the other macros did not match their documentation), the behavior is the same in all versions.
+                  As this was always documented in this way (while the behavior of the other macros did not match their documentation), the behavior is the same with all compatibility settings.
             \end{itemize}
          \end{option}
 
-         \begin{option}[New in 0.6]{register/default lazy name}!!
+         \begin{option}[Changed in 0.8\\New in 0.6]{register/default lazy name}!!
             The printed name that is used by default if a new register is created implicitly (i.e., without using any of \ttlink{qubit}, \ttlink{cbit}, \ttlink{qubits}, or \ttlink{nobit}, but inside a \texlink{yquant*} environment by just using the register).
             The same macros as with \ttlink{/yquant/register/default name} are available.
             Note that this default setting is not used when the register is created via an \ttlink{init} gate---its value always overwrites the default.
@@ -5416,22 +5416,6 @@
             On the third frame, its line width is dramatically increased.
          \end{example}
 
-% We have GitHub issues for this
-%   \section{Wishlist}
-%      This section contains some thoughts on future improvements and features.
-%      \begin{itemize}
-%         \item Support for more other languages. \\
-%            Since version~0.3, \Yquant{} understands \langlink{qasm}.
-%            It would be nice if \Yquant{} could also understand \texttt{OpenQASM} correctly.
-%            The way \texttt{OpenQASM} treats operations is a bit different from \Yquant{} and also \pkg{qasm}.
-%            Some machinery would be required to automatically carry out transversal gates; apart from that everything should be available in \Yquant.
-%         \item Vertical layout. \\
-%            Sometimes, long quantum circuits on a portrait page can be better represented in a vertical layout.
-%            Also if lots of explanations are to be added, this becomes problematic in the horizontal version.
-%            In principle, \Yquant's approach could allow for a simple key switch that changes horizontal to vertical.
-%            Currently, this is largely unsupported by all quantum circuit packages except for \pkg{qpic}.
-%      \end{itemize}
-
    \section{Changelog}
       \subsection*{2020-03-15: Version 0.1}
          Initial release
@@ -5565,5 +5549,10 @@
          Bugfix: Always recognize changes in register types in subcircuits (and thus \langlink{groups}). \\
          Documentation: The documentation now contains much more links between individual commands.
          Maybe in the future, this can even be expanded to code examples?
+
+      \subsection*{2025-08-29: Version 0.8.1}
+         Bugfix: Subcircuits, where a wire with multi\hyp digit internal index had the \textlink{[in]} attribute broke the layout. \\
+         Bugfix: The \texlink{\idx} and \texlink{\regidx} changes in version~0.8 are now applied to the lazy register creation (\ttlink{/yquant/register/default lazy name}) as well. \\
+         Bugfix: Allow \tex!\par! in gate definitions once more.
 %END_FOLD
 \end{document}
\ No newline at end of file

Modified: trunk/Master/texmf-dist/tex/latex/yquant/yquant-circuit.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/yquant/yquant-circuit.tex	2025-08-29 21:27:24 UTC (rev 76180)
+++ trunk/Master/texmf-dist/tex/latex/yquant/yquant-circuit.tex	2025-08-29 21:28:00 UTC (rev 76181)
@@ -80,7 +80,7 @@
             }%
             \eappto\yquant at circuit@endwires at finalize{%
                \yquant at register@set at type%
-                  \yquant at circuit@endwires at i\noexpand\yquant at register@type at none%
+                  {\yquant at circuit@endwires at i}\noexpand\yquant at register@type at none%
             }%
          }\relax%
       \else%

Modified: trunk/Master/texmf-dist/tex/latex/yquant/yquant-lang.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/yquant/yquant-lang.tex	2025-08-29 21:27:24 UTC (rev 76180)
+++ trunk/Master/texmf-dist/tex/latex/yquant/yquant-lang.tex	2025-08-29 21:28:00 UTC (rev 76181)
@@ -169,6 +169,7 @@
 
 \protected\def\yquant at lang@maybe at idx{}
 
+% sync with \yquant at register@get at id@lazycreate at do
 \protected\def\yquant at lang@create at do#1[#2]#3[;{%
    % parse length
    \ifstrempty{#3}{%
@@ -290,7 +291,7 @@
 
 % BEGIN_FOLD Define own gates
 % if the argument contains #2, replace it by #1 and add value as a required attribute
-\protected\def\yquantdefinegate at parsearg#1#2{%
+\protected\long\def\yquantdefinegate at parsearg#1#2{%
    \def\yquantdefinegate at parsearg@check##1{#2}%
    \edef\yquantdefinegate at parsearg@replaced{%
       \unexpanded\expandafter{\yquantdefinegate at parsearg@check{#1}}%

Modified: trunk/Master/texmf-dist/tex/latex/yquant/yquant-registers.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/yquant/yquant-registers.tex	2025-08-29 21:27:24 UTC (rev 76180)
+++ trunk/Master/texmf-dist/tex/latex/yquant/yquant-registers.tex	2025-08-29 21:28:00 UTC (rev 76181)
@@ -145,6 +145,7 @@
    }%
 }
 
+% sync with \yquant at lang@create at do
 \protected\def\yquant at register@get at id@lazycreate at do#1[#2]#3[;{%
    \begingroup%
       % parse length
@@ -167,10 +168,15 @@
          \def\idx{0}%
       \fi%
       % define text macros
-      \ifnum\len=1 %
-         \let\regidx=\reg%
+      \ifnum\len>1 %
+         \def\regidx{\reg[\idx]}%
       \else%
-         \def\regidx{\reg[\idx]}%
+         \ifnum\yquant at compat<4 %
+            \let\regidx=\reg%
+         \else%
+            \def\regidx{\reg\vphantom[\yquant at lang@maybe at idx}%
+         \fi%
+         % see comment in \yquant at lang@create at do for the vphantom
       \fi%
       \numdef\yquant at circuit@operator at mintarget{\csname\yquant at prefix registers\endcsname+1}%
       \begingroup%
@@ -204,7 +210,7 @@
          \let\yquant at circuit@operator at minctrl=\yquant at circuit@operator at mintarget%
          \let\yquant at circuit@operator at maxctrl=\yquant at circuit@operator at maxtarget%
          % there are no multi inits in this context
-         \preto\yquant at attrs@remaining{internal/move label,}%
+         \epreto\yquant at attrs@remaining{internal/move label, internal/setregidx={\idx}{\reg},}%
          \def\yquant at config@operator at minimum@width{0pt}%
          \unless\ifx\yquant at lang@attr at value\empty%
             % make sure to immediately remove the "clear" marker again if we have a text

Modified: trunk/Master/texmf-dist/tex/latex/yquant/yquant.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/yquant/yquant.sty	2025-08-29 21:27:24 UTC (rev 76180)
+++ trunk/Master/texmf-dist/tex/latex/yquant/yquant.sty	2025-08-29 21:28:00 UTC (rev 76181)
@@ -15,7 +15,7 @@
 %
 % The Current Maintainer of this work is Benjamin Desef.
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{yquant}[2025/06/20 v0.8.0 Yet another quantum circuit library for LaTeX]
+\ProvidesPackage{yquant}[2025/08/29 v0.8.1 Yet another quantum circuit library for LaTeX]
 
 \RequirePackage{etoolbox}[2018/02/11]
 \RequirePackage{tikz}[2015/08/29]



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