<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\documentclass{ltjsarticle}

\usepackage{qworld}

\usepackage{bookmark}
\usepackage{fontspec}
\usepackage{pdfpages}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{mathtools}
\usepackage{ascmac}
\usepackage{fancybox}
\usepackage{float}
\usepackage{xparse}
\usepackage{bbm}
\usepackage{mathrsfs}
%\numberwithin{equation}{subsection}

\usepackage{changelog}

\usepackage{framed}
\newenvironment{longshadowbox}{%
  \def\FrameCommand{\fboxsep=\FrameSep \shadowbox}%
  \MakeFramed {\FrameRestore}}%
{\endMakeFramed}

\usepackage{url}
\usepackage{hyperref}
\hypersetup{colorlinks=true, linkcolor=blue}

\usepackage{iitem}

\usepackage{multirow}

\usepackage{here}

\usepackage{fontawesome}

\usepackage{xspace}
\newcommand{\qworldname}{\texttt{QWorld}\xspace}
\newcommand{\tikzname}{Ti\emph{k}Z\xspace}
\newcommand{\texlivename}{\TeX{} \textsf{Live}\xspace}

\setcounter{tocdepth}{3}

\usepackage{listings}
\lstset{basicstyle=\ttfamily}
\usepackage[most]{tcolorbox}
\newtcblisting{mybox}[2][]{%
  colback=red!5!white,
  colframe=red!75!black,
  fonttitle=\bfseries,
  title=#2,
  #1
}

\tcbset
{
  codeinfo/.style=
  { 
    colframe=cyan!90,
    coltitle=cyan!60,
    colbacktitle=black,
    fonttitle=\small\sffamily\bfseries, 
    fontupper=\small, 
    fontlower=\small
  },
  exampletitleinfo/.style 2 args=
  {
    codeinfo,
    title={ä¾‹ \thetcbcounter #1},
    label={#2}
  },
  failurecodeinfo/.style=
  {
    colframe=red!90,
    coltitle=red!60, 
    colbacktitle=black,
    fonttitle=\small\sffamily\bfseries, 
    fontupper=\small, 
    fontlower=\small
  },
  failureexampletitleinfo/.style 2 args=
  {
    failurecodeinfo,
    title={å¤±æ•—ä¾‹ \thetcbcounter #1},
    label={#2}
  }
}
\newtcblisting{texexp}[1]
{
  codeinfo,
  #1
}
\newtcblisting[auto counter,number within=section]{codebox}[3][center lower,listing side text,righthand width=3.5cm,bicolor,colbacklower=white]
{
  exampletitleinfo={#2}{#3},
  breakable,
  #1
}

\newtcblisting[use counter from=codebox,number within=section]{CODEBOX}[3][center lower,bicolor,colbacklower=white]
{
  exampletitleinfo={#2}{#3},
  breakable,
  #1
}
\newtcolorbox[use counter from=codebox]{codeboxspec}[3][]
{
  exampletitleinfo={#2}{#3},
  breakable,
  #1
}
\newtcblisting{texfexp}[1]
{
  failurecodeinfo,
  #1
}
\newtcblisting[auto counter,number within=section]{fcodebox}[3][center lower,listing side text,righthand width=3.5cm,bicolor,colbacklower=white]
{
  failureexampletitleinfo={#2}{#3},
  breakable,
  #1
}

\newtcblisting[use counter from=fcodebox,number within=section]{FCODEBOX}[3][center lower,bicolor,colbacklower=white]
{
  failureexampletitleinfo={#2}{#3},
  breakable,
  #1
}
\newtcolorbox[use counter from=fcodebox]{fcodeboxspec}[3][]
{
  failureexampletitleinfo={#2}{#3},
  breakable,
  #1
}

\usepackage{xcolor}
\NewDocumentCommand{\showcmd}{O{\textbackslash} m O{black}}{%
    \leavevmode%
    \ifthenelse{\equal{#3}{new}}{%
        \textcolor{green!50!black}{\texttt{#1#2}}%
    }{%
        \ifthenelse{\equal{#3}{old}}{%
            \textcolor{red}{\texttt{#1#2}}%
        }{%
            \textcolor{#3}{\texttt{#1#2}}%
        }%
    }%
}

\begin{document}
\title{
    \Huge \textbf{\qworldname}\\[4pt]
    \scriptsize\texttt{Version 1.1.1} \\[4pt]
}
\author{
    \textbf{æ–°å äº®å¤ª} \\[4pt]
}
\date{\today}
\maketitle

\begin{abstract}
  \qworldname ã¯, ãƒ¢ãƒŽã‚¤ãƒ€ãƒ«åœã«ãŠã‘ã‚‹å›³å¼è¨ˆç®—ã‚’ç›´æ„Ÿçš„ã‹ã¤åŠ¹çŽ‡çš„ã«æç”»ã™ã‚‹ãŸã‚ã«è¨­è¨ˆã•ã‚ŒãŸ\LaTeX ãƒ‘ãƒƒã‚±ãƒ¼ã‚¸ã§ã‚ã‚‹. 
  ç‰¹ã«, åœè«–çš„æ‰‹æ³•ãŒé‡è¦ãªå½¹å‰²ã‚’æžœãŸã™é‡å­è«–, ãƒˆãƒãƒ­ã‚¸ã‚«ãƒ«é‡å­è¨ˆç®—, åŠã³é–¢é€£åˆ†é‡Žã«ãŠã‘ã‚‹å›³å¼çš„æŽ¨è«–ã®å¯è¦–åŒ–ã‚’æ”¯æ´ã™ã‚‹. 
  æœ¬ãƒ‘ãƒƒã‚±ãƒ¼ã‚¸ã¯\tikzname\cite{tikz-manual} ã‚’åŸºç›¤ã¨ã—ã¦ãŠã‚Š, ã‚·ãƒ³ãƒ—ãƒ«ãªã‚³ãƒžãƒ³ãƒ‰ã«ã‚ˆã£ã¦è¤‡é›‘ãªå›³å¼ã‚’å®¹æ˜“ã«æç”»ã§ãã‚‹. 
\end{abstract}

\tableofcontents

\section{å°Žå…¥}
æœ¬ç¨¿ã§ã¯, \qworldname ãƒ‘ãƒƒã‚±ãƒ¼ã‚¸ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«æ–¹æ³•, åŸºæœ¬çš„ãªä½¿ç”¨æ³•, å¿œç”¨ä¾‹ã‚’ä½“ç³»çš„ã«è§£èª¬ã™ã‚‹. 
\qworldname ã¯, ãƒ¢ãƒŽã‚¤ãƒ€ãƒ«åœã«åŸºã¥ãå›³å¼è¨€èªžã®çµ„ç‰ˆã«ç‰¹åŒ–ã—ãŸ\LaTeX ãƒ‘ãƒƒã‚±ãƒ¼ã‚¸ã§ã‚ã‚Š, 
ãƒ¢ãƒŽã‚¤ãƒ€ãƒ«åœ, ãƒ•ãƒ­ãƒ™ãƒ‹ã‚¦ã‚¹æ§‹é€&nbsp;, çµ„ç´, ãƒ›ãƒƒãƒ—ä»£æ•°, ã‚·ãƒ³ãƒ¡ãƒˆãƒªãƒ¼, åŒå¯¾æ€§, ãƒ”ãƒœã‚¿ãƒ«æ§‹é€&nbsp;, ãƒ€ã‚¬ãƒ¼ãªã©, å¤šå²ã«ã‚ãŸã‚‹åœè«–çš„æ¦‚å¿µã‚’å›³å¼è¡¨ç¾ã™ã‚‹ãŸã‚ã®ç›´æ„Ÿçš„ãªã‚³ãƒžãƒ³ãƒ‰ã‚»ãƒƒãƒˆã‚’æä¾›ã™ã‚‹.  

\section{åŸºæœ¬çš„ãªä½¿ã„æ–¹}
\subsection{åŸºæœ¬è¦ç´&nbsp;}
\qworldname ãƒ‘ãƒƒã‚±ãƒ¼ã‚¸ã®ã®æœ€ã‚‚åŸºæœ¬çš„ãªã‚³ãƒžãƒ³ãƒ‰ã‚’ä»¥ä¸‹ã«ç¤ºã™. 
ã“ã‚Œã‚‰ã¯å›³å¼ã‚’æç”»ã™ã‚‹ãŸã‚ã®åŸºç¤Žã¨ãªã‚‹. 
\begin{itemize}
  \item \showcmd{q}: å›³ã®ç´&nbsp;å­ã‚’é…ç½®ã™ã‚‹ãŸã‚ã®ã‚­ãƒ£ãƒ³ãƒã‚¹.
  \item \showcmd{qbox}: ãƒœãƒƒã‚¯ã‚¹\q[scale=0.5]{\qbox}ã®æç”».
  \item \showcmd{qwire}: ãƒ¯ã‚¤ãƒ¤ãƒ¼\q[scale=0.5]{\qwire}ã®æç”».
  \item \showcmd{qcirc}: åˆæˆ.
\end{itemize}
  ã“ã‚Œã‚‰ã®ã‚³ãƒžãƒ³ãƒ‰ã¯, ã‚­ãƒ£ãƒ³ãƒã‚¹ã§ã‚ã‚‹\verb|\q{...}|å†…ã«è¨˜è¿°ã™ã‚‹. 
  ä¾‹ãˆã°\verb|\q{\qbox}|ã¨è¨˜è¿°ã™ã‚‹ã¨, ãƒœãƒƒã‚¯ã‚¹\q[scale=0.5]{\qbox}ãŒæç”»ã•ã‚Œã‚‹.\par
  \(\q[scale=0.5]{\qbox}\)ã¨\(\q[scale=0.5]{\qbox}\)ã‚’åˆæˆã™ã‚‹ãŸã‚ã«ã¯, \verb|\qcirc|ã‚’ä½¿ç”¨ã™ã‚‹. 
  ã“ã‚Œã¯æ•°å­¦ã«ãŠã‘ã‚‹åˆæˆ\(g\circ f\) (\verb|\(g\circ f\)|) ã¨ä¼¼ã¦ã„ã‚‹. 
  \begin{codebox}{}{Ex:7812973891217}
    \q{ \qbox \qcirc \qbox }
  \end{codebox}
  ã¾ãŸ, \verb|\qbox| ã‚’ä¸¦ç½®ã™ã‚‹ã¨, æç”»çµæžœã§ã‚‚ãƒœãƒƒã‚¯ã‚¹\(\q[scale=0.5]{\qbox}\)ãŒæ¨ªã«ä¸¦ã¶:
  \begin{codebox}{}{boxs2}
    \q{ \qbox \qbox \qbox }
  \end{codebox}
  \verb|\qcirc| ã‚’ç”¨ã„ã¦è¤‡æ•°ã®ãƒœãƒƒã‚¯ã‚¹ã‚’åˆæˆã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã‚ã‚‹:
  \begin{codebox}{}{boxsbr}
      \q
      {
        \qbox \qbox \qbox
          \qcirc
        \qbox \qbox \qbox
      }
  \end{codebox}
  ãªãŠ, \verb|\n|ã¯\verb|\qcirc|ã¨åŒç¾©ã§ã‚ã‚‹:
  \begin{codebox}{}{boxsn}
    \q
    {
      \qbox \qbox \qbox \n
      \qbox \qbox \qbox
    }
\end{codebox}
\begin{codebox}{}{ex:hopflink}
  \q{
    \qcaprev \qcap          \n
    \qwire   \qbraid \qwire \n
    \qwire   \qbraid \qwire \n
    \qcup    \qcuprev
  }
\end{codebox}
\verb|\qcaprev|ã¯\q[scale=0.6]{\qcaprev}ã‚’, 
\verb|\qcap|ã¯\q[scale=0.6]{\qcap}ã‚’, 
\verb|\qwire|ã¯\q[scale=0.5]{\qwire}ã‚’, 
\verb|\qbraid|ã¯\q[scale=0.5]{\qbraid}ã‚’, 
\verb|\qcup|ã¯\q[scale=0.6]{\qcup}ã‚’, 
\verb|\qcuprev|ã¯\q[scale=0.6]{\qcuprev}ã‚’, å„ã€…æç”»ã™ã‚‹. 
å…¨ä½“ã¨ã—ã¦, ã‚³ãƒžãƒ³ãƒ‰ã®é…ç½®ã®é€šã‚Šã«æç”»ã•ã‚Œã¦ã„ã‚‹ã“ã¨ãŒåˆ†ã‹ã‚‹.\par
\subsection{æ•°å¼ãƒ¢ãƒ¼ãƒ‰}
å›³å¼è¨€èªžã‚’å«ã‚“ã&nbsp;æ•°å¼ã‚’è¨˜è¿°ã™ã‚‹å&nbsp;´åˆã¯, æ•°å¼ãƒ¢ãƒ¼ãƒ‰ã‚’ä½¿ç”¨ã™ã‚‹. 
\begin{CODEBOX}{}{IntroEx}
  \[
    \operatorname{Tr}\left(
      \q{
        \qbraid\n
        \qbraid
      }
    \right)
    =\q{
      \qcap    \qcap             \n
      \qwire   \qbraidinv \qwire \n
      \qwire   \qbraidinv \qwire \n
      \qcuprev \qcuprev
    }
  \]
\end{CODEBOX}

\subsection{ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«}
\qworldname ãƒ‘ãƒƒã‚±ãƒ¼ã‚¸ã®ã‚¹ã‚¿ã‚¤ãƒ«ãƒ•ã‚¡ã‚¤ãƒ«\verb|qworld.sty|ã¯CTANã‹ã‚‰ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰å¯èƒ½ã§ã‚ã‚‹. 
\TeX ã®ãƒ‘ãƒƒã‚±ãƒ¼ã‚¸ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«é…ç½®ã—, 
ãƒ—ãƒªã‚¢ãƒ³ãƒ–ãƒ«ã«ä»¥ä¸‹ã‚’è¨˜è¿°ã™ã‚‹ã“ã¨ã§ä½¿ç”¨å¯èƒ½ã¨ãªã‚‹:
\begin{verbatim}
  \usepackage{qworld}
\end{verbatim}

ä¾å­˜ãƒ‘ãƒƒã‚±ãƒ¼ã‚¸ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã‚ã‚‹:
\begin{itemize}
    \item \tikzname
      \iitem \showcmd[]{cd}
      \iitem \showcmd[]{positioning}
      \iitem \showcmd[]{arrows}
      \iitem \showcmd[]{arrows.meta}
      \iitem \showcmd[]{calc}
      \iitem \showcmd[]{intersections}
      \iitem \showcmd[]{shapes.symbols}
      \iitem \showcmd[]{shapes.geometric}
      \iitem \showcmd[]{shapes.misc}
      \iitem \showcmd[]{decorations.pathreplacing}
      \iitem \showcmd[]{decorations.markings}
      \iitem \showcmd[]{decorations.pathmorphing}
    \item \showcmd[]{pgffor}
    \item \showcmd[]{ifthen}
    \item \showcmd[]{xparse}
    \item \showcmd[]{xfp}
    \item \showcmd[]{xstring}
\end{itemize}
ã“ã‚Œã‚‰ã®ãƒ‘ãƒƒã‚±ãƒ¼ã‚¸ã¯\texlivename ãƒ‡ã‚£ã‚¹ãƒˆãƒªãƒ“ãƒ¥ãƒ¼ã‚·ãƒ§ãƒ³ã«æ¨™æº–ã§å«ã¾ã‚Œã¦ãŠã‚Š, ç‰¹åˆ¥ãªæ‰‹é–“ã‚’ã‹ã‘ã‚‹å¿…è¦ã¯ãªã„. 
\section{åŸºæœ¬çš„ãªã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚º}
æœ¬ç¯€ã§ã¯, \qworldname ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã™ã‚‹æ–¹æ³•ã‚’è§£èª¬ã™ã‚‹.
\subsection{è­˜åˆ¥ç•ªå·}

\verb|\q{...}|å†…ã«é…ç½®ã•ã‚ŒãŸå…¨ã¦ã®ã‚³ãƒžãƒ³ãƒ‰ã«ã¯, å®Ÿè¡Œé&nbsp;†ã«åŸºã¥ã„ã¦è‡ªå‹•çš„ã«å›ºæœ‰ã®è­˜åˆ¥ç•ªå·ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã‚‹. 
ä¾‹ãˆã°, å…ˆã®ä¾‹ \ref{boxsn} ã§ã¯å„\verb|\qbox|ã«ç•ªå·ãŒæŒ¯ã‚‰ã‚Œã‚‹:
\[\q{\qloop[2]{\qloop[3]{\qbox[show id={true}]}\n}}\]
è©³ç´°ã¯, \pageref{subsub:show id}ãƒšãƒ¼ã‚¸ã®\ref{subsub:show id}é&nbsp;…ã‚’å‚ç…§ã›ã‚ˆ.

\subsection{ãƒã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ãƒœãƒƒã‚¯ã‚¹}

\[\q{
  \qcaprev \qcap           \n
  \qwire   \qbraid  \qwire \n
  \qwire   \qbraid \qwire \n
  \qcup    \qcuprev
  \qbb[red][1,2]
    \bbsymbol{Measure}
    \bbsymbol[W]{Output}[left]
    \bbsymbol[NW]{Computation}[above left]
    \bbsymbol[NE]{Physics}[above right]
  \qbb[yellow][3,5,6,8]
    \bbsymbol{Braid}
    \bbsymbol[W]{Compute}[left]
  \qbb[cyan][9,10]
    \bbsymbol{Create}
    \bbsymbol[W]{Initialize}[left]
}\]

å„ç´&nbsp;å­ã«ã¯, ãƒã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ãƒœãƒƒã‚¯ã‚¹ãŒä»˜éšã™ã‚‹. 
ä»¥ä¸‹ã«ä¾‹ã‚’ç¤ºã™:
\begin{itemize}
  \item \q{\qcaprev}ã®ãƒã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ãƒœãƒƒã‚¯ã‚¹ã‚’å¯è¦–åŒ–ã™ã‚‹ã¨\q{\qcaprev\qbball}.
  \item \q{\qbraid}ã®ãƒã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ãƒœãƒƒã‚¯ã‚¹ã‚’å¯è¦–åŒ–ã™ã‚‹ã¨\q{\qbraid\qbball}.
  \item \q{\qwire}ã®ãƒã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ãƒœãƒƒã‚¯ã‚¹ã‚’å¯è¦–åŒ–ã™ã‚‹ã¨\q{\qwire\qbball}.
  \item \q{\qcuprev}ã®ãƒã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ãƒœãƒƒã‚¯ã‚¹ã‚’å¯è¦–åŒ–ã™ã‚‹ã¨\q{\qcuprev\qbball}.
\end{itemize}
ãƒã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ãƒœãƒƒã‚¯ã‚¹ã‚’å¯è¦–åŒ–ã™ã‚‹ã‚³ãƒžãƒ³ãƒ‰ã¨, 
å¯è¦–åŒ–ã—ãŸãƒã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ãƒœãƒƒã‚¯ã‚¹è¿‘è¾ºã«ãƒ†ã‚­ã‚¹ãƒˆã‚’ç½®ãã‚³ãƒžãƒ³ãƒ‰ã¯æ¬¡ã®é€šã‚Šã§ã‚ã‚‹:
\begin{itemize}
  \item å¯è¦–åŒ–
    \iitem \showcmd{qbb}: ç‰¹å®šã®ç´&nbsp;å­ã®ãƒã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ãƒœãƒƒã‚¯ã‚¹ã‚’è¡¨ç¤º.
    \iitem \showcmd{qbball}: å…¨ã¦ã®ç´&nbsp;å­ã®ãƒã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ãƒœãƒƒã‚¯ã‚¹ã‚’ä¸€åº¦ã«è¡¨ç¤º.
    \iitem \showcmd{qBBall}: ã‚­ãƒ£ãƒ³ãƒã‚¹å…¨ä½“ã‚’å›²ã‚€ãƒã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ãƒœãƒƒã‚¯ã‚¹ã‚’ã‚’è¡¨ç¤º.
  \item ãƒ†ã‚­ã‚¹ãƒˆã‚’ç½®ã
    \iitem \showcmd{bbsymbol}: ãƒã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ãƒœãƒƒã‚¯ã‚¹ã«ãƒ†ã‚­ã‚¹ãƒˆã‚’é…ç½®.
\end{itemize}

\begin{verbatim}
  \qbb[&lt;è‰²&gt;][&lt;IDåˆ—&gt;]
\end{verbatim}
\begin{itemize}
  \item ç¬¬ä¸€å¼•æ•° (ã‚ªãƒ—ã‚·ãƒ§ãƒ³): è‰²ã‚’æŒ‡å®š. æœªæŒ‡å®šã®å&nbsp;´åˆã¯ç„¡è‰². 
  \item ç¬¬äºŒå¼•æ•°: å¯¾è±¡ã¨ãªã‚‹ç´&nbsp;å­ã®è­˜åˆ¥ç•ªå·ã®ãƒªã‚¹ãƒˆã‚’æŒ‡å®šã—, ãã‚Œã‚‰ã‚’å«ã‚€ãƒã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ãƒœãƒƒã‚¯ã‚¹ã‚’è¡¨ç¤º.
\end{itemize}
\begin{codebox}{}{Ex:7812973891220}
  \q{\qbox\qbb[1]}
\end{codebox}
\begin{codebox}{}{ex:78129738912270454}
  \q{
    \qcaprev \qcap          \n
    \qwire   \qbraid \qwire \n
    \qwire   \qbraid \qwire \n
    \qcup    \qcuprev
    \qbb[4,7]
  }
\end{codebox}
\begin{CODEBOX}{}{Ex:7812973891221}
  \q{\qbox\qbox\qbox\qbox\qbox\qbox\qbb[yellow][2,...,5]}
\end{CODEBOX}
\begin{codebox}{}{Ex:74839722}
  \q
  {
    \qbox\qbox\qbox\n
    \qbox\qbox\qbox
    \qbb[green][2,5]
  }
\end{codebox}
\begin{codebox}{}{Ex:7812973891218}
  \q{
    \qcaprev \qcap          \n
    \qwire   \qbraid \qwire \n
    \qwire   \qbraid \qwire \n
    \qcup    \qcuprev
    \qbb[blue][4,7]
  }
\end{codebox}
\begin{verbatim}
  \qbball[&lt;è‰²&gt;]
\end{verbatim}
è¤‡æ•° (ä¸€å€‹ã§ã‚‚è‰¯ã„ãŒ) ã®ãƒã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ãƒœãƒƒã‚¯ã‚¹ã‚’ä¸€åº¦ã«å¯è¦–åŒ–ã™ã‚‹. 
\begin{codebox}[center lower,listing side text,righthand width=5cm,bicolor,colbacklower=white]{}{Ex:78129738912270511}
  \q{
    \qcaprev \qcap          \n
    \qwire   \qbraid \qwire \n
    \qwire   \qbraid \qwire \n
    \qcup    \qcuprev
    \qbball
  }
\end{codebox}
å„ç´&nbsp;å­ã®ãƒã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ãƒœãƒƒã‚¯ã‚¹ãŒé‡ãªã‚‹ã“ã¨ãªãçµ„ã¿åˆã£ã¦ã„ã‚‹ã“ã¨ãŒåˆ¤ã‚‹. 
\qworldname ãƒ‘ãƒƒã‚±ãƒ¼ã‚¸ã¯, å›³å¼æç”»ã«ä¼´ã†\textbf{ç´°ã‹ãé¢å€’ãªåº§æ¨™è¨­å®šã®å¤šãã‚’çœç•¥ã§ãã‚‹}.

\begin{verbatim}
  \qBBall[&lt;è‰²&gt;]
\end{verbatim}
ã‚­ãƒ£ãƒ³ãƒã‚¹å†…ã®å…¨ç´&nbsp;å­ã‚’å›²ã‚€ãƒã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ãƒœãƒƒã‚¯ã‚¹ã‚’è¡¨ç¤ºã™ã‚‹. 
\begin{codebox}[center lower,listing side text,righthand width=5cm,bicolor,colbacklower=white]{}{Ex:7812973891216}
  \q{
    \qcaprev \qcap          \n
    \qwire   \qbraid \qwire \n
    \qwire   \qbraid \qwire \n
    \qcup    \qcuprev
    \qBBall
  }
\end{codebox}
\begin{verbatim}
  \bbsymbol[&lt;æ–¹è§’&gt;]{&lt;text&gt;}[&lt;ã‚ªãƒ—ã‚·ãƒ§ãƒ³&gt;]
\end{verbatim}
ç›´å‰ã®ãƒã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ãƒœãƒƒã‚¯ã‚¹ã«ãƒ†ã‚­ã‚¹ãƒˆã‚’é…ç½®ã™ã‚‹. 
\begin{itemize}
  \item ç¬¬ä¸€å¼•æ•° (ã‚ªãƒ—ã‚·ãƒ§ãƒ³): \showcmd[]{N} (åŒ—), \showcmd[]{S} (å—), \showcmd[]{E} (æ±), \showcmd[]{S} (è¥¿), \showcmd[]{NW} (åŒ—è¥¿), \showcmd[]{NE} (åŒ—æ±), \showcmd[]{SE} (å—æ±), \showcmd[]{SW} (å—è¥¿) ã®ã„ãšã‚Œã‹ã‚’æŒ‡å®š. ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯\showcmd[]{E}.
  \item ç¬¬äºŒå¼•æ•°: é…ç½®ã™ã‚‹ãƒ†ã‚­ã‚¹ãƒˆ.
  \item ç¬¬ä¸‰å¼•æ•° (ã‚ªãƒ—ã‚·ãƒ§ãƒ³): ä½ç½®èª¿æ•´ (ä¾‹: \showcmd[]{above}, \showcmd[]{below}, \showcmd[]{left}, \showcmd[]{right}). ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯\showcmd[]{right}.
\end{itemize}
\begin{CODEBOX}{}{Ex:bbsymbol}
  \q[scale=5]{
    \qbox
    \qbb[1]
    \bbsymbol{æ± (ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆ)}
    \bbsymbol[W]{è¥¿}[left]
    \bbsymbol[N]{åŒ—}[above]
    \bbsymbol[S]{å—}[below]
    \bbsymbol[NE]{åŒ—æ±}[above right]
    \bbsymbol[NW]{åŒ—è¥¿}[above left]
    \bbsymbol[SE]{å—æ±}[below right]
    \bbsymbol[SW]{å—è¥¿}[below left]
    \bbsymbol[C]{é‡å¿ƒ}[]
  }
\end{CODEBOX}
\begin{CODEBOX}{}{Ex:7812973891215}
  \q
  {
    \qcaprev \qcap          \n
    \qwire   \qbraid \qwire \n
    \qwire   \qbraid \qwire \n
    \qcup    \qcuprev
    \qbb[red][1,2]
      \bbsymbol{Measure}
      \bbsymbol[W]{Output}[left]
      \bbsymbol[NW]{Computation}[above left]
      \bbsymbol[NE]{Physics}[above right]
    \qbb[yellow][3,5,6,8]
      \bbsymbol{Braid}
      \bbsymbol[W]{Compute}[left]
    \qbb[cyan][9,10]
      \bbsymbol{Create}
      \bbsymbol[W]{Initialize}[left]
  }
\end{CODEBOX}
\subsection{ãƒœãƒƒã‚¯ã‚¹ã®ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚º}
\label{subsec:boxcustomization}
ã‚­ãƒ¼ã‚’ä½¿ã„, ãƒœãƒƒã‚¯ã‚¹ã®çµŒç·šã®æ•°ã‚„é…ç½®ã‚’èª¿æ•´ã§ãã‚‹. 
ä¾‹ãˆã°ä»¥ä¸‹ã®ã‚ˆã†ãªãƒœãƒƒã‚¯ã‚¹ãŒæç”»å¯èƒ½ã§ã‚ã‚‹:
\begin{itemize}
  \item \(\q[scale=0.5]{\qbox[p=20,hlen=3]}\)
  \item \(\q[scale=0.5]{\qbox[p=10,N={1,2,3,8,9,10},S={4,5,6,7},hlen=3]}\)
\end{itemize}
ã“ã‚Œã‚‰ã®ã‚­ãƒ¼ã¯ãƒ¯ã‚¤ãƒ¤ãƒ¼ä»¥å¤–ã®å¤šãã®ç´&nbsp;å­ã«ã‚‚é©ç”¨å¯èƒ½ã§ã‚ã‚‹. 
ä¸»è¦ãªã‚­ãƒ¼ã¯ä»¥ä¸‹ã®é€šã‚Š:
\begin{itemize}
  \item \showcmd[]{n}
      \iitem ãƒœãƒƒã‚¯ã‚¹\(\q[scale=0.5]{\qbox[p=2, P={}]}\)ã®åŒ—ç¸ã«ãŠã„ã¦çµŒç·š\q[scale=0.31]{\qwire}ã‚’ç”Ÿã‚„ã™ã“ã¨ãŒã§ãã‚‹ç‚¹ (ã“ã®ã‚ˆã†ãªç‚¹ã‚’\showcmd[]{n}ç«¯å­ã¨å‘¼ã¶ã“ã¨ã¨ã™ã‚‹) ã®æ•°. 
      \iitem ä¾‹ãˆã° \showcmd[]{n=3}ã¨ã™ã‚Œã°, ãƒœãƒƒã‚¯ã‚¹ã®åŒ—ç¸ã« \(3\) ç‚¹ç­‰é–“éš”ã«æ‰“ã¤ã“ã¨ãŒã§ãã‚‹.
      \iitem ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯ \showcmd[]{n=1}.
      \iitem \showcmd[]{n}ç«¯å­ã‚’æœ€åŒ—ç«¯ã¾ã§åž‚ç›´ç§»å‹•ã•ã›ãŸç‚¹ã‚’\showcmd[]{N}ç«¯å­ã¨å‘¼ã¶. 
      \iitem \showcmd[]{n}ç«¯å­åŠã³\showcmd[]{N}ç«¯å­ã¯è¥¿ (å·¦) ã‹ã‚‰é&nbsp;†ã«\(1,2,...\)ã¨æ·»ãˆå­—ä»˜ã‘ã‚‰ã‚Œã‚‹.
      \iitem \(i\)ç•ªç›®ã®\showcmd[]{n}ç«¯å­ã«çµŒç·šã‚’ç”Ÿã‚„ã™ã¨ã¯, \(i\)ç•ªç›®ã®\showcmd[]{n}ç«¯å­ã¨\(i\)ç•ªç›®ã®\showcmd[]{N}ç«¯å­ã‚’ç·šåˆ†ã§çµã¶ã“ã¨ã‚’ã„ã†.
  \item \showcmd[]{N}
      \iitem çµŒç·šã‚’å®Ÿéš›ã«ç”Ÿã‚„ã™\showcmd[]{n}ç«¯å­ã®æ·»ãˆå­—ã®é›†åˆ.
      \iitem ä¾‹ãˆã° \showcmd[]{n=3}ã¨ã—ãŸä¸Šã§\showcmd[]{N=\{2\}}ã¨ã™ã‚Œã°, \(3\)ç‚¹ã®ã†ã¡\(2\)ç•ªç›®ã®\showcmd[]{n}ç«¯å­ã«çµŒç·šã‚’ç”Ÿã‚„ã™ã“ã¨ãŒã§ãã‚‹.
      \iitem \showcmd[]{n}ãŒæœªæŒ‡å®šã§, \showcmd[]{N}ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹ã¨ãã¯, è‡ªå‹•ã§ \(\showcmd[]{n}\coloneq\max\showcmd[]{N}\) ã¨ãªã‚‹. 
      \iitem \showcmd[]{N}ãŒæœªæŒ‡å®šã§, \showcmd[]{n}ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹ã¨ãã¯, è‡ªå‹•ã§ \(\showcmd[]{N}\coloneq\{1,...,\showcmd[]{n}\}\) ã¨ãªã‚‹. 
      \iitem \showcmd[]{n}ç«¯å­ã‹ã‚‰å®Ÿéš›ã«ç”ŸãˆãŸçµŒç·šã®æœ€åŒ—ç«¯ã‚’å‡ºåŠ›ç‚¹, ã‚ã‚‹ã„ã¯\showcmd[]{O}ç«¯å­ã¨å‘¼ã¶ã“ã¨ã¨ã™ã‚‹.
  \item \showcmd[]{s}
      \iitem ãƒœãƒƒã‚¯ã‚¹ã®å—ç¸ã«ãŠã„ã¦çµŒç·šã‚’ç”Ÿã‚„ã™ã“ã¨ãŒã§ãã‚‹ç‚¹ (ã“ã®ã‚ˆã†ãªç‚¹ã‚’\showcmd[]{s}ç«¯å­ã¨å‘¼ã¶ã“ã¨ã¨ã™ã‚‹) ã®æ•°. 
      \iitem ä¾‹ãˆã° \showcmd[]{s=4}ã¨ã™ã‚Œã°, ãƒœãƒƒã‚¯ã‚¹ã®å—ç¸ã«\(4\)ç‚¹ç­‰é–“éš”ã«æ‰“ã¤ã“ã¨ãŒã§ãã‚‹.
      \iitem ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯\showcmd[]{s=1}. 
      \iitem \showcmd[]{s}ç«¯å­ã‚’æœ€å—ç«¯ã¾ã§åž‚ç›´ç§»å‹•ã•ã›ãŸç‚¹ã‚’\showcmd[]{S}ç«¯å­ã¨å‘¼ã¶. 
      \iitem \showcmd[]{s}ç«¯å­åŠã³\showcmd[]{S}ç«¯å­ã¯è¥¿ (å·¦) ã‹ã‚‰é&nbsp;†ã«\(1,2,...\)ã¨æ·»ãˆå­—ä»˜ã‘ã‚‰ã‚Œã‚‹.
      \iitem \(i\)ç•ªç›®ã®\showcmd[]{s}ç«¯å­ã«çµŒç·šã‚’ç”Ÿã‚„ã™ã¨ã¯, \(i\)ç•ªç›®ã®\showcmd[]{s}ç«¯å­ã¨\(i\)ç•ªç›®ã®\showcmd[]{S}ç«¯å­ã‚’ç·šåˆ†ã§çµã¶ã“ã¨ã‚’ã„ã†.
  \item \showcmd[]{S}
      \iitem çµŒç·šã‚’å®Ÿéš›ã«ç”Ÿã‚„ã™\showcmd[]{s}ç«¯å­ã®æ·»ãˆå­—ã®é›†åˆ.
      \iitem ä¾‹ãˆã° \showcmd[]{s=4}ã¨ã—ãŸä¸Šã§ \showcmd[]{S=\{1,4\}} ã¨ã™ã‚Œã°,  \(4\)ç‚¹ã®ã†ã¡\(1\)ç•ªç›®ã¨\(4\)ç•ªç›®ã®ç‚¹ã«çµŒç·šã‚’ç”Ÿã‚„ã™ã“ã¨ãŒã§ãã‚‹.
      \iitem \showcmd[]{s}ãŒæœªæŒ‡å®šã§, \showcmd[]{S}ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹ã¨ãã¯, è‡ªå‹•ã§ \(\showcmd[]{s}\coloneq\max \showcmd[]{S}\) ã¨ãªã‚‹. 
      \iitem \showcmd[]{S}ãŒæœªæŒ‡å®šã§, \showcmd[]{s}ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹ã¨ãã¯, è‡ªå‹•ã§ \(\showcmd[]{S}\coloneq\{1,...,\showcmd[]{s}\}\) ã¨ãªã‚‹.
      \iitem \showcmd[]{s}ç«¯å­ã‹ã‚‰å®Ÿéš›ã«ç”ŸãˆãŸçµŒç·šã®æœ€å—ç«¯ã‚’å…¥åŠ›ç‚¹, ã‚ã‚‹ã„ã¯\showcmd[]{I}ç«¯å­ã¨å‘¼ã¶ã“ã¨ã¨ã™ã‚‹.
  \item \showcmd[]{hlen}
      \iitem æ°´å¹³æ–¹å‘ã®ãƒã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ãƒœãƒƒã‚¯ã‚¹ã®é•·ã•.
      \iitem ä¾‹ãˆã°\showcmd[]{hlen=2}ã¨ã™ã‚Œã°, æ°´å¹³æ–¹å‘ã®ãƒã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ãƒœãƒƒã‚¯ã‚¹ã®é•·ã•ãŒ\(2\)ã¨ãªã‚‹. 
      \iitem å”¯ä¸€ã¤ã®ä¾‹å¤–ã‚’é™¤ã„ã¦, æœ€è¥¿ç«¯ã®çµŒç·šã¨ãƒã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ãƒœãƒƒã‚¯ã‚¹ã®å¢ƒç•Œç·šã¨ã®è·é›¢, æœ€æ±ç«¯ã®çµŒç·šã¨ãƒã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ãƒœãƒƒã‚¯ã‚¹ã®å¢ƒç•Œç·šã¨ã®è·é›¢ã¯ã¨ã‚‚ã«\(\fpeval{0.5}\)ã§ã‚ã‚‹. 
      \iitem \showcmd[]{hlen}ãŒæœªæŒ‡å®šã§ã‚ã‚‹ã¨ã, \showcmd[]{n}ç«¯å­åŠã³\showcmd[]{s}ç«¯å­ã¯, é–“éš”ã‚’\(1\)ã«ä¿ã£ã¦ä¸¦ã¹ã‚‰ã‚Œã‚‹. 
      \iitem \showcmd[]{hlen}ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹ã¨ã, \showcmd[]{n}ç«¯å­åŠã³\showcmd[]{s}ç«¯å­ã¯, é•·ã•\(\showcmd[]{hlen}-1\)ã®åŒºé–“ã‚’ç­‰é–“éš”ã«ä¸¦ã¹ã‚‰ã‚Œã‚‹. ã“ã®ã¨ãã®ç«¯å­ã®é–“éš”ã¯\showcmd[]{hlen}åŠã³ç«¯å­ã®æ•°ã«ä¾å­˜ã™ã‚‹. 
          \iiitem ç«¯å­ã®æ•°ãŒ\(1\)ã¤ã§ã‚ã‚‹ã¨ãã¯, åŒºé–“ã®ä¸­å¿ƒã«ç½®ã‹ã‚Œã‚‹. ã“ã®ã¨ã, \(\showcmd[]{hlen}&gt;1\) ã§ã‚ã‚‹ãªã‚‰ã°, æœ€è¥¿ç«¯ã®çµŒç·šã¨ãƒã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ãƒœãƒƒã‚¯ã‚¹ã®å¢ƒç•Œç·šã¨ã®è·é›¢, åŠã³æœ€æ±ç«¯ã®çµŒç·šã¨ãƒã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ãƒœãƒƒã‚¯ã‚¹ã®å¢ƒç•Œç·šã¨ã®è·é›¢ã¯ã¨ã‚‚ã«\(\frac{\showcmd[]{hlen}}{2}&gt;\fpeval{0.5}\)ã§ã‚ã‚‹. 
  \item \showcmd[]{vlen}
      \iitem åž‚ç›´æ–¹å‘ã®ãƒã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ãƒœãƒƒã‚¯ã‚¹ã®é•·ã• (é«˜ã•).
      \iitem ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯ \showcmd[]{vlen=1}. 
  \item \showcmd[]{id}
      \iitem ãƒœãƒƒã‚¯ã‚¹ã®è­˜åˆ¥å­. 
      \iitem ä¾‹ãˆã°\showcmd[]{id=ID}ã¨ã™ã‚Œã°, ã“ã“ã¾ã§ç™»å&nbsp;´ã—ãŸæ§˜ã€…ãªç‚¹ã«æ¬¡ã®ã‚ˆã†ãªåå‰ãŒè‡ªå‹•çš„ã«ä»˜ã‘ã‚‰ã‚Œã‚‹:
          \iiitem (è¥¿ã‹ã‚‰æ•°ãˆã¦) \(i\)ç•ªç›®ã®\showcmd[]{n}ç«¯å­: (n-\(i\)-ID)
          \iiitem \(i\)ç•ªç›®ã®\showcmd[]{s}ç«¯å­: (s-\(i\)-ID)
          \iiitem \(i\)ç•ªç›®ã®\showcmd[]{n}ç«¯å­ã‚’ãƒœãƒƒã‚¯ã‚¹ã®åŒ—ç¸ã¸åž‚ç›´ç§»å‹•ã•ã›ãŸç‚¹: (N-\(i\)-ID)
          \iiitem \(i\)ç•ªç›®ã®\showcmd[]{s}ç«¯å­ã‚’ãƒœãƒƒã‚¯ã‚¹ã®å—ç¸ã¸åž‚ç›´ç§»å‹•ã•ã›ãŸç‚¹: (S-\(i\)-ID)
          \iiitem ãƒã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ãƒœãƒƒã‚¯ã‚¹ã®æœ€åŒ—è¥¿ç«¯: (NW-ID)
          \iiitem ãƒã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ãƒœãƒƒã‚¯ã‚¹ã®æœ€åŒ—æ±ç«¯: (NE-ID)
          \iiitem ãƒã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ãƒœãƒƒã‚¯ã‚¹ã®æœ€å—è¥¿ç«¯: (SW-ID)
          \iiitem ãƒã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ãƒœãƒƒã‚¯ã‚¹ã®æœ€å—æ±ç«¯: (SE-ID)
          \iiitem ãƒã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ãƒœãƒƒã‚¯ã‚¹ã®æœ€åŒ—ç«¯: (N-ID)
          \iiitem ãƒã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ãƒœãƒƒã‚¯ã‚¹ã®æœ€å—ç«¯: (S-ID)
          \iiitem ãƒã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ãƒœãƒƒã‚¯ã‚¹ã®æœ€è¥¿ç«¯: (W-ID)
          \iiitem ãƒã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ãƒœãƒƒã‚¯ã‚¹ã®æœ€æ±ç«¯: (E-ID)
          \iiitem ãƒã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ãƒœãƒƒã‚¯ã‚¹ã®é‡å¿ƒ: (C-ID)
          \iiitem ãƒœãƒƒã‚¯ã‚¹ã®æœ€åŒ—è¥¿ç«¯: (nw-ID)
          \iiitem ãƒœãƒƒã‚¯ã‚¹ã®æœ€åŒ—æ±ç«¯: (ne-ID)
          \iiitem ãƒœãƒƒã‚¯ã‚¹ã®æœ€å—è¥¿ç«¯: (sw-ID)
          \iiitem ãƒœãƒƒã‚¯ã‚¹ã®æœ€å—æ±ç«¯: (se-ID)
          \iiitem ãƒœãƒƒã‚¯ã‚¹ã®æœ€åŒ—ç«¯: (n-ID)
          \iiitem ãƒœãƒƒã‚¯ã‚¹ã®æœ€å—ç«¯: (s-ID)
          \iiitem ãƒœãƒƒã‚¯ã‚¹ã®æœ€è¥¿ç«¯: (w-ID)
          \iiitem ãƒœãƒƒã‚¯ã‚¹ã®æœ€æ±ç«¯: (e-ID)
          \iiitem \(i\) ç•ªç›®ã®å‡ºåŠ›ç‚¹: (O-\(i\)-ID)
          \iiitem \(i\) ç•ªç›®ã®å…¥åŠ›ç‚¹: (I-\(i\)-ID)
      \iitem æŒ‡å®šã®æœ‰ç„¡ã«ã‹ã‹ã‚ã‚‰ãš, \showcmd{q\{...\}}å†…ã«ç½®ã‹ã‚ŒãŸå„ã‚³ãƒžãƒ³ãƒ‰ã«ã¯è­˜åˆ¥ç•ªå·ãŒæŒ¯ã‚‰ã‚Œã¦ã„ã‚‹. å„ã€…\showcmd[]{ID}éƒ¨åˆ†ã‚’ãã®ç•ªå·ã«ç½®ãæ›ãˆã¦ã‚‚åŒã˜ç‚¹ã‚’è¡¨ã™. è©³ç´°ã¯ \ref{subsub:show id} é&nbsp;…ã‚’ç¢ºèªã•ã‚ŒãŸã—. 
    \item \showcmd[]{p}, \showcmd[]{P}
        \iitem æ­£æ•´æ•°\showcmd[]{k}ã«å¯¾ã—ã¦, \showcmd[]{p=k}ã¯\showcmd[]{n=k}, \showcmd[]{s=k}ã‚’æ„å‘³ã™ã‚‹. 
        \iitem æ­£æ•´æ•°ã®æœ‰é™é›†åˆ\showcmd[]{K}ã«å¯¾ã—ã¦, \showcmd[]{P=K}ã¯\showcmd[]{N=K}, \showcmd[]{S=K}ã‚’æ„å‘³ã™ã‚‹. 
    \item \showcmd[]{name}
        \iitem \showcmd[]{name=&lt;text&gt;} ã«ã‚ˆã‚Š, ãƒœãƒƒã‚¯ã‚¹ã®é‡å¿ƒã«\showcmd[]{&lt;text&gt;}ãŒç½®ã‹ã‚Œã‚‹. 
\end{itemize}
\begin{CODEBOX}{}{ex:boxpoints}
  \def\pradius{0.4pt}
  \q[scale=5]
  {
    \qbox
    [
      n=3,N={2},
      s=4,S={1,4},
      hlen=2,
      vlen=2,
      id={ID},
      name={é‡å¿ƒ (C-ID)}
    ]\n
    \qbb[ID]
    \node [above] at (NE-ID) {NE-ID};
    \node [above] at (NW-ID) {NW-ID};
    \node [below] at (SE-ID) {SE-ID};
    \node [below] at (SW-ID) {SW-ID};
    \fill (NE-ID) circle (\pradius);
    \fill (NW-ID) circle (\pradius);
    \fill (SE-ID) circle (\pradius);
    \fill (SW-ID) circle (\pradius);
    \node [above] at (ne-ID) {ne-ID};
    \node [above] at (nw-ID) {nw-ID};
    \node [below] at (se-ID) {se-ID};
    \node [below] at (sw-ID) {sw-ID};
    \fill (ne-ID) circle (\pradius);
    \fill (nw-ID) circle (\pradius);
    \fill (se-ID) circle (\pradius);
    \fill (sw-ID) circle (\pradius);
    \foreach\i in {1,...,3}
    {
      \symboln[\i]{n-\i-ID}[below]
      \fill (n-\i-ID) circle (\pradius);
      \symbolN[\i]{N-\i-ID}
      \fill (N-\i-ID) circle (\pradius);
    }
    \foreach\i in {1,...,4}
    {
      \symbols[\i]{s-\i-ID}[above]
      \fill (s-\i-ID) circle (\pradius);
      \symbolS[\i]{S-\i-ID}[below]
      \fill (S-\i-ID) circle (\pradius);
    }
    \draw[line width=0.2pt] (NW-ID) 
      to [bend left=60] node [fill=white, midway] {hlen} (NE-ID);
    \draw[line width=0.2pt] (NW-ID) 
      to [bend right=60] node [fill=white, midway] {vlen} (SW-ID);
    \draw [red, &lt;-&gt;] (C-ID -| W-ID)
      -- node [midway, auto, font=\footnotesize] {0.5} (C-ID -| S-1-ID);
    \draw [red, &lt;-&gt;] (C-ID -| S-4-ID)
      -- node [midway, auto, font=\footnotesize] {0.5} (C-ID -| E-ID);
    \qwire[arrowtype={loosely dotted}, dom={s-1-ID}, cod={n-1-ID}]
    \qwire[arrowtype={loosely dotted}, dom={s-4-ID}, cod={n-3-ID}]
    \node (O1prime) at ([shift={(0.25,0.25)}]O-1-ID){O-1-ID};
    \draw[-&gt;,red] (O1prime) to ([shift={(0.05,0.05)}]O-1-ID);
    \node (I1prime) at ([shift={(0.5,-0.5)}]I-1-ID){I-1-ID};
    \node (I2prime) at ([shift={(0.5,-0.5)}]I-2-ID) {I-2-ID};
    \draw[-&gt;,red](I1prime) to ([shift={(0.05,-0.05)}]I-1-ID);
    \draw[-&gt;,red](I2prime) to ([shift={(0.05,-0.05)}]I-2-ID);
  }
\end{CODEBOX}
\verb|\qwire|ã®\verb|arrowtype|ã‚­ãƒ¼ã¨\verb|dom|, \verb|cod|ã‚­ãƒ¼ã¯
\pageref{subsec:wirecustomization}ãƒšãƒ¼ã‚¸ã®\ref{subsec:wirecustomization}é&nbsp;…ã«ã¦èª¬æ˜Žã™ã‚‹. 
\paragraph{ãƒ©ãƒ™ãƒ« (\showcmd{symbol})}
\begin{verbatim}
  \symbolI[&lt;ç•ªå·&gt;]{&lt;label&gt;}[&lt;ã‚ªãƒ—ã‚·ãƒ§ãƒ³&gt;]
\end{verbatim}
ä¾‹ãˆã°, \verb|\symbolI[2]{text}[below right, id=&lt;ID&gt;]| ã«ã‚ˆã‚Š, 
\verb|\q{\qbox[p=3, id=ID]}| (\(\q[scale=0.5]{\qbox[p=3, id=ID]}\)) ã®\(2\)ç•ªç›®ã®å…¥åŠ›ç‚¹ (I-2-ID) ã®å³ä¸‹ã«``text''ãŒç½®ã‹ã‚Œã‚‹. 
ç•ªå·ã¨ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã®æŒ‡å®šã®ãªã„ã¨ãã¯, ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤\(1\), below, \verb|id=&lt;ç›´å‰ã®ã‚‚ã®&gt;| ãŒå„ã€…é©ç”¨ã•ã‚Œã‚‹. 
ä»–ã«ã‚‚ãƒ©ãƒ™ãƒ«è¡¨ç¤ºã‚³ãƒžãƒ³ãƒ‰ã¨ã—ã¦, 
\begin{verbatim}
  \symbolS[&lt;ç•ªå·&gt;]{&lt;label&gt;}[&lt;ã‚ªãƒ—ã‚·ãƒ§ãƒ³&gt;]
\end{verbatim}
\begin{verbatim}
  \symbols[&lt;ç•ªå·&gt;]{&lt;label&gt;}[&lt;ã‚ªãƒ—ã‚·ãƒ§ãƒ³&gt;]
\end{verbatim}
\begin{verbatim}
  \symbolO[&lt;ç•ªå·&gt;]{&lt;label&gt;}[&lt;ã‚ªãƒ—ã‚·ãƒ§ãƒ³&gt;]
\end{verbatim}
\begin{verbatim}
  \symbolN[&lt;ç•ªå·&gt;]{&lt;label&gt;}[&lt;ã‚ªãƒ—ã‚·ãƒ§ãƒ³&gt;]
\end{verbatim}
\begin{verbatim}
  \symboln[&lt;ç•ªå·&gt;]{&lt;label&gt;}[&lt;ã‚ªãƒ—ã‚·ãƒ§ãƒ³&gt;]
\end{verbatim}
ãŒã‚ã‚‹. \verb|\symbolS|, \verb|\symbols|ã¯ãã‚Œãžã‚Œç‚¹ (S-\(i\)-ID), (s-\(i\)-ID) ã«\textless label\textgreater ã‚’ç½®ã. 
ç•ªå·\(i\)ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯ \(1\), ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯ below ã§ã‚ã‚‹. 
\verb|\symbolO|, \verb|\symbolN|, \verb|\symboln| ã¯ãã‚Œãžã‚Œç‚¹ (O-\(i\)-ID), (N-\(i\)-ID), (n-\(i\)-ID) ã«\textless label\textgreater ã‚’ç½®ã. 
ç•ªå·\(i\)ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯ \(1\), ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯ above ã§ã‚ã‚‹. 
\begin{codebox}[center lower,listing side text,righthand width=5cm,bicolor,colbacklower=white]{}{Ex:7812973891211}
  \q{
    \qbox[p=5, S={1,4,5}, id=ID]
    \symbolO{A}
    \symbolN[3]{B}
    \symboln[5]{C}[below left]
    \symbolS[2]{D}
    \symbols[3]{E}
    \symbolI[2]{F}
    \symbolI[3]{G}[below right]
  }
\end{codebox}
\begin{CODEBOX}{}{Ex:7812973891210}
  \q{
    \qbox[p=10,N={1,2,5,6,9,10}, id=ID]
    \foreach\i in {1,...,10}
    {
      \symbolI[\i]{\(x_{\i}\)}
    }
    \foreach\j in {1,...,6}
    {
      \symbolO[\j]{\(y_{\j}\)}
    }
  }
\end{CODEBOX}

\subsection{ç¹°ã‚Šè¿”ã—}
\label{subsub:forloop}
\begin{verbatim}
  \qloop[&lt;å›žæ•°&gt;]{&lt;ã‚³ãƒžãƒ³ãƒ‰&gt;}
\end{verbatim}
\verb|\qloop|ã‚³ãƒžãƒ³ãƒ‰ã‚’ç”¨ã„ã‚Œã°, æŒ‡å®šã—ãŸå›žæ•°ã&nbsp;ã‘ã‚³ãƒžãƒ³ãƒ‰ã‚’ç¹°ã‚Šè¿”ã›ã‚‹:
\begin{CODEBOX}{}{Ex:7812973891205}
  \q{ \qloop[10]{\qbox} }
\end{CODEBOX}
\verb|\qloop|ã‚³ãƒžãƒ³ãƒ‰ã¯\verb|\q|å¤–ã§ã‚‚ä½¿ç”¨å¯èƒ½ã§ã‚ã‚‹:
\begin{CODEBOX}[bicolor,colbacklower=white]{}{Ex:78129738912220930}
  çµè«–ã&nbsp;ã‘, æ›¸ã.\par
  \qloop[20]{å¤±æ•—ã—ãŸ}\par
  ã‚ãŸã—ã¯\qloop[10]{å¤±æ•—ã—ãŸ}
\end{CODEBOX}
\subsection{è­˜åˆ¥ç•ªå·ã®è¡¨ç¤º}
\label{subsub:show id}
\verb|\q{...}| å†…ã®ã‚³ãƒžãƒ³ãƒ‰ã«ã¯è‡ªå‹•çš„ã«è­˜åˆ¥ç•ªå·ãŒä»˜ä¸Žã•ã‚Œã‚‹. 
\showcmd[]{show id=true}ã‚’æŒ‡å®šã™ã‚‹ã¨, ãã‚Œã‚‰ãŒè¡¨ç¤ºã•ã‚Œã‚‹. 
\begin{CODEBOX}{}{Ex:7812973891203}
  \q{
    \qbox[show id={true}] \qbox[show id={true}] \qbox[show id={true}]\n
    \qbox[show id={true}] \qbox[show id={true}] \qbox[show id={true}]
  }
\end{CODEBOX}
\begin{CODEBOX}{}{Ex:7812973891202}
  \q
  {
    \qloop[10]
    {
      \qloop[10]
      {
        \qbox[show id={true}]
      }\n
    }\n
  }
\end{CODEBOX}

\subsection{è‰²}
\label{subsec:color}
ãƒœãƒƒã‚¯ã‚¹ã«ä¸‰ç¨®é¡žã®è‰²å±žæ€§ã‚’æŒ‡å®šã§ãã‚‹: 
\begin{itemize}
  \item \showcmd[]{color}
    \iitem ãƒœãƒƒã‚¯ã‚¹å†…éƒ¨ã®è‰², ä¾‹ãˆã°\showcmd[]{color=green}ã«ã‚ˆã‚Š\q[scale=0.5]{\qbox[color={green}]}
  \item \showcmd[]{frame color}
    \iitem ãƒœãƒƒã‚¯ã‚¹ã®æž&nbsp;ã®è‰², ä¾‹ãˆã°\showcmd[]{frame color=cyan}ã«ã‚ˆã‚Š\q[scale=0.5]{\qbox[frame color={cyan}]}
  \item \showcmd[]{morphism color}
    \iitem ãƒœãƒƒã‚¯ã‚¹å†…ã®å°„ã®è‰², ä¾‹ãˆã°\showcmd[]{morphism colon=red}ã«ã‚ˆã‚Š\q[scale=0.5]{\qbox[morphism color={red}, name={\(f\)}]}
\end{itemize}
\begin{CODEBOX}{}{Ex:74839759}
    \q
    {
      \qbox
      [
        name={\(f\)},
        color=red,
        frame color={green!50!black},
        morphism color=yellow
      ]
    }
\end{CODEBOX}

\subsubsection{çµ„ç´, ã‚·ãƒ³ãƒ¡ãƒˆãƒªãƒ¼, ã‚­ãƒ£ãƒƒãƒ—, ã‚«ãƒƒãƒ—ã®è‰²æŒ‡å®š}
\label{subsubsec:tanglecolor}
çµ„ç´, ã‚·ãƒ³ãƒ¡ãƒˆãƒªãƒ¼, ã‚­ãƒ£ãƒƒãƒ—, ã‚«ãƒƒãƒ—ã¨ã„ã£ãŸä¸€éƒ¨ã®å°„ã¯, å›³å¼ä¸Šã§ã¯ç®±ã§ã¯ãªãæ›²ç·šã¨ã—ã¦æç”»ã•ã‚Œã‚‹. 
ã“ã‚Œã‚‰ã«ã¯æ˜Žç¢ºãªå†…éƒ¨é&nbsp;˜åŸŸãŒå­˜åœ¨ã›ãš, å°„ã®ãƒ©ãƒ™ãƒ«ã‚‚é€šå¸¸ä»˜ã‘ãªã„ãŸã‚, \showcmd[]{color}åŠã³\showcmd[]{morphism color}ã¯é©ç”¨ã•ã‚Œãªã„. 

\paragraph{\showcmd[]{N}, \showcmd[]{S}, ç­‰å·®æ•°åˆ—}
\qworldname ã¯\showcmd[]{pgffor}ãƒ‘ãƒƒã‚±ãƒ¼ã‚¸ã‚’ãƒ­ãƒ¼ãƒ‰ã—ã¦ã„ã‚‹ãŸã‚, ãƒªã‚¹ãƒˆã«å¯¾ã—ã¦\verb|...|ã‚’ç”¨ã„ãŸçœç•¥è¨˜æ³•ãŒä½¿ç”¨ã§ãã‚‹:
\begin{itemize}
  \item \(1,...,10\): å…¬å·®\(1\)ã®ç­‰å·®æ•°åˆ—
  \item \(1,3,...,11\): æœ€åˆã®äºŒé&nbsp;…ã«åŸºã¥ã„ãŸå…¬å·®ã®ç­‰å·®æ•°åˆ—
\end{itemize}
\begin{CODEBOX}{}{Ex:74839758}
   \q{
     \qbox[N={1,...,10}, S={1,3,...,11}]
   }
\end{CODEBOX}
\begin{CODEBOX}{}{Ex:74839757}
  \q{
    \qbox[N={1,...,4,6,8,...,20}, S={1,...,20}, hlen=10]
  }
\end{CODEBOX}
\begin{CODEBOX}{}{Ex:74839756}
  \q{
    \qbox[N={1,...,4,7,10,...,19,20,21,...,25}, S={1,...,25}, hlen=10]
  }
\end{CODEBOX}
\subsection{ç›¸å¯¾åº§æ¨™}
ç´&nbsp;å­ã®ä½ç½®åº§æ¨™ã‚’ç›¸å¯¾çš„ã«æŒ‡å®šã™ã‚‹ã‚³ãƒžãƒ³ãƒ‰ã§ã‚ã‚‹. 
ãªãŠ, \(x\), \(y\) ã¯æ•´æ•°ã§ã‚ã‚‹å¿…è¦ã¯ãªã, \verb|2^1.5|ã‚„\verb|cos(pi)|, \verb|sqrt(2)|ãªã©ã®\verb|\fpeval|ã®è©•ä¾¡å¯èƒ½å¼ã§ã‚ã‚Œã°ã‚ˆã„. 
\begin{itemize}
  \item \showcmd{qmv[\(x\),\(y\)]}
    \iitem (\(x\), \(y\)) ã&nbsp;ã‘ä¸¦è¡Œç§»å‹•ã™ã‚‹.
    \iitem ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§\(x=y=0\).
  \item \showcmd{n[\(y\)]}
    \iitem \(y\)ã&nbsp;ã‘åž‚ç›´é™ä¸‹ã— (\(Y\mapsto Y-y\)), Xåº§æ¨™ã‚’\(0\)ã«ã™ã‚‹.
    \iitem ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ \(y=1\) ã§ã‚ã‚Š, æ”¹è¡Œã®ã‚ˆã†ãªæŒ™å‹•ã‚’ã¿ã›ã‚‹.
  \item \showcmd{qspace[\(x\)]}
    \iitem \(x\) ã&nbsp;ã‘æ°´å¹³ç§»å‹•ã™ã‚‹. 
    \iitem ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ \(x=1\) ã§ã‚ã‚Š, ã‚¹ãƒšãƒ¼ã‚¹ã‚­ãƒ¼ã®ã‚ˆã†ãªæŒ™å‹•ã‚’ã¿ã›ã‚‹.
    \iitem \showcmd{qmv[\(x\),0]} ã¨åŒç¾©ã§ã‚ã‚‹.
  \item \showcmd{qreset[\(x\),\(y\)]}
    \iitem ç‚¹ (\(x\),\(y\)) ã«ç§»å‹•ã™ã‚‹.
\end{itemize}
\[\q[scale=2.35]{
  \fill[blue] (qworldat) circle (1pt);
  \coordinate (I) at (qworldat);
\qbox
  \fill[blue] (qworldat) circle (1pt);
  \coordinate (II) at (qworldat);
\n
  \fill[blue] (qworldat) circle (1pt);
  \coordinate (III) at (qworldat);
\qspace
  \fill[blue] (qworldat) circle (1pt);
  \coordinate (IV) at (qworldat);
\qspace[0.5]
  \fill[blue] (qworldat) circle (1pt);
  \coordinate (V) at (qworldat);
\n[2]
  \fill[blue] (qworldat) circle (1pt);
  \coordinate (VI) at (qworldat);
\qmv[-2,-1]
  \fill[blue] (qworldat) circle (1pt);
  \coordinate (VII) at (qworldat);
\n
  \fill[blue] (qworldat) circle (1pt);
  \coordinate (VIII) at (qworldat);
\qspace[-3]
  \fill[blue] (qworldat) circle (1pt);
  \coordinate (IX) at (qworldat);
\qreset
  \fill[blue] (qworldat) circle (1pt);
  \coordinate (X) at (qworldat);
\qreset[-2,1]
  \fill[blue] (qworldat) circle (1pt);
  \coordinate (XI) at (qworldat); 
\qbball
\qwireup[dom={I}, cod={II},
         label={è‡ªå‹•æ›´æ–°}, label side={below},
         label at={midway}, color=cyan]
\qwireup[dom={II},cod={III},
         label={\showcmd{n}},
         label side={below}, color=cyan]
\qwireup[dom={III},cod={IV},
         label={\showcmd{qspace}},
         label side={below}, color=cyan]
\qwireup[dom={IV},cod={V},
         label={\showcmd{qspace[0.5]}},
         label side={above}, color=cyan]
\qwireup[dom={V},cod={VI},
         label={\showcmd{n[2]}},color=cyan]
\qwireup[dom={VI},cod={VII},
         label={\showcmd{qmv[-2,-1]}},color=cyan]
\qwireup[dom={VII},cod={VIII},
         label={\showcmd{n}},color=cyan]
\qwireup[dom={VIII},cod={IX},
         label={\showcmd{qspace[-3]}}, 
         label side={below},color=cyan]
\qwireup[dom={IX},cod={X},
         label={\showcmd{qreset}},
         label side=left, color=cyan]
\qwireup[dom={X},cod={XI},
         label={\showcmd{qreset[-2,1]}},
         label side=left, 
         label at={near start},
         color=cyan]
\draw[help lines] (-4,-6) grid (2,2);
}\]

\subsection{çµ¶å¯¾åº§æ¨™}
\showcmd[]{at}ã‚­ãƒ¼ã‚’ç”¨ã„ã‚Œã°, çµ¶å¯¾åº§æ¨™ã§ä½ç½®ã‚’æŒ‡å®šã§ãã‚‹. 
\verb|\q{\qbox[at={2,3}]}|ã¯\verb|\q{\qreset[2,3]\qbox}|ã¨åŒç¾©ã§ã‚ã‚‹. 
\begin{CODEBOX}{çµ¶å¯¾åº§æ¨™}{Ex:74839754}
  \q{
    \coordinate (a) at (0,{\fpeval{2*sqrt(3)}});
    \qbox[at=a]
    \qbox[at={-2,0}]
    \qbox[at={2,0}]
    \fill[red] (a) circle (2pt);
    \fill[red] (-2,0) circle (2pt);
    \fill[red] (2,0) circle (2pt);
    \node[below left] at (a) {a};
    \node[below left] at (-2,0) {(-2,0)};
    \node[below left] at (2,0) {(2,0)};
  }
\end{CODEBOX}
\TeX è¨€èªžã¯ãƒãƒ¥ãƒ¼ãƒªãƒ³ã‚°å®Œå…¨ã§ã‚ã‚‹\footnote{ä¾‹ãˆã°, ãƒãƒ¥ãƒ¼ãƒªãƒ³ã‚°ãƒžã‚·ãƒ³ã‚’ã‚·ãƒŸãƒ¥ãƒ¬ãƒ¼ãƒˆã§ãã‚‹ã“ã¨ãŒLiterateProgramsã®ä¾‹ã§ç¤ºã•ã‚Œã¦ã‚‹\cite{literateprograms}. ã¾ãŸ, Overleafã®è¨˜äº‹ã§ã¯, \TeX ã‚’ç”¨ã„ãŸãƒ•ã‚£ãƒœãƒŠãƒƒãƒæ•°åˆ—ã®è¨ˆç®—æ–¹æ³•ãŒç´¹ä»‹ã•ã‚Œã¦ãŠã‚Š, ãã®ãƒãƒ¥ãƒ¼ãƒªãƒ³ã‚°å®Œå…¨æ€§ã®å®Ÿç”¨æ€§ãŒç†è§£ã§ãã‚‹\cite{overleaf}.}. 
ã™ãªã‚ã¡, ã“ã®ä¸–ã«å­˜åœ¨ã™ã‚‹ã‚ã‚‰ã‚†ã‚‹ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ&nbsp;ã¯ \TeX ã§è¨˜è¿°å¯èƒ½ã§ã‚ã‚‹. 
ç‰©ç†ã‚·ãƒŸãƒ¥ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ (å¤©æ°—äºˆå&nbsp;±ã‚„åŒ–å­¦åå¿œäºˆæ¸¬), 
çµŒæ¸ˆã‚·ãƒŸãƒ¥ãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ (æŠ•è³‡æˆ¦ç•¥), 
ã•ã‚‰ã«ã¯äººå·¥çŸ¥èƒ½ã®å­¦ç¿’ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ&nbsp; (ç”»åƒèªè­˜ã‚„è‡ªç„¶è¨€èªžå‡¦ç†) ------.\par
ã©ã‚Œã‚‚\TeX ã§å®Ÿè£…ã§ãã‚‹.\par
ã—ã‹ã—, ãã‚Œã‚’å®Ÿéš›ã«ã‚„ã‚ã†ã¨æ€ã†äººé–“ã¯æžœãŸã—ã¦ã©ã‚Œã»ã©ã„ã‚‹ã&nbsp;ã‚ã†ã‹? 
ç­†è€…ã¯ã‚½ãƒ¼ãƒˆã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ&nbsp;ã§ã™ã‚‰\TeX ã§æ›¸ããŸããªã„. 
ãã‚Œã¯è¡¨è¨ˆç®—ã‚½ãƒ•ãƒˆã§ã‚¹ãƒ¼ãƒ‘ãƒ¼ãƒžãƒªã‚ªã‚’ä½œã‚‹ã‚ˆã†ãªã‚‚ã®ã&nbsp;ã‹ã‚‰ã§ã‚ã‚‹.\par
------ã¨ã“ã‚ãŒ, ã§ã‚ã‚‹.\par
ç­†è€…ã¯``å¤©å•“''ã‚’å—ã‘ãŸ
\footnote{å…ƒãƒã‚¿: 2011å¹´1æœˆ20æ—¥, åŒ¿åæŽ²ç¤ºæ¿4chanã«ãŠã„ã¦``Sleep Sort''ã¨ã„ã†ã‚½ãƒ¼ãƒˆã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ&nbsp;ãŒå…¬é–‹ã•ã‚ŒãŸ\cite{geniussorting,gfxhatena}. ã“ã®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ&nbsp;ã¯\showcmd[]{Bash}ã‚¹ã‚¯ãƒªãƒ—ãƒˆã‚’ç”¨ã„ã¦å„å…¥åŠ›å€¤ã‚’ã‚¹ãƒ¬ãƒƒãƒ‰ã¨ã—ã¦éžåŒæœŸã«å®Ÿè¡Œã—, ãã‚Œãžã‚Œã®ã‚¹ãƒ¬ãƒƒãƒ‰ã®çµ‚äº†ã‚¿ã‚¤ãƒŸãƒ³ã‚° (æŒ‡å®šã•ã‚ŒãŸ``ã‚¹ãƒªãƒ¼ãƒ—''æ™‚é–“) ã‚’ç”¨ã„ã¦ãƒªã‚¹ãƒˆã‚’ã‚½ãƒ¼ãƒˆã™ã‚‹æ‰‹æ³•ã§ã‚ã‚‹.}. 
ãã—ã¦\showcmd[]{at}ã‚­ãƒ¼ã‚’ç”¨ã„ãŸã‚½ãƒ¼ãƒˆã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ&nbsp;ã‚’ä½œã‚Šä¸Šã’ãŸ.
\begin{codebox}{}{Ex:genius}
  \newcommand{\AtSort}[1][1]{
    \q
    {
      \foreach \i in {#1}
      {
        \qbox[name={\i}, at={0, -\i}]\n
      }
    }
  }
  \AtSort[4,1,3,-1,6,2]
\end{codebox}
å‹•ã. ç¢ºã‹ã«å‹•ã.\par
ã&nbsp;ãŒ, ä¸€ã¤å•é¡ŒãŒã‚ã‚‹.\par
\textbf{ãƒªã‚¹ãƒˆã®è¦ç´&nbsp;ã«çµ¶å¯¾å€¤ã®å¤§ããªå€¤ãŒå«ã¾ã‚Œã¦ã„ã‚‹ã¨, å‡ºåŠ›ãŒç´™é¢ã‹ã‚‰ã¯ã¿å‡ºã—ã¦ã—ã¾ã†ã®ã§ã‚ã‚‹}. 

\subsection{ãƒ¯ã‚¤ãƒ¤ãƒ¼ã®ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚º}
\label{subsec:wirecustomization}
\[\q{
    \def\maxn{11}
    \foreach \i in {0,...,\maxn}
    {
        \qwireup[dom={0,0}, cod={{\fpeval{\i*360/(\maxn+1)}}:3}]
        \node at ({\fpeval{\i*360/(\maxn+1)}}:3.6) {\showcmd[]{cod}\i};
    }
}\]
\ref{subsec:boxcustomization} é&nbsp;…ã§ç™»å&nbsp;´ã—ãŸãƒœãƒƒã‚¯ã‚¹\q[scale=0.5]{\qbox}ã®ã‚­ãƒ¼ã®ä¸­ã§, \showcmd[]{id}, \showcmd[]{vlen} ã¯ãƒ¯ã‚¤ãƒ¤ãƒ¼ã§ã‚‚æœ‰åŠ¹ã§ã‚ã‚‹. 
ãƒ¯ã‚¤ãƒ¤ãƒ¼ç‰¹æœ‰ã®ã‚­ãƒ¼ã¨ã—ã¦, åŸºæœ¬çš„ãªã‚‚ã®ã¯æ¬¡ã®é€šã‚Šã§ã‚ã‚‹:
\begin{itemize}
  \item \showcmd[]{dom}: å…¥åŠ›ç‚¹. 
  \item \showcmd[]{cod}: å‡ºåŠ›ç‚¹.
      \iitem ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯\showcmd[]{dom}ã‚’ \(1\) ã&nbsp;ã‘åŒ—ã¸åž‚ç›´ç§»å‹•ã—ãŸä½ç½®. 
  \item \showcmd[]{label}: ãƒ¯ã‚¤ãƒ¤ãƒ¼ã«ãƒ©ãƒ™ãƒ«ã‚’ä»˜ã‘ã‚‹. 
  \item \showcmd[]{label at}: ãƒ©ãƒ™ãƒ«ã®ãƒ¯ã‚¤ãƒ¤ãƒ¼ä¸Šã®ä½ç½®.
      \iitem ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ midway.
  \item \showcmd[]{label side}: ãƒ©ãƒ™ãƒ«ã¨ãƒ¯ã‚¤ãƒ¤ãƒ¼ã®ä½ç½®é–¢ä¿‚.
      \iitem ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ right.
\end{itemize}
\begin{codebox}{}{ex:78129738912260951}
  \q{
    \qbox[n=3,hlen=1.5]
    \qbox[at={1,2}, s=2, hlen=1.5]
    \qbox[at={-1,4}, s=2, hlen=1.5]
    \qwire[dom={N-1-1}, cod={S-1-3}]
    \qwire[dom={N-2-1}, cod={S-1-2}]
    \qwire[dom={N-3-1}, cod={S-2-2}]
    \qwire[dom={N-1-2}, cod={S-2-3}]
  }
\end{codebox}
\begin{CODEBOX}{}{ex:193477432894112213}
  \q{
    \def\maxi{11}
    \foreach \i in {0,...,\maxi}
    {
        \qwireup[dom={0,0}, cod={{\fpeval{\i*360/(\maxi+1)}}:2}]
        \node at ({\fpeval{\i*360/(\maxi+1)}}:2.4) {\texttt{cod} \i};
    }
  }
\end{CODEBOX}
ãƒ¯ã‚¤ãƒ¤ãƒ¼\q[scale=0.6]{\qwire}ã®ãƒã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ãƒœãƒƒã‚¯ã‚¹ã¯, \q[scale=0.5]{\qbox}ã¨åŒã˜ã§ã‚ã‚‹:
\begin{codebox}{}{ex:78129738912220926}
  \q
  {
    \qwire\qbox\qwire\n
    \qbox\qwire\qbox
    \qbball
  }
\end{codebox}
ãƒ¯ã‚¤ãƒ¤ãƒ¼ã®ãƒã‚¦ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ãƒœãƒƒã‚¯ã‚¹ã¯, \showcmd[]{dom}ã‚’å…¥åŠ›ç‚¹, \showcmd[]{cod}ã‚’å‡ºåŠ›ç‚¹ã¨ã™ã‚‹ã‚ˆã†ãªãƒœãƒƒã‚¯ã‚¹ã®ãã‚Œã¨ä¸€è‡´ã™ã‚‹:
\begin{itemize}
  \item \(\q[scale=0.5]{\qwire}\) ã¨ \(\q[scale=0.5]{\qbox}\)
  \item \(\q[scale=0.5]{\qwire[dom={0,0},cod={1,1}]}\) ã¨ \(\q[scale=0.5]{\qbox[p=2,S={1},N={2}]}\)
\end{itemize}

\begin{CODEBOX}{}{Ex:7812973891209}
  \q[scale=3]{
    \coordinate (A) at (0,0);
    \coordinate (B) at (2,3);
    \qwire[dom=A, cod={1,1}, label={wire1}, label side={left}]
    \qwire[dom={1,1}, cod=B, label={wire2}, label at={near end}]
    \node[fill=red, circle] at (A) {A};
    \node[fill=green, circle] at (B) {B};
    \node[fill=yellow, circle] at (1,1) {(1,1)};
    \qbball
  }
\end{CODEBOX}

\begin{CODEBOX}{}{Ex:7812973891201}
  \q{
    \qloop[5]{
      \qloop[10]{
        \qbox[show id={true}]
      }\n
    }\n
    \qspace[3]\qbox[s=2,show id={true},id={ego1}]\n\n
    \qspace[6]\qbox[n=2,show id={true},id={ego2}]\n\n
    \qloop[5]{
      \qloop[10]{
        \qbox[show id={true}]
      }\n
    }
    \qwire[dom={O-1-55},cod={I-1-51}]
    \qwire[dom={O-1-60},cod={I-1-52}]
    \qwire[dom={O-1-51},cod={I-1-45}]
    \qwire[dom={O-1-52},cod={I-2-51}]
    \qwire[dom={O-2-52},cod={I-1-48}]
  }
\end{CODEBOX}

\paragraph{arrowtype}
ãƒ¯ã‚¤ãƒ¤ãƒ¼ã®ã‚¹ã‚¿ã‚¤ãƒ«ã¯, \showcmd[]{arrowtype}ã‚­ãƒ¼ã‚’ç”¨ã„ã¦æŒ‡å®šã™ã‚‹. 
\begin{codebox}[center lower,listing side text,righthand width=5cm,bicolor,colbacklower=white]{}{wirearrowtype}
  \q{
    \qwire[arrowtype=dotted]
    \qwire[arrowtype=dashed]
    \qwire[arrowtype={dash dot}]
    \qwire[arrowtype={dash dot dot}]
    \qwire[arrowtype={densely dotted}]
    \qwire[arrowtype={loosely dotted}]
  }
\end{codebox}

\begin{codebox}[center lower,listing side text,righthand width=5cm,bicolor,colbacklower=white]{}{boxarrowtype}
  \q{
    \qbox[dom arrowtype={dotted}]
    \qbox[cod arrowtype={dotted}]
    \qbox[arrowtype={dotted}]
  }
\end{codebox}

\begin{codebox}[center lower,listing side text,righthand width=5cm,bicolor,colbacklower=white]{}{spiderarrowtype}
  \q{
    \qspider[dom arrowtype={dotted}]
    \qspider[cod arrowtype={dotted}]
    \qspider[arrowtype={dotted}]
  }
\end{codebox}

\subsection{ã‚­ãƒ£ãƒ³ãƒã‚¹}
\begin{verbatim}
  \q[ã‚ªãƒ—ã‚·ãƒ§ãƒ³]
  {
    ã‚³ãƒžãƒ³ãƒ‰
    ã‚³ãƒžãƒ³ãƒ‰
    ...
  }
\end{verbatim}
ã‚­ãƒ£ãƒ³ãƒã‚¹ã®ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã§å›³å¼å…¨ä½“ã‚’å¤‰æ›ã§ãã‚‹.
\begin{codebox}{}{Ex:74839753}
  \q[scale=2,rotate=30]{\qbox}
\end{codebox}
ã‚­ãƒ£ãƒ³ãƒã‚¹ã‚’å‚¾ã‘ã‚‹ã“ã¨ã‚‚ã§ãã‚‹. 
\begin{CODEBOX}{}{Ex:74839752}
  \def\anglerot{-55}
  \tikzset
  {
    my slant style/.style={
      yslant=-cot(\anglerot), 
      xscale=sin(-\anglerot)
      }
  }
  \q[my slant style]
  {
    \qcaprev\qcap\n
    \qwire\qbraidinv\qwiredown\n
    \qwiredown\qbraidinv\qwire\n
    \qcup\qcuprev
    \qBBall
  }
\end{CODEBOX}
\begin{CODEBOX}{}{Ex:74839751}
  \def\anglerot{-60}
  \tikzset
  {
    my slant style/.style={
      yslant=-cot(\anglerot), 
      xscale=sin(-\anglerot)
      }
  }
  \[\q[my slant style]
  {
    \qbraid\qwire\n
    \qwire\qbraid\n
    \qbraid\qwire
  }
  =\q[my slant style]
  {
    \qbraid\qwire\n
    \qwire\qwire\qwire\n
    \qbraid[num R=2]
    \qbb[red][1]
    \qbb[cyan][6]
  }
  =\q[my slant style]
  {
    \qbraid[ num R=2]\n
    \qwire\qwire\qwire\n
    \qwire\qbraid
    \qbb[red][6]
    \qbb[cyan][1]
  }
  =\q[my slant style]
  {
    \qwire\qbraid\n
    \qbraid\qwire\n
    \qwire\qbraid
  }\]
\end{CODEBOX}

\section{ãƒ¢ãƒŽã‚¤ãƒ€ãƒ«åœã¨\qworldname}
æœ¬ç«&nbsp;ã§ã¯, \qworldname ãƒ‘ãƒƒã‚±ãƒ¼ã‚¸ã‚’ç”¨ã„ã¦ãƒ¢ãƒŽã‚¤ãƒ€ãƒ«åœã®å›³å¼è¨ˆç®—ã‚’ã©ã®ã‚ˆã†ã«è¡¨ç¾ã§ãã‚‹ã‹ã‚’æŽ¢ã‚‹. 
\qworldname ã¯, ãã‚Œå˜ä½“ã§æ©Ÿèƒ½ã—, å›³å¼ã‚’æ‰±ã†ã“ã¨ãŒã§ãã‚‹ãŒ, 
æ•°å¼ã‚’ã‚ˆã‚ŠæŸ”è»Ÿã«è¡¨ç¾ã™ã‚‹ãŸã‚ã«, ãã®åŸºç›¤ã¨ãªã‚‹ãƒ‘ãƒƒã‚±ãƒ¼ã‚¸ (\showcmd[]{amsmath}, \showcmd[]{amssymb}, \showcmd[]{mathtools}) ã‚’ä½¿ç”¨ã™ã‚‹. 
å†ç¾ã®éš›ã¯, ä»¥ä¸‹ã®ã‚ˆã†ã«ãƒ‘ãƒƒã‚±ãƒ¼ã‚¸ã‚’é©å®œãƒ­ãƒ¼ãƒ‰ã›ã‚ˆ:
\begin{verbatim}
  \usepackage{amsmath, amssymb, mathtools}
  \usepackage{qworld}
\end{verbatim}
\subsection{åœ}
\begin{codebox}{ãƒ‰ãƒ¡ã‚¤ãƒ³}{ex:dom2}
  \[
    \operatorname{dom}\left(
      \q{
        \qbox[name={\(f\)}]
        \symbolI{\(x\)}
        \symbolO{\(y\)}
      }
    \right)=x
  \]
\end{codebox}
\begin{codebox}{ã‚³ãƒ‰ãƒ¡ã‚¤ãƒ³}{ex:cod2}
  \[
    \operatorname{cod}\left(
      \q{
        \qbox[name={\(f\)}]
        \symbolI{\(x\)}
        \symbolO{\(y\)}
      }
    \right)=y
  \]
\end{codebox}

\begin{codebox}{åˆæˆ (åž‚ç›´åˆæˆ)}{def:composite}
  \[
    \q{
      \qbox[name={\(f\)}]\qcirc\qbox[name={\(g\)}]
    }=\q{\qbox[name={\(f\circ g\)}]}
  \]
\end{codebox}
\begin{CODEBOX}{çµåˆå¾‹}{Ex:74839750}
  \[
    \forall\q{\qbox[name={\(h\)}] \symbolI{\(z\)} \symbolO{\(w\)}},
           \q{\qbox[name={\(g\)}] \symbolI{\(y\)} \symbolO{\(z\)}},
           \q{\qbox[name={\(f\)}] \symbolI{\(x\)} \symbolO{\(y\)}}:
    \q{
        \qbox[name={\(h\)}]\qcirc\qbox[name={\(g\)}]\qcirc\qbox[name={\(f\)}]
        \qbb[2,3]
    }
    =
    \q{
        \qbox[name={\(h\)}]\qcirc\qbox[name={\(g\)}]\qcirc\qbox[name={\(f\)}]
        \qbb[1,2]
    }
  \]
\end{CODEBOX}
\begin{CODEBOX}{æ’ç­‰å¾‹}{IdentityLaw}
  \begin{equation}
    \label{law:identity}
    \forall\q
    {
      \qbox[name={\(f\)}]
      \symbolS{\(x\)}
      \symbolN{\(y\)}
    }\colon
    \q{
      \qwire[label={\(y\)}]\n
      \qbox[name={\(f\)}]
    }=\q{
      \qbox[name={\(f\)}]
    }=\q{
      \qbox[name={\(f\)}]\n
      \qwire[label={\(x\)}]
    }
  \end{equation}
\end{CODEBOX}
\subsubsection{å¯¾è±¡æƒ…å&nbsp;±ã¨è‰²}
\label{subsubsec:objectcolor}
åœã®å›³å¼è¨ˆç®—ã«ãŠã„ã¦, æ’ç­‰å°„ã¯é€šå¸¸, å˜ãªã‚‹ãƒ¯ã‚¤ãƒ¤ãƒ¼ã¨ã—ã¦æã‹ã‚Œã‚‹. 
ã“ã†ã—ãŸãƒ¯ã‚¤ãƒ¤ãƒ¼ãŒã©ã®å¯¾è±¡ã®æ’ç­‰å°„ã§ã‚ã‚‹ã‹ã‚’, \textbf{å¯¾è±¡ã”ã¨ã«å›ºæœ‰ã®è‰²ã‚’å‰²ã‚Šå½“ã¦ã‚‹}ã“ã¨ã«ã‚ˆã£ã¦è¦–èªå¯èƒ½ã«ã™ã‚‹æ‰‹æ³•ãŒå­˜åœ¨ã™ã‚‹. 
ã“ã®æ‰‹æ³•ã‚’ç”¨ã„ã‚‹ã“ã¨ã«ã‚ˆã‚Š, ãƒ¯ã‚¤ãƒ¤ä¸Šã«å¯¾è±¡ã®æƒ…å&nbsp;±ã‚’ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã¨ãªã‚Š, æ›²ç·šæ§‹é€&nbsp;ã‹ã‚‰ãªã‚‹å›³å¼ã«ãŠã„ã¦, å¯¾è±¡ã®åŒºåˆ¥ã‚’ç›´æ„Ÿçš„ã«æŠŠæ¡ã™ã‚‹åŠ©ã‘ã¨ãªã‚‹. 
ã“ã®æ‰‹æ³•ã®ç†è«–çš„èƒŒæ™¯ã«ã¯, \textbf{ä»»æ„ã®å°„ã«å¯¾ã—ã¦ãƒ‰ãƒ¡ã‚¤ãƒ³ã¨ãªã‚‹å¯¾è±¡ã¨ã‚³ãƒ‰ãƒ¡ã‚¤ãƒ³ã¨ãªã‚‹å¯¾è±¡ãŒãã‚Œãžã‚Œä¸€æ„çš„ã«å­˜åœ¨ã™ã‚‹}ã¨ã„ã†äº‹å®ŸãŒã‚ã‚‹. 
ã“ã®æ§‹é€&nbsp;ãŒå‰æã¨ã—ã¦å­˜åœ¨ã™ã‚‹ä»¥ä¸Š, å›³å¼è¡¨ç¾ã«ãŠã„ã¦``è‰²''ã¨ã„ã†è¦–è¦šçš„å±žæ€§ã‚’é€šã˜ã¦å¯¾è±¡ã‚’æš—ç¤º/è¡¨ç¾ã™ã‚‹ã“ã¨ã¯ååˆ†ã«æ­£å½“åŒ–ã•ã‚Œã‚‹æ“ä½œã§ã‚ã‚‹. 
ä¾‹ãˆã°çµ„ç´ (\pageref{subsubsec:braid:color}ãƒšãƒ¼ã‚¸ã®\ref{subsubsec:braid:color}é&nbsp;…) ã‚„åŒå¯¾æ€§ (\pageref{subsubsec:duality:color}ãƒšãƒ¼ã‚¸\ref{subsubsec:duality:color}é&nbsp;…) ã‚’å«ã‚€å›³å¼ã«ãŠã„ã¦, è‰²ã«ã‚ˆã‚‹è£œåŠ©ãŒæ­£ç¢ºãªè§£é‡ˆã‚’æ”¯æ´ã™ã‚‹. 
ã“ã®è€ƒãˆæ–¹ã®ã‚‚ã¨ã§ã¯, å¯¾è±¡ã¨ã¯ãƒ¯ã‚¤ãƒ¤ãƒ¼ã‚’å½©ã‚‹è‰²ã®ã‚ˆã†ãªå­˜åœ¨ã§ã‚ã‚Š, 
\begin{CODEBOX}[bicolor,colbacklower=white]{}{objectcolor}
  \(\operatorname{dom}\)ã¯å°„
  \(\q{\qbox[name={\(f\)}, dom color=red, cod color=cyan]}\)
  ã®ãƒ‰ãƒ¡ã‚¤ãƒ³ã®è‰²\(\q{\qwire[color=red]}\)
  ã‚’è­˜åˆ¥ã™ã‚‹ãŸã‚ã®é–¢æ•°ã§ã‚ã‚Š, 
  \(\operatorname{cod}\)ã¯åŒæ§˜ã«, ã‚³ãƒ‰ãƒ¡ã‚¤ãƒ³ã®è‰²
  \(\q{\qwire[color=cyan]}\)ã‚’è­˜åˆ¥ã™ã‚‹ãŸã‚ã®é–¢æ•°ã§ã‚ã‚‹.\par
  ãã—ã¦ç´™é¢ä¸Šã§
  \(\q{\qbox[name={\(f\)}, dom color=purple, cod color=teal]}\)
  ã®ã‚³ãƒ‰ãƒ¡ã‚¤ãƒ³ã®è‰²ã¨
  \(\q{\qbox[name={\(g\)}, dom color=teal, cod color=orange]}\)
  ã®ãƒ‰ãƒ¡ã‚¤ãƒ³ã®è‰²ãŒä¸€è‡´ã—ã¦ã„ã‚‹ã“ã¨ãŒè‰²ã«ã‚ˆã£ã¦æ˜Žç¤ºã•ã‚Œ, 
  ã“ã®æ¡ä»¶ãŒæº€ãŸã•ã‚Œã¦ã„ã‚‹ã¨ãã«é™ã‚Š, åˆæˆ (åž‚ç›´åˆæˆ)
  \[
    \q{
      \qbox[name={\(g\)}, dom color=cyan, cod color=orange]\n
      \qbox[name={\(f\)}, dom color=red, cod color=cyan]
    }
  \]
  ãŒæ•´åˆæ€§ã‚’ä¿ã¤æ“ä½œã¨ã—ã¦è¨±å®¹ã•ã‚Œã‚‹.
\end{CODEBOX}
\subsection{ãƒ¢ãƒŽã‚¤ãƒ€ãƒ«åœ}
\begin{CODEBOX}{ãƒ†ãƒ³ã‚½ãƒ«ç© (ä¸¦åˆ—åˆæˆ)}{monoidalproduct}
  \[
    \q
    {
      \qbox[name={\(f\)}] \qbox[name={\(g\)}]
      \symbolO{\(Y_1\)}[id=1] \symbolO{\(Y_2\)}
      \symbolI{\(X_1\)}[id=1] \symbolI{\(X_2\)}
    }
    =\q
    {
      \qbox[name={\(f\otimes g\)}, p=2]
      \symbolO{\(Y_1\)} \symbolO[2]{\(Y_2\)}
      \symbolI{\(X_1\)} \symbolI[2]{\(X_2\)}
    }
    =\q
    {
      \qbox[name={\(f\otimes g\)}]
      \symbolO{\(Y_1\otimes Y_2\)}
      \symbolI{\(X_1\otimes X_2\)}
    }
  \]
\end{CODEBOX}
\subsubsection{äº¤æ›å‰‡}
\begin{CODEBOX}{äº¤æ›å‰‡ (\(\bigotimes\)ã®å…±å¤‰é–¢æ‰‹æ€§)}{InterchangeLaw}
  \begin{equation}
    \label{law:interchange}
    \q
    {
      \qbox[name={\(f_2\)}]\qbox[name={\(g_2\)}]\n
      \qbox[name={\(f_1\)}]\qbox[name={\(g_1\)}]
      \qbb[1,2]
      \qbb[3,4]
    }
    =\q
    {
      \qbox[name={\(f_2\)}]\qbox[name={\(g_2\)}]\n
      \qbox[name={\(f_1\)}]\qbox[name={\(g_1\)}]
      \qbb[2,4]
      \qbb[1,3]
    }
  \end{equation}
\end{CODEBOX}

\begin{CODEBOX}{å˜ä½å¯¾è±¡}{Ex:74839744}
  \begin{gather}
    \q{ \qwire[arrowtype=dotted]}
    =\q{ \qunitob \qbball }\\
    \q{ \qunitob \qbox[name={\(f\)}] \qbball }
    =\q{ \qbox[name={\(f\)}] }
    =\q{ \qbox[name={\(f\)}] \qunitob \qbball }\label{cond:unitob}
  \end{gather}
\end{CODEBOX}
\begin{CODEBOX}{}{Ex:74839743}
  \[
    \q{\qunitob\qbball}
    =\q{\qloop[2]{\qunitob}\qbball}
    =\q{\qloop[3]{\qunitob}\qbball}
    =\cdots
  \]
\end{CODEBOX}

\subsection{ç‰¹æ®Šãƒœãƒƒã‚¯ã‚¹}

\begin{itemize}
  \item \showcmd{qstate}: \(\q[scale=0.5]{\qstate}\) (\(0\)å…¥åŠ›).
  \item \showcmd{qeffect}: \(\q[scale=0.5]{\qeffect}\) (\(0\)å‡ºåŠ›).
  \item \showcmd{qscalar}: \(\q[scale=0.5]{\qscalar}\) (\(0\)å…¥åŠ›, \(0\)å‡ºåŠ›).
  \item \showcmd{qasym}: \(\q[scale=0.5]{\qasym}\) (éžå¯¾ç§°ãƒœãƒƒã‚¯ã‚¹). 
  \item \showcmd{qtrans}: \(\q[scale=0.5]{\qtrans}\) (è»¢ç½®ãƒœãƒƒã‚¯ã‚¹). \pageref{subsub:transpose}ãƒšãƒ¼ã‚¸ã®\ref{subsub:transpose}é&nbsp;….
  \item \showcmd{qadj}: \(\q[scale=0.5]{\qadj}\) (éšä¼´ãƒœãƒƒã‚¯ã‚¹). \pageref{subsub:adjoint}ãƒšãƒ¼ã‚¸ã®\ref{subsub:adjoint}é&nbsp;….
  \item \showcmd{qconj}: \(\q[scale=0.5]{\qconj}\) (å…±å½¹ãƒœãƒƒã‚¯ã‚¹). \pageref{subsub:conj}ãƒšãƒ¼ã‚¸ã®\ref{subsub:conj}é&nbsp;….
\end{itemize}
\subsubsection{ã‚¼ãƒ­å…¥åŠ›}
\label{subsub:zeroinput}
\begin{codebox}{}{def:state}
  \q{\qstate}
\end{codebox}
\subsubsection{ã‚¼ãƒ­å‡ºåŠ›}
\label{subsub:zerooutput}
\begin{codebox}{}{def:effect}
  \q{\qeffect}
\end{codebox}
\subsubsection{ã‚¼ãƒ­å…¥åŠ›ã‚¼ãƒ­å‡ºåŠ›}
\label{subsub:zeroinputoutput}
\begin{codebox}{}{def:scalar}
  \q{\qscalar}
\end{codebox}
\paragraph{\(\q[scale=0.4]{\qeffect\qstate\qwire[dom={O-1-2}, cod={1,2}]\qwire[dom={1,-1}, cod={I-1-1}]}=\q[scale=0.4]{\qwire[vlen=0.5]\n\qstate\n\qeffect\n[0.5]\qwire[vlen=0.5]}=\q[scale=0.4]{\qstate\qeffect\qwire[dom={O-1-1}, cod={1,2}]\qwire[dom={1,-1}, cod={I-1-2}]}\)}
\begin{CODEBOX}{}{coherence:unitor}
  \[
    \q{
      \qeffect\qstate
      \qwire[dom={O-1-2}, cod={1,2}]
      \qwire[dom={1,-1}, cod={I-1-1}]
    }=\q{
        \qwire[arrowtype=dotted]\qwire\n
        \qeffect\qstate\n
        \qwire\qwire[arrowtype=dotted]
    }\stackrel{\text{(\ref{law:interchange}, \ref{law:identity})}}{=}\q{
        \qwire[arrowtype=dotted]\qstate\n
        \qeffect\qwire[arrowtype=dotted]
    }\stackrel{\text{(\ref{law:interchange}, \ref{cond:unitob})}}{=}\q{\qstate\n\qeffect}
  \]
\end{CODEBOX}
\begin{CODEBOX}{è¡¨ç¾è¡Œåˆ—}{matrixrepre}
  \begin{align*}
    \q{\qbox[name={\(f\)}]}
    &amp;=\sum\limits_{i,j}
    \left(
      \q{
        \qeffect[name={\(w_j^{\dagger}\)}]\n
        \qbox[name={\(f\)}]\n
        \qstate[name={\(v_i\)}]\n
      }\q{
        \qstate[name={\(w_j\)}]\n
        \qeffect[name={\(v_i^{\dagger}\)}]
      }
    \right)
    =\sum\limits_{i,j}\left(
      \q{
        \qscalar[name={\(w_j^{\dagger}\circ f\circ v_i\)}]
      }
      \q{
        \qstate[name={\(w_j\)}]\n
        \qeffect[name={\(v_i^{\dagger}\)}]
      }
    \right)\\
    &amp;=\begin{pmatrix}
      \q{\qscalar[name={\(w_1^{\dagger}\circ f\circ v_1\)}]}&amp;&amp;\cdots&amp;&amp;\q{\qscalar[name={\(w_1^{\dagger}\circ f\circ v_{m}\)}]}\\
      &amp;\ddots&amp;&amp;&amp;\\        
      \vdots&amp; &amp;\q{\qscalar[name={\(w_j^{\dagger}\circ f\circ v_i\)}]}&amp; &amp;\vdots\\
      &amp;&amp;&amp;\ddots&amp;\\
      \q{\qscalar[name={\(w_n^{\dagger}\circ f\circ v_1\)}]}&amp;&amp;\cdots&amp;&amp;\q{\qscalar[name={\(w_n^{\dagger}\circ f\circ v_m\)}]}
    \end{pmatrix}
  \end{align*}
\end{CODEBOX}

\subsection{ãƒ¢ãƒŽã‚¤ãƒ‰å¯¾è±¡}
\label{subsec:monoid}
\begin{itemize}
  \item \showcmd{qmul}: \(\q[scale=0.5]{\qmul}\)
    \iitem \showcmd[]{hlen=2}: \(\q[scale=0.5]{\qmul[hlen=2]}\)
  \item \showcmd{qcomul}: \(\q[scale=0.5]{\qcomul}\)
    \iitem \showcmd[]{hlen=2}: \(\q[scale=0.5]{\qcomul[hlen=2]}\)
  \item \showcmd{qunit}: \(\q[scale=0.5]{\qunit}\)
  \item \showcmd{qcounit}: \(\q[scale=0.5]{\qcounit}\)
  \item \showcmd{qspider}: \(\q[scale=0.5]{\qspider}\)
\end{itemize}

\begin{CODEBOX}{çµåˆå¾‹}{AssociateLaw}
  \begin{equation}
    \label{law:associate}
    \q{
        \qspace[0.5]\qmul[hlen=2]\n
        \qmul[hlen=2]\qspace[-0.5]\qwire
    }=\q{
        \qmul[hlen=2]\n
        \qwire\qspace[-0.5]\qmul[hlen=2]
    }
  \end{equation}
\end{CODEBOX}
  \begin{CODEBOX}{å˜ä½å¾‹}{UnitLaw}
  \begin{equation}
    \label{law:unit}
    \q{
        \qmul[hlen=2]\n
        \qwire\qunit
    }=\q{\qwire[vlen=2]}
    =\q
    {
        \qmul[hlen=2]\n
        \qunit\qwire
    }
  \end{equation}
\end{CODEBOX}
\begin{CODEBOX}{ä½™çµåˆå¾‹}{CoassociateLaw}
  \begin{equation}
    \label{law:coassociate}
    \q{
        \qcomul[hlen=2]\qspace[-0.5]\qwire\n
        \qspace[0.5]\qcomul[hlen=2]
        }
    =\q{
        \qwire\qspace[-0.5]\qcomul[hlen=2]\n
        \qcomul[hlen=2]
    }
  \end{equation}
\end{CODEBOX}
\begin{CODEBOX}{ä½™å˜ä½å¾‹}{CounitLaw}
  \begin{equation}
    \label{law:counit}
    \q{
        \qcounit\qwire\n
        \qcomul[hlen=2]
        }
    =\q{\qwire[vlen=2]}
    =\q{
        \qwire\qcounit\n
        \qcomul[hlen=2]
    }
  \end{equation}
\end{CODEBOX}

\subsubsection{ãƒ•ãƒ­ãƒ™ãƒ‹ã‚¦ã‚¹å‰‡}
\begin{FCODEBOX}{ãƒ•ãƒ­ãƒ™ãƒ‹ã‚¦ã‚¹å‰‡}{FrobeniusLaw}
    \[
      \q{
        \qwire\qmul[color=black]\n
        \qcomul\qwire
      }=\q{
        \qcomul\n
        \qmul[color=black]
      }=\q{
        \qmul[color=black]\qwire\n
        \qwire\qcomul
      }
    \]
  \end{FCODEBOX}
  å¤±æ•—ä¾‹ã¨ã—ã¦æŒ™ã’ã‚‰ã‚Œã¦ã„ã‚‹ãŒ, å®Ÿéš›ã«ã¯ãƒ•ãƒ­ãƒ™ãƒ‹ã‚¦ã‚¹å‰‡ãŒæ­£ç¢ºã«è¨˜è¿°ã•ã‚Œã¦ã„ã‚‹. 
  ã‚€ã—ã‚, å…¨ã¦ã®ãƒ¯ã‚¤ãƒ¤ãƒ¼ã®é–“éš”ãŒæ•´æ•°å€¤ã«ä¿ãŸã‚Œã¦ã„ã‚‹ãŸã‚, åž‚ç›´åˆæˆæ™‚ã®èª¿æ•´ãŒå®¹æ˜“ã§ã‚ã‚Š, å&nbsp;´åˆã«ã‚ˆã£ã¦ã¯èª¿æ•´è‡ªä½“ãŒä¸è¦ã¨ãªã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹. 
  ã“ã‚Œã¯å˜ãªã‚‹å¥½ã¿ã®å•é¡Œã«éŽãŽãªã„. 
  \verb|\qmul|ã‚„\verb|\qcomul|ã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®æç”»çµæžœãŒ\(\q[scale=0.5]{\qmul}\), \(\q[scale=0.5]{\qcomul}\)ã§ã‚ã‚‹ã®ã¯, 
  \verb|\qbox[s=2]|ã‚„\verb|\qbox[n=2]|ã®æç”»çµæžœãŒ\(\q[scale=0.5]{\qbox[s=2]}\), \(\q[scale=0.5]{\qbox[n=2]}\)ã§ã‚ã‚‹ã“ã¨ã®åæ®‹ã§ã‚ã‚‹. 
  ã“ã®ã‚ˆã†ãªå&nbsp;´åˆã®èª¿æ•´ã‚­ãƒ¼ã¨ã—ã¦\verb|hlen|ãŒã‚ã‚‹:
  \begin{CODEBOX}{ãƒ•ãƒ­ãƒ™ãƒ‹ã‚¦ã‚¹å‰‡}{FrobeniusLaw2}
    \[
      \q{
        \qwire\qmul[hlen=2,color=black]\n
        \qcomul[hlen=2]\qwire
      }=\q{
        \qcomul[hlen=2]\n
        \qmul[hlen=2,color=black]
      }=\q{
        \qmul[hlen=2,color=black]\qwire\n
        \qwire\qcomul[hlen=2]
      }
    \]
  \end{CODEBOX}

  \verb|\qspider|ã¯, ãƒŽãƒ¼ãƒ‰ãŒãƒœãƒƒã‚¯ã‚¹ã§ã¯ãªãå††ã§ã‚ã‚‹ã“ã¨ã‚’é™¤ã‘ã°, \verb|\qbox|ã¨åŒã˜ã§ã‚ã‚‹. 
  \begin{codebox}{}{spider78129738912240521}
    \[\q{\qspider}\]
    \[\q{\qspider[n=0]}\]
    \[\q{\qspider[n=0,s=4]}\]
    \[\q{\qspider[n=2,s=4]}\]
    \[\q{\qspider[N={1,4},s=4]}\]
    \[\q{\qspider[N={2,3},s=4]}\]
    \[\q{\qspider[p=3,N={2},S={1,3}]}\]
    \[\q{\qspider[p=3,N={2},S={1,3},hlen=2]}\]
    \[\q{\qspider[n=1,s=2,hlen=2]}\]
  \end{codebox}

  \begin{CODEBOX}{}{spider78129738912270738}
    \[
      \q{
        \qspider[n=2, s=4, hlen=4]\qwire\qwire\n
        \qwire\qwire\qspider[n=4, s=2, hlen=4]
      }
      =\q{\qspider[p=4]}\]
  \end{CODEBOX}

\subsection{çµ„ç´}
\label{subsec:braidedcategory}
\begin{itemize}
  \item \showcmd{qbraid}: \(\q[scale=0.5]{\qbraid}\)
  \item \showcmd{qbraidinv}: \(\q[scale=0.5]{\qbraidinv}\)
  \item \showcmd{qsym}: \(\q[scale=0.5]{\qsym}\)
\end{itemize}

\paragraph{\showcmd[]{num L} ã¨ \showcmd[]{num R} ã‚­ãƒ¼}
ãƒ¯ã‚¤ãƒ¤ãƒ¼ã‚’äº¤å‰ã•ã›ãŸå›³å¼ã‚’æç”»ã™ã‚‹ã‚³ãƒžãƒ³ãƒ‰\verb|\qbraid|, \verb|\qbraidinv|, \verb|\qsym|ã«å¯¾ã—, 
\showcmd[]{num L}ã¯å·¦å´ã®ãƒ¯ã‚¤ãƒ¤ãƒ¼ã®æœ¬æ•°ã‚’, \showcmd[]{num R}ã¯å³å´ã®ãƒ¯ã‚¤ãƒ¤ãƒ¼ã®æœ¬æ•°ã‚’æŒ‡å®šã™ã‚‹ã‚­ãƒ¼ã§ã‚ã‚‹. 
ä¾‹ãˆã°, \showcmd[]{num L=3}, \showcmd[]{num R=2} ã¨ã™ã‚Œã°, \(\q{\qbraid[num L=3,num R=2]}\)ãŒæç”»ã•ã‚Œã‚‹. 
åŒæ–¹ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã¯ã¨ã‚‚ã«\(1\)ã§ã‚ã‚‹. 

\begin{CODEBOX}{å…­è§’å½¢ç­‰å¼}{hexagon}
  \begin{equation}
    \label{eq:hexagon}
    \q
    {
      \qbraid[num R=2,,hlen=2,vlen=2]
    }
    =
    \q
    {
      \qwire\qbraid\n
      \qbraid\qwire
    }
    \qquad
    \q
    {
      \qbraid[num L=2,,hlen=2,vlen=2]
    }
    =
    \q
    {
      \qbraid\qwire\n
      \qwire\qbraid
    }
  \end{equation}
\end{CODEBOX}
\paragraph{\({\q[scale=0.5]{\qbraid}}^{-1}=\q[scale=0.5]{\qbraidinv}\)}
\begin{CODEBOX}{}{braidisom2}
  \begin{equation}
    \label{eq:inverse:braid}
    \q
    {
      \qbraidinv\n
      \qbraid
    }
    =
    \q
    {
      \qwire[vlen=2]\qwire[vlen=2]
    }
    \qquad
    \q
    {
      \qbraid\n
      \qbraidinv
    }
    =
    \q
    {
      \qwire[vlen=2]\qwire[vlen=2]
    }
  \end{equation}
\end{CODEBOX}
\begin{CODEBOX}{çµ„ç´ã®è‡ªç„¶æ€§}{braidnatural}
  \begin{equation}
    \label{cond:naturality:braid}
    \q
    {
      \qbraid\n
      \qbox[name={\(f\)}]\qbox[name={\(g\)}]
    }
    =
    \q
    {
      \qbox[name={\(g\)}]\qbox[name={\(f\)}]\n
      \qbraid
    }
    \qquad
    \q
    {
      \qbraidinv\n
      \qbox[name={\(f\)}]\qbox[name={\(g\)}]
    }
    =
    \q
    {
      \qbox[name={\(g\)}]\qbox[name={\(f\)}]\n
      \qbraidinv
    }
  \end{equation}
\end{CODEBOX}

ã‚³ãƒžãƒ³ãƒ‰\verb|\qbraid|, \verb|\qbraidinv|, \verb|\qsym|ã«å¯¾ã—, 
\showcmd[]{num R=0}ã¨æŒ‡å®šã™ã‚‹ã¨, \(\q[scale=0.65]{\qbraid[num R=0]}\)ã®ã‚ˆã†ã«å³å´ã®ãƒ¯ã‚¤ãƒ¤ãƒ¼ãŒç‚¹ç·šã¨ãªã‚‹. 
\showcmd[]{num L=0}ã¨æŒ‡å®šã™ã‚‹ã¨, \(\q[scale=0.65]{\qbraid[num L=0]}\)ã®ã‚ˆã†ã«å·¦å´ã®ãƒ¯ã‚¤ãƒ¤ãƒ¼ãŒç‚¹ç·šã¨ãªã‚‹. 
ã“ã‚Œã¯, å˜ä½å¯¾è±¡ã‚’ç©ºå›³å¼, ã™ãªã‚ã¡\(0\)æœ¬ã®ãƒ¯ã‚¤ãƒ¤ãƒ¼ã¨ã—ã¦è¡¨ã™ã“ã¨ã«ç”±æ¥ã—ã¦ã„ã‚‹.
\begin{CODEBOX}{}{stateeffect3dimbraid}
  \begin{gather}
    \q{
      \qwire\qstate\n
      \qwire
    }
    =\q{
      \qwire\qstate\n
      \qbraid[num L=0]
    }\stackrel{\text{(\ref{cond:naturality:braid})}}{=}\q{
      \qbraid\n
      \qstate\qwire
    }\label{iso:u:state}\\
    \q{
      \qunitob\qwire\n
      \qeffect\qwire
    }
    =\q{
      \qbraid[num L=0]\n
      \qeffect\qwire
    }\stackrel{\text{(\ref{cond:naturality:braid})}}{=}\q{
      \qwire\qeffect\n
      \qbraid
    }\label{iso:u:effect}
  \end{gather}
\end{CODEBOX}
\begin{CODEBOX}{}{iso:spatial:scalar}
  \begin{equation}
    \label{iso:spatial}
    \q{\qscalar\qmv[0,-1]\qwire[vlen=3]}
    =\q{\qbraid[num L=0]\n\qscalar\qmv[0,-1]\qwire[vlen=2]}
    \stackrel{\text{(\ref{cond:naturality:braid})}}{=}
    \q{\qwire[vlen=2]\qscalar\n\qbraid[num L=0]}
    =\q{\qscalar\qmv[-2,-1]\qwire[vlen=3]}
  \end{equation}
\end{CODEBOX}
\begin{CODEBOX}{}{iso:spatial:state.effect}
  \[
    \q{\qscalar\qmv[0,-1]\qwire[vlen=3]}
    =\q{\qeffect\n\qstate\qmv[0,-0.5]\qwire[vlen=3]}
    \stackrel{\text{(\ref{iso:u:effect})}}{=}
    \q{\qwire\qeffect\n\qbraid\n\qstate\qwire}
    \stackrel{\text{(\ref{iso:u:state})}}{=}
    \q{\qeffect\n\qstate\qmv[-2,-0.5]\qwire[vlen=3]}
    =\q{\qscalar\qmv[-2,-1]\qwire[vlen=3]}
  \]
\end{CODEBOX}
\paragraph{\(\q[scale=0.5]{\qbraid\qwire\n\qwire\qstate[n=2]}=\q[scale=0.5]{\qwire\qbraidinv\n\qstate[n=2]\qwire}\)}
\begin{CODEBOX}{}{dashedbraid}
  \begin{align}
    \q
    {
      \qbraid\qwire\n
      \qwire\qstate[n=2]
    }
    &amp;=\q
    {
      \qbraid\qwire\n
      \qwire\qstate[n=2]\n\n
      \qbraidinv[num L=0,vlen=2,hlen=2.5]
    }
    \stackrel{\text{(\ref{cond:naturality:braid})}}{=}\q
    {
      \qbraid\qwire\n\n
      \qbraidinv[num L=2,vlen=2]\n
      \qstate[n=2]\qwire\n
      \qspace[0.5]\qwire[arrowtype={densely dotted}]\qspace[0.5]\qwire
    }\\
    &amp;=\q
    {
      \qbraid\qwire\n\n
      \qbraidinv[num L=2,vlen=2]\n
      \qstate[n=2]\qwire\n
      \qspace[2]\qwire
      \qbb[green][3]
    }\stackrel{\text{(\ref{eq:hexagon})}}{=}\q
    {
      \qbraid\qwire\n
      \qbraidinv\qwire\n
      \qwire\qbraidinv\n
      \qstate[n=2]\qwire\n
      \qspace[2]\qwire
      \qbb[green][3,...,6]
    }\\
    &amp;=\q
    {
      \qbraid\qwire\n
      \qbraidinv\qwire\n
      \qwire\qbraidinv\n
      \qstate[n=2]\qwire\n
      \qspace[2]\qwire
      \qbb[orange][1,3]
    }
    \stackrel{\text{(\ref{eq:inverse:braid})}}{=}\q
    {
      \qloop[2]{\qloop[3]{\qwire}\n}
      \qwire\qbraidinv\n
      \qstate[n=2]\qwire\n
      \qspace[2]\qwire
      \qbb[orange][1,2,4,5]
    }
  \end{align}
\end{CODEBOX}
  
\begin{CODEBOX}{ãƒ¤ãƒ³-ãƒã‚¯ã‚¹ã‚¿ãƒ¼æ–¹ç¨‹å¼}{YangBaxer}
  \[
    \q
    {
      \qbraid\qwire\n
      \qwire\qbraid\n
      \qbraid\qwire
    }=\q
    {
      \qwire\qbraid\n
      \qbraid\qwire\n
      \qwire\qbraid
    }
  \]
\end{CODEBOX}

\begin{codebox}[center lower,listing side text,righthand width=5cm,bicolor,colbacklower=white]{å¯æ›æ€§}{def:cmt}
  \begin{equation}
    \label{cond:cmt}
    \q{\qmul[hlen=2]}=\q{\qmul[hlen=2]\n\qbraid}
  \end{equation}
\end{codebox}
\begin{codebox}[center lower,listing side text,righthand width=5cm,bicolor,colbacklower=white]{ä½™å¯æ›æ€§}{def:ccmt}
  \begin{equation}
    \label{cond:ccmt}
    \q{\qcomul[hlen=2]}=\q{\qbraid\n\qcomul[hlen=2]}
  \end{equation}
\end{codebox}
\subsubsection{åŒä»£æ•°}
\begin{CODEBOX}{åŒä»£æ•°å‰‡}{law:bialgebra}
  \begin{gather}
    \q{\qcomul[hlen=2]\qcirc\qmul[hlen=2, color=black]}
    =\q{
      \qmul[hlen=2, color=black]\qmul[hlen=2, color=black]\n
      \qwire\qbraid\qwire\n\qcomul[hlen=2]\qcomul[hlen=2]
      }\\
    \q{\qspace[0.5]\qcounit\qcirc\qmul[hlen=2, color=black]}
    =\q{\qcounit\qcounit}\\
    \q{\qcomul[hlen=2]\qcirc\qspace[0.5]\qunit[color=black]}
    =\q{\qunit[color=black]\qunit[color=black]}\\
    \q{\qcounit\n\qunit[color=black]}
    =\q{\qunitob}
  \end{gather}
\end{CODEBOX}
\subsubsection{ãƒ›ãƒƒãƒ—ä»£æ•°}
\begin{CODEBOX}{å¯¾åˆå°„ã¨ãƒ›ãƒƒãƒ—å‰‡}{law:hopf}
  \begin{equation}
    \q{
      \qmul[hlen=2, color=black]\n
      \qwire\qbox[name={\(s\)}]\n
      \qcomul[hlen=2]
    }
    =\q{\qunit[color=black]\qcirc\qcounit}
    =\q{
      \qmul[hlen=2, color=black]\n
      \qbox[name={\(s\)}]\qwire\n
      \qcomul[hlen=2]
    }
  \end{equation}
\end{CODEBOX}
\subsubsection{å¹³è¡¡åœ}
\label{subsub:balancedcategory}
\begin{CODEBOX}{ãƒ„ã‚¤ã‚¹ãƒˆ}{def:twist}
  \begin{gather}
    \q{
      \qbox[name={\(\theta_{X\otimes Y}\)}, p=2]
      \symbolI{\(X\)}\symbolI[2]{\(Y\)}
      \symbolO{\(X\)}\symbolO[2]{\(Y\)}
    }
    =\q{
      \qbox[name={\(\theta_X\)}]\qbox[name={\(\theta_Y\)}]\n
      \qbraid\n\qbraid
    }\label{cond:twist}\\
    \q{\qbox[name={\(\theta_I\)}]}=\q{\qunitob}\label{cond:i:twist}\\
    \forall\q{\qbox[name={\(f\)}]}\colon
    \q{
      \qbox[name={\(\theta_{\operatorname{cod}(f)}\)}, hlen=1.5]\n
      \qbox[name={\(f\)}, hlen=1.5]
    }=\q{
      \qbox[name={\(f\)}, hlen=1.5]\n
      \qbox[name={\(\theta_{\operatorname{dom}(f)}\)}, hlen=1.5]
    }\label{cond:naturality:twist}
  \end{gather}
\end{CODEBOX}
\subsubsection{è‰²}
\label{subsubsec:braid:color}

\begin{codebox}[center lower,listing side text,righthand width=5cm,bicolor,colbacklower=white]{å¯¾ç§°}{defeq:sym}
  \begin{equation}
    \label{cond:symmetry}
    \q
    {
      \qbraid[L color=cyan, R color=red]\n
      \qbraid[L color=red, R color=cyan]
    }
    =\q{\qwire[color=red, vlen=2]\qwire[color=cyan, vlen=2]}
  \end{equation}
\end{codebox}

\begin{CODEBOX}{}{wowsym}
  \[\q{\qbraid[L color=red, R color=cyan]}
  =\left(\q{\qbraid[L color=cyan, R color=red]}\right)^{-1}
  =\q{\qbraidinv[L color=red, R color=cyan]}\]
\end{CODEBOX}
\begin{codebox}{ã‚·ãƒ³ãƒ¡ãƒˆãƒªãƒ¼}{def:sym}
  \q{\qsym}
\end{codebox}

\subsection{åŒå¯¾æ€§}
\label{subsub:duality}
\begin{itemize}
  \item \showcmd{qcap}: \(\q[scale=0.6]{\qcap}\)
  \item \showcmd{qcup}: \(\q[scale=0.6]{\qcup}\)
  \item \showcmd{qcaprev}: \(\q[scale=0.6]{\qcaprev}\)
  \item \showcmd{qcuprev}: \(\q[scale=0.6]{\qcuprev}\)
\end{itemize}

\begin{CODEBOX}{ã‚¸ã‚°ã‚¶ã‚°ç­‰å¼}{Snake}
  \begin{equation}
    \label{eq:snake}
    \q{
      \qcap\qwireup\n
      \qwireup\qcup
    }
    =\q{
      \qwireup[vlen=2]
    }
    \qquad\text{ã¨}\qquad
    \q{
      \qwiredown\qcap\n
      \qcup\qwiredown
    }
    =\q{
      \qwiredown[vlen=2]
    }
  \end{equation}        
\end{CODEBOX}

\subsubsection{è»¢ç½®ãƒœãƒƒã‚¯ã‚¹}
\label{subsub:transpose}
\begin{CODEBOX}{è»¢ç½®}{Transpose}
  \[
    \left(\q{\qwire\n\qasym[name={\(f\)}]\n\qwire}\right)^T
    =\q{
      \qwire\n
      \qtrans[name={\(f\)}]\n
      \qwire
    }\coloneq\q{
      \qwire\qcap\n
      \qwire\qasym[name={\(f\)}]\qwire\n
      \qcup\qwire
    }
  \]
\end{CODEBOX}
\begin{CODEBOX}{}{ex:193477432894021826}
  \begin{equation}
    \label{eq:wirerev}
    \left(\q{\qwireup}\right)^T=\q{\qwiredown}
  \end{equation}
\end{CODEBOX}
\begin{CODEBOX}{ã‚¹ãƒ©ã‚¤ãƒ‡ã‚£ãƒ³ã‚°}{Sliding}
  \begin{equation}
    \label{eq:sliding}
    \q{
      \qcap \n
      \qasym \qwire
    }
    =\q{
      \qcap \n
      \qwire \qtrans
    }
    \qquad
    \q{
      \qwire \qasym \n
      \qcup
    }
    =\q{
      \qtrans \qwire \n
      \qcup
    }
  \end{equation}
\end{CODEBOX}

\begin{CODEBOX}{}{MapStateDuality}
  \begin{equation}
    \begin{array}{rccc}
      \operatorname{NAME}\colon &amp; \operatorname{Hom}(X,Y)
      &amp; \to &amp; \operatorname{Hom}(I,X^T\otimes Y)\\
      &amp; \rotatebox{90}{\(\in\)} &amp;&amp; \rotatebox{90}{\(\in\)}\\
      &amp; \q{
        \qasym
        \symbolI{\(X\)}
        \symbolO{\(Y\)}
      } &amp; \mapsto 
      &amp; \q{
        \qwire[label={\(X^T\)}, label at={at end}, label side={above}] \qasym \n
        \qcup
        \symbolO{\(Y\)}[id=2]
      }
    \end{array}
  \end{equation}
\end{CODEBOX}

\begin{CODEBOX}{}{MapEffectDuality}
  \begin{equation}
    \begin{array}{rccc}
      \operatorname{CONAME}\colon &amp; \operatorname{Hom}(X,Y) 
      &amp; \to &amp; \operatorname{Hom}(X\otimes Y^T,I)\\
      &amp; \rotatebox{90}{\(\in\)}&amp;&amp;\rotatebox{90}{\(\in\)}\\
      &amp; \q{
        \qasym
        \symbolI{\(X\)}
        \symbolO{\(Y\)}
      } &amp; \mapsto 
      &amp; \q{
        \qcap \n
        \qasym \qwire[label={\(Y^T\)}, label at={at start}, label side={below}]
        \symbolI{\(X\)}[id=2]
      }
    \end{array}
  \end{equation}
\end{CODEBOX}

\subsubsection{ã‚³ãƒ”ãƒ¼ç¦æ­¢å®šç†}
\label{subsub:nocopy}
\begin{CODEBOX}{ä¸€æ§˜ã‚³ãƒ”ãƒ¼}{def:copy}
  \begin{gather}
    \q{
      \qwire\qbraid\qwire\n
      \qcomul[hlen=2, name={\(\text{copy}_X\)}]\qcomul[hlen=2, name={\(\text{copy}_Y\)}]
      \symbolI{\(X\)}[id=4]\symbolI{\(Y\)}[id=5]
      \symbolO{\(X\)}[id=1]\symbolO{\(Y\)}[id=2]
      \symbolO[2]{\(X\)}[id=2]\symbolO{\(Y\)}[id=3]
    }=\q{
      \qcomul[hlen=3, vlen=2, name={\(\text{copy}_{X\otimes Y}\)}]\symbolI{\(X\otimes Y\)}
      \symbolO{\(X\otimes Y\)}\symbolO[2]{\(X\otimes Y\)}
    }\label{cond:copy}\\
    \forall\q{\qbox[name={\(f\)}]\symbolI{\(X\)}\symbolO{\(Y\)}}\colon
    \q{
      \qbox[name={\(f\)}]\qbox[name={\(f\)}]\n
      \qcomul[hlen=2, name={\(\text{copy}_X\)}]
    }=\q{
      \qcomul[hlen=2, name={\(\text{copy}_Y\)}]\n
      \qspace[0.5]\qbox[name={\(f\)}]
    }\label{cond:morcopy}\\
    \q{
      \qcomul[hlen=2, name={\(\text{copy}_I\)}]\symbolI{\(I\)}
      \symbolO{\(I\)}\symbolO[2]{\(I\)}
    }=\q{\qunitob}\label{cond:i:copy}
  \end{gather}
\end{CODEBOX}

\begin{CODEBOX}{ã‚³ãƒ”ãƒ¼å¯èƒ½çŠ¶æ…‹}{def:copyablestate}
  \[
    \q{
      \qcomul[hlen=2, name={\(\operatorname{copy}\)}]\n
      \qspace[0.5]\qstate[name={\(a\)}]
    }=\q{
      \qstate[name={\(a\)}]\qstate[name={\(a\)}]
    }
  \]
\end{CODEBOX}
\begin{CODEBOX}{}{len:copycupcup}
  \begin{align*}
    \q{\qcup\qcup}&amp;\stackrel{\text{(\ref{cond:i:copy})}}{=}
    \q{
      \qcup\qcup\n\qmv[0.5,0.4]
      \qcomul[dom arrowtype=dotted, cod arrowtype=dotted, hlen=3, name={\(\operatorname{copy}\)}]
    }\stackrel{\text{(\ref{cond:morcopy})}}{=}
    \q{
      \qspider[
        name={\(\operatorname{copy}\)}, 
        N={1,2,4,5}, 
        s=2, 
        hlen=2
      ]\n\qcup
    }\\
    &amp;\stackrel{\text{(\ref{cond:copy})}}{=}\q[scale=0.6]{
        \qwire\qbraid\qwire\n
        \qloop[4]{\qwire}\n
        \qloop[2]{\qcomul[hlen=2, name={\(\operatorname{copy}\)}]}\n
        \qspace[0.5]\qcup[hlen=3]
        \qbb[red][4,8]
    }\stackrel{\text{(\ref{cond:ccmt})}}{=}\q[scale=0.6]{
        \qwire\qbraid\qwire\n
        \qbraidinv\qwire\qwire\n
        \qloop[2]{\qcomul[hlen=2, name={\(\operatorname{copy}\)}]}\n
        \qspace[0.5]\qcup[hlen=3]
        \qbb[red][4,7]
      }\\
      &amp;=\q[scale=0.6]{
        \qwire\qbraid\qwire\n
        \qbraidinv\qwire\qwire\n[2]
        \qloop[4]{\qwire[vlen=2]}\n
        \qloop[2]{\qcomul[hlen=2, name={\(\operatorname{copy}\)}]}\n
        \qspace[0.5]\qcup[hlen=3]
        \qbb[blue][8,9]
      }
      \stackrel{\text{(\ref{eq:inverse:braid})}}{=}
      \q[scale=0.6]{
        \qwire\qbraid\qwire\n
        \qbraidinv\qwire\qwire\n
        \qwire\qbraidinv\qwire\n
        \qwire\qbraid\qwire\n
        \qloop[2]{\qcomul[hlen=2, name={\(\operatorname{copy}\)}]}\n
        \qspace[0.5]\qcup[hlen=3]
        \qbb[blue][8,11]
      }\\
      &amp;=\q[scale=0.6]{
        \qwire\qbraid\qwire\n
        \qbraidinv\qwire\qwire\n
        \qwire\qbraidinv\qwire\n
        \qwire\qbraid\qwire\n
        \qloop[2]{\qcomul[hlen=2, name={\(\operatorname{copy}\)}]}\n
        \qspace[0.5]\qcup[hlen=3]
        \qbb[yellow][10,14,15]
      }\stackrel{\text{(\ref{cond:copy}, \ref{cond:morcopy}, \ref{cond:i:copy})}}{=}
      \q[scale=0.6]{
        \qwire\qbraid\qwire\n
        \qbraidinv\qwire\qwire\n
        \qwire\qbraidinv\qwire\n
        \qcup\qcup
        \qbb[yellow][10,11]
      }\\
      &amp;=\q{
        \qwire\qbraid\qwire\n
        \qcup[n=4]
      }
  \end{align*}
\end{CODEBOX}
\begin{CODEBOX}{}{len:copybraid}
  \begin{align*}
    \q{
      \qbraid
      \symbolI{\(X\)}\symbolO{\(X\)}
      \symbolI[2]{\(X\)}\symbolO[2]{\(X\)}
    }&amp;\stackrel{\text{(\ref{eq:snake})}}{=}\q[scale=0.6]{
      \qwire\qspace[2]\qcap\qwire\n
      \qbraid[hlen=4]\qwire\qwire\n
      \qwire\qcap\qwire\qcup\n
      \qwire\qwire\qcup
      \qbb[blue][1,5]
    }=\q[scale=0.6]{
      \qcap[hlen=4]\qwire\n
      \qwire\qspace[2]\qbraidinv\n
      \qwire\qcap\qwire\qwire\qwire[vlen=3]\n
      \qwire\qwire\qcup\qcup
      \qbb[blue][1,4]
      \qbb[yellow][12,13]
    }\\
    &amp;\stackrel{\text{ä¾‹ \ref{len:copycupcup}}}{=}\q[scale=0.6]{
      \qcap[hlen=4]\qwire\n
      \qwire\qspace[2]\qbraidinv\n
      \qwire\qcap\qwire\qwire\qwire[vlen=3]\n
      \qwire\qwire\qwire\qbraid\qwire\n
      \qwire\qwire\qcup[n=4]
      \qbb[yellow][12,14,17]
    }\\
    &amp;=\q[scale=0.6]{
      \qcap[s=4]\qwire\n
      \qloop[3]{\qwire}\qbraidinv\n
      \qloop[3]{\qwire}\qbraid\qwire[vlen=3]\n
      \qwire\qwire\qcup[n=4]
      \qbb[green][6,10]
    }\stackrel{\text{(\ref{eq:inverse:braid})}}{=}\q[scale=0.6]{
      \qcap[s=4]\qwire\qwire\n[2]
      \qloop[6]{\qwire[vlen=2]}\n
      \qwire\qwire\qcup[n=4]
      \qbb[green][7,8]
    }\\
    &amp;\stackrel{\text{(\ref{eq:snake})}}{=}\q{
      \qwire\qwire
      \symbolI{\(X\)}[id=1]\symbolO{\(X\)}[id=1]
      \symbolI{\(X\)}\symbolO{\(X\)}
    }
  \end{align*}
\end{CODEBOX}

\begin{CODEBOX}{ã‚¯ãƒ­ãƒ¼ãƒ³ç¦æ­¢å®šç†}{thm:nocopy}
  \begin{align*}
    \q{
      \qasym[name={\(f\)}]
      \symbolI{\(X\)}\symbolO{\(X\)}
    }&amp;\stackrel{\text{(\ref{eq:snake})}}{=}
    \q{
      \qcap\qasym[name={\(f\)}]\n
      \qwire\qcup
    }\stackrel{\text{(\ref{eq:inverse:braid})}}{=}\q{
      \qcap\qasym[name={\(f\)}]\n
      \qwire\qbraidinv\n
      \qwire\qbraid\n
      \qwire\qcup
    }\stackrel{\text{(\ref{cond:naturality:braid})}}{=}\q{
      \qcap\qwire\n
      \qwire\qbraidinv\n
      \qwire\qasym[name={\(f\)}]\qwire\n
      \qwire\qbraid\n
      \qwire\qcup
      \qbb[red][1,4]
    }\\
    &amp;=\q{
      \qwire\qcap\n
      \qbraid\qwire\n
      \qwire\qasym[name={\(f\)}]\qwire\n
      \qwire\qbraid\n
      \qwire\qcup
      \qbb[red][1,4]
    }=\q{
      \qwire\qcap\n
      \qbraid\qwire\n
      \qwire\qasym[name={\(f\)}]\qwire\n
      \qwire\qbraid\n
      \qwire\qcup
      \qbb[blue][3]
    }\stackrel{\text{ä¾‹ \ref{len:copybraid}}}{=}\q{
      \qwire\qcap\n
      \qwire\qwire\qwire\n
      \qwire\qasym[name={\(f\)}]\qwire\n
      \qwire\qbraid\n
      \qwire\qcup
      \qbb[blue][3,4]
    }
  \end{align*}
\end{CODEBOX}
\subsection{ãƒ”ãƒœã‚¿ãƒ«åœ}
\label{subsec:pivotal}
\begin{CODEBOX}{}{struct:Pivotal}
  \begin{equation}
    \label{cond:naturality:pivotal}
    \forall\q{\qasym[name={\(f\)}]\symbolI{\(X\)}\symbolO{\(Y\)}}\colon
    \q[scale=0.5]{
      \qwire\qcap[s=4]\n
      \qwire\qwire\qasym[name={\(f\)}]\qwire\qwire\n
      \qcup[n=4]\qwire\qmv[-1,-1]\qasym[name={\(\pi_X\)}]
    }=\q{
        \qasym[name={\(\pi_Y\)}]\n
        \qasym[name={\(f\)}]
    }
  \end{equation}
\end{CODEBOX}
\begin{CODEBOX}{}{dualrev}
  \begin{equation}
    \label{def:dualrev}
    \q{
      \qcaprev\n
      \symbolI{\(X^T\)}\symbolI[2]{\(X\)}
    }\coloneq\q
    {
      \qcap \n
      \qwire \qwireupup \n
      \qwire \qasym[name={\(\pi_x\)}] \n
    }\qquad\q{
      \qcuprev
      \symbolO{\(X\)}\symbolO[2]{\(X^T\)}
    }\coloneq\q
    {
      \qasym[name={\(\pi_X^{-1}\)}]\qwire\n
      \qwireupup\qwire\n
      \qcup
    }
  \end{equation}
\end{CODEBOX}
\begin{CODEBOX}{}{revSliding}
  \begin{equation}
    \label{eq:sliding:rev}
    \q{
      \qcaprev\n
      \qtrans\qwire\n
    }=\q{
      \qcaprev\n
      \qwire\qasym
    }\qquad\q{
      \qwire\qtrans\n
      \qcuprev
    }=\q{
      \qasym\qwire\n
      \qcuprev
    }
  \end{equation}
\end{CODEBOX}
\begin{CODEBOX}{}{corr:pivotal:twist}
  \begin{gather}
    \q{
      \qwireuu[label={\(X^{TT}\)}]\n
      \qasym[name={\(\pi_X\)}]\n
      \qwireup[label={\(X\)}]
    }=\q{
      \qwireuu[label={\(X^{TT}\)}]\qcap\n
      \qbraid\qwired[label={\(X^T\)}]\n
      \qasym[name={\(\theta_X^{-1}\)}]\qcuprev\n
      \qwireup[label={\(X\)}]
    }\label{twist:pivotal}\\
    \q{
      \qwireup[label={\(X\)}]\n
      \qasym[name={\(\theta_X\)}]\n
      \qwireup[label={\(X\)}]
    }=\q{
      \qwireup[label={\(X\)}]\n
      \qasym[name={\(\pi_X^{-1}\)}]\n
      \qwireuu[label={\(X^{TT}\)}]\qcap\n
      \qbraid\qwired[label={\(X^T\)}]\n
      \qwire[label={\(X\)}]\qcuprev
    }\label{pivotal:twist}
  \end{gather}
\end{CODEBOX}
\begin{CODEBOX}{}{ex193477432894100303}
  \begin{align*}
    \q{\qasym[name={\(\theta_X\)}]}
    &amp;=\q{
      \qwireu[label={\(X\)}]\qcap\n
      \qbraid\qwired\n
      \qwireu[label={\(X\)}]\qcuprev
    }&amp;\q{\qasym[name={\(\theta_X^{-1}\)}]}
    &amp;=\q{
      \qcaprev\qwireu[label={\(X\)}]\n
      \qwired\qbraidinv\n
      \qcup\qwireu[label={\(X\)}]
    }\\
    \q{\qtrans[name={\(\theta_X\)}]}
    &amp;=\q{
      \qcap\qwired[label={\(X^T\)}]\n
      \qwireu\qbraid\n
      \qcuprev\qwired[label={\(X^T\)}]
    }&amp;\q{\qtrans[name={\(\theta_X^{-1}\)}]}
    &amp;=\q{
      \qwired[label={\(X^T\)}]\qcaprev\n
      \qbraidinv\qwireu\n
      \qwired[label={\(X^T\)}]\qcup
    }
  \end{align*}
\end{CODEBOX}
\begin{CODEBOX}{ãƒªãƒœãƒ³åœ}{code:def:ribboncategory}
  \begin{equation}
    \label{def:ribboncategory}
    \q{
      \qwired\qcaprev\n
      \qbraid\qwireu\n
      \qwired\qcup
    }=\q{
      \qcap\qwired\n
      \qwireu\qbraid\n
      \qcuprev\qwired
    }
  \end{equation}
\end{CODEBOX}

\subsubsection{ãƒˆãƒ¬ãƒ¼ã‚¹}
\label{subsub:trace}
\begin{CODEBOX}{ãƒˆãƒ¬ãƒ¼ã‚¹}{Trdef}
  \[
    \begin{array}{rccc}
      \operatorname{Tr}\colon &amp; \operatorname{Hom}(X,X) &amp; \to &amp;\operatorname{Hom}(I,I)\\
      &amp;\rotatebox{90}{\(\in\)}&amp;&amp;\rotatebox{90}{\(\in\)}\\
      &amp;\q{
        \qasym[name={\(f\)}]
      } &amp; \mapsto &amp; \q{
        \qcap\n
        \qasym[name={\(f\)}]\qwire\n
        \qcuprev
      }
    \end{array}
  \]
\end{CODEBOX}

\begin{CODEBOX}{ãƒˆãƒ¬ãƒ¼ã‚¹ã®å¯æ›æ€§}{Cotr}
  \begin{equation}
    \label{cmt:trace}
    \operatorname{Tr}\left(\q{
      \qasym[name={\(g\)}]\n
      \qasym[name={\(f\)}]
      }\right)
    =\q{
      \qcap\n
      \qasym[name={\(g\)}]\qwire\n
      \qasym[name={\(f\)}]\qwire\n
      \qcuprev
      }
    \stackrel{\text{(\ref{eq:sliding})}}{=}\q{
      \qcap\n
      \qasym[name={\(f\)}]\qtrans[name={\(g\)}]\n
      \qcuprev
    }\stackrel{\text{(\ref{eq:sliding:rev})}}{=}\q{
      \qcap\n
      \qasym[name={\(f\)}]\qwire\n
      \qasym[name={\(g\)}]\qwire\n
      \qcuprev
    }=\operatorname{Tr}\left(\q{
      \qasym[name={\(f\)}]\n
      \qasym[name={\(g\)}]
      }\right)
  \end{equation}
\end{CODEBOX}
\begin{CODEBOX}{å¯¾è±¡ã®æ¬¡å…ƒ}{def:dim}
  \[
    \q{\qscalar[name={\(\operatorname{dim}(X)\)}]}
    \coloneq\q{\qscalar[name={\(\operatorname{Tr}(\operatorname{id}_X)\)}]}
    =\q{\qcap\n\qcuprev}
  \]
\end{CODEBOX}
\subsubsection{ã‚³ãƒ³ãƒ‘ã‚¯ãƒˆåœ}
\label{subsubsec:compact}
\begin{CODEBOX}{ã‚³ãƒ³ãƒ‘ã‚¯ãƒˆåœ}{Def:compact}
  \begin{equation}
    \label{def:compact}
    \q{\qasym[name={\(\pi_X\)}]}=\q{
      \qwireuu[label={\(X^{TT}\)}]\qcap\n
      \qsym\qwired[label={\(X^T\)}]\n
      \qwire[label={\(X\)}]\qcuprev
    }
  \end{equation}
\end{CODEBOX}
\subsubsection{è‰²}
\label{subsubsec:duality:color}
\begin{CODEBOX}{}{Ex:coloredhopflink}
  \begin{equation}
    \label{eq:tr:hopf}
    \operatorname{Tr}\left(
      \q{
        \qbraid[L color=blue, R color=orange]\n
        \qbraid[L color=orange, R color=blue]}
    \right)
    =\q{
      \qcap[hlen=4, frame color=orange]\n
      \qwire[color=orange]\qcap[frame color=blue]\n
      \qbraid[L color=blue, R color=orange]\n
      \qbraid[L color=orange, R color=blue
      ]\qwiredown[vlen=2, color=blue]\n
      \qwire[color=orange]
      \qcuprev[frame color=blue]
      \qwiredown[vlen=4, color=orange]\n
      \qcuprev[hlen=4, frame color=orange]
    }=\q{
      \qcap[frame color=blue]
      \qcap[frame color=orange]\n
      \qspace
      \qbraidinv[L color=orange, R color=blue]\n
      \qwireup[vlen=2, color=blue]
      \qbraidinv[L color=blue, R color=orange]
      \qwiredown[vlen=2, color=orange]\n
      \qcuprev[frame color=blue]
      \qcuprev[frame color=orange]
    }
  \end{equation}
\end{CODEBOX}
\subsection{ãƒ€ã‚¬ãƒ¼}
\label{subsec:dagger}
\subsubsection{éšä¼´ãƒœãƒƒã‚¯ã‚¹}
\label{subsub:adjoint}
\begin{CODEBOX}{éšä¼´}{def:adj}
  \begin{gather}
    \left(
      \q{
        \qasym[name={\(f\)}]
        \symbolI{\(X\)}\symbolO{\(Y\)}
      }
    \right)^{\dagger}
    \coloneq
    \q{
      \qadj[name={\(f\)}]
      \symbolI{\(Y\)}\symbolO{\(X\)}
    }\\
    \left(\q{\qasym[name={\(f\)}]}\right)^{\dagger\dagger}
    =\left(\q{\qadj[name={\(f\)}]}\right)^{\dagger}
    =\q{\qasym[name={\(f\)}]}\\
    \left(\q{\qwire}\right)^{\dagger}=\q{\qwire}\\
    \q{
      \qadj[name={\(f\)}]\n
      \qadj[name={\(g\)}]
    }=\q{
      \qadj[name={\(g\circ f\)}]
    }
\end{gather}
\end{CODEBOX}
\subsubsection{å…±å½¹ãƒœãƒƒã‚¯ã‚¹}
\label{subsub:conj}
\begin{CODEBOX}{}{prep:conj}
  \begin{align*}
    \left(\q{\qadj}\right)^T
    &amp;=\q{
      \qwire\qcap\n
      \qwire\qadj\qwire\n
      \qcup\qwire
    }=\q{
      \qcaprev\qwire\n
      \qwire\qadj\qwire\n
      \qwire\qcuprev
    }=\left(
      \q{
        \qwire\qcap\n
        \qwire\qasym\qwire\n
        \qcup\qwire
      }
    \right)^{\dagger}=\left(\q{\qtrans}\right)^{\dagger}
  \end{align*}
\end{CODEBOX}
\section{ç´&nbsp;å­ä¸€è¦§}
\label{sec:fcommands}
\begin{tcbraster}[raster columns=4,raster equal height=rows,fonttitle=\bfseries,
  colframe=cyan!90,coltitle=cyan!50,colbacktitle=black,
  subtitle style={boxrule=0.4pt,
  colback=black!70}
  ]
  \begin{tcolorbox}[adjusted title={\showcmd{qwire}[cyan]}]
    \[\q{\qwire}\]
  \end{tcolorbox}
  \begin{tcolorbox}[adjusted title={\showcmd{qbox}[cyan]}]
    \[
      \q{
        \qbox
      }
    \]
  \end{tcolorbox}
  \begin{tcolorbox}[adjusted title={\showcmd{qstate}[cyan]}]
    \[
      \q{
        \qstate
      }
    \]
  \end{tcolorbox}
  \begin{tcolorbox}[adjusted title={\showcmd{qeffect}[cyan]}]
    \[
      \q{
        \qeffect
      }
    \]
  \end{tcolorbox}
  \begin{tcolorbox}[adjusted title={\showcmd{qscalar}[cyan]}]
    \[
      \q{
        \qscalar
      }
    \]
  \end{tcolorbox}
  \begin{tcolorbox}[adjusted title={\showcmd{qunitob}[cyan]}]
    \[
      \q{
        \qunitob
      }
    \]
  \end{tcolorbox}
  \begin{tcolorbox}[adjusted title={\showcmd{qmul}[cyan]}]
    \[
      \q{
        \qmul[hlen=2]
      }
    \]
  \end{tcolorbox}
  \begin{tcolorbox}[adjusted title={\showcmd{qcomul}[cyan]}]
    \[
      \q{
        \qcomul[hlen=2]
      }
    \]
  \end{tcolorbox}
  \begin{tcolorbox}[adjusted title={\showcmd{qunit}[cyan]}]
    \[
      \q{
        \qunit
      }
    \]
  \end{tcolorbox}
  \begin{tcolorbox}[adjusted title={\showcmd{qcounit}[cyan]}]
    \[
      \q{
        \qcounit
      }
    \]
  \end{tcolorbox}
  \begin{tcolorbox}[adjusted title={\showcmd{qspider}[cyan]}]
    \[
      \q{
        \qspider[p=4,hlen=2]
      }
    \]
  \end{tcolorbox}
  \begin{tcolorbox}[adjusted title={\showcmd{qbraid}[cyan]}]
    \[
      \q{
          \qbraid
      }
    \]
  \end{tcolorbox}
  \begin{tcolorbox}[adjusted title={\showcmd{qbraidinv}[cyan]}]
    \[
      \q{
        \qbraidinv
      }
    \]
  \end{tcolorbox}
  \begin{tcolorbox}[adjusted title={\showcmd{qsym}[cyan]}]
    \[
      \q{
        \qsym
      }
    \]
  \end{tcolorbox}
  \begin{tcolorbox}[adjusted title={\showcmd{qcap}[cyan]}]
    \[
      \q{
        \qcap
      }
    \]
  \end{tcolorbox}
  \begin{tcolorbox}[adjusted title={\showcmd{qcup}[cyan]}]
    \[
      \q{
        \qcup
      }
    \]
  \end{tcolorbox}
  \begin{tcolorbox}[adjusted title={\showcmd{qwireu}[cyan]}]
    \[\q{\qwireup}\]
  \end{tcolorbox}
  \begin{tcolorbox}[adjusted title={\showcmd{qwired}[cyan]}]
    \[\q{\qwiredown}\]
  \end{tcolorbox}
  \begin{tcolorbox}[adjusted title={\showcmd{qwireuu}[cyan]}]
    \[\q{\qwireuu}\]
  \end{tcolorbox}
  \begin{tcolorbox}[adjusted title={\showcmd{qwiredd}[cyan]}]
    \[\q{\qwiredd}\]
  \end{tcolorbox}
  \begin{tcolorbox}[adjusted title={\showcmd{qasym}[cyan]}]
    \[
      \q{
        \qasym
      }
    \]
  \end{tcolorbox}
  \begin{tcolorbox}[adjusted title={\showcmd{qtrans}[cyan]}]
    \[
      \q{
        \qtrans
      }
    \]
  \end{tcolorbox}
  \begin{tcolorbox}[adjusted title={\showcmd{adj}[cyan]}]
    \[
      \q{
        \qadj
      }
    \]
  \end{tcolorbox}
  \begin{tcolorbox}[adjusted title={\showcmd{qconj}[cyan]}]
    \[
      \q{
        \qconj
      }
    \]
  \end{tcolorbox}
  \begin{tcolorbox}[adjusted title={\showcmd{qcaprev}[cyan]}]
    \[
      \q{
        \qcaprev
      }
    \]
  \end{tcolorbox}
  \begin{tcolorbox}[adjusted title={\showcmd{qcuprev}[cyan]}]
    \[
      \q{
        \qcuprev
      }
    \]
  \end{tcolorbox}
\end{tcbraster}
\addcontentsline{toc}{section}{å‚è€ƒæ–‡çŒ®}
\begin{thebibliography}{99}
  \bibitem{tikz-manual}
  Till Tantau,
  \textit{The TikZ and PGF Packages Manual for Version 3.1.10},
  Institut fÃ¼r Theoretische Informatik, UniversitÃ¤t zu LÃ¼beck,
  n.d.,
  \url{https://github.com/pgf-tikz/pgf}
  (retrieved March 22, 2025).
  \bibitem{geniussorting}
  Anonymous,
  \textit{Genius Sorting Algorithm},
  4chan Programming Board,
  January 20, 2011,
  \url{https://dis.4chan.org/read/prog/1295544154}
  (accessed January 20, 2011; link currently inactive).
  \bibitem{gfxhatena}
  gfx,
  \textit{å¸¸è­˜ã‚’è¦†ã™ã‚½ãƒ¼ãƒˆã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ&nbsp;ï¼ãã®åã‚‚"sleep sort"ï¼},
  Hatena Diary,
  May 19, 2011,
  \url{https://gfx.hatenadiary.org/entry/20110519/1305810786}.
  \bibitem{literateprograms}
  LiteratePrograms,
  \textit{Turing Machine Simulator in \LaTeX},
  \url{https://literateprograms.org/turing_machine_simulator__latex_.html},
  n.d.,
  retrieved March 22, 2025.
  \bibitem{overleaf}
  Overleaf,
  \textit{\LaTeX\ is More Powerful than You Think: Computing the Fibonacci Numbers and Turing Completeness},
  \url{https://www.overleaf.com/learn/latex/Articles/LaTeX_is_More_Powerful_than_you_Think_-_Computing_the_Fibonacci_Numbers_and_Turing_Completeness},
  n.d.,
  retrieved March 22, 2025.
\end{thebibliography}
\begin{changelog}[author=æ–°åäº®å¤ª, sectioncmd=\section*]
  \begin{version}[v=1.1.1, date=2025-04-14]
    \added
      \item å½©è‰²æ©Ÿèƒ½\par å›³å¼è¡¨ç¾ã«ãŠã„ã¦, çµ„ç´, ã‚·ãƒ³ãƒ¡ãƒˆãƒªãƒ¼, ã‚­ãƒ£ãƒƒãƒ—, ã‚«ãƒƒãƒ—ç­‰ã«å¯¾ã—ã¦è‰²å±žæ€§ã‚’æŒ‡å®šã§ãã‚‹ã‚ˆã†ã«ãªã£ãŸ. å¯¾è±¡ã®è­˜åˆ¥ã«æœ‰åŠ¹ãªè¦–è¦šçš„æ‰‹ãŒã‹ã‚Šã‚’æä¾›ã™ã‚‹. 
    \fixed
      \item ãƒ¯ã‚¤ãƒ¤ãƒ¼ã‚„çµ„ç´, ã‚·ãƒ³ãƒ¡ãƒˆãƒªãƒ¼, ã‚­ãƒ£ãƒƒãƒ—, ã‚«ãƒƒãƒ—ã®æ›²ç·šå‡¦ç†ãŒä¿®æ­£ã•ã‚Œ, ã‚ˆã‚Šæ»‘ã‚‰ã‹ãªæç”»ãŒå¯èƒ½ã¨ãªã£ãŸ. 
  \end{version}
  \begin{version}[v=1.1.0,date=2025-04-03]
    \changed
      \item ã‚³ãƒžãƒ³ãƒ‰ã®å¼•æ•°ä»•æ§˜ã®åˆ·æ–°\par ä»¥ä¸‹ã®ã‚³ãƒžãƒ³ãƒ‰ãŒã‚¢ãƒƒãƒ—ãƒ‡ãƒ¼ãƒˆã•ã‚Œ, å¾“æ¥ã®å¿…é&nbsp;ˆå¼•æ•°ã‹ã‚‰æŸ”è»Ÿãªã‚­ãƒ¼ãƒãƒªãƒ¥ãƒ¼å½¢å¼ã®æŸ”è»Ÿãªã‚ªãƒ—ã‚·ãƒ§ãƒ³å¼•æ•°ã¸ã¨å¤‰æ›´ã•ã‚ŒãŸ:
      \begin{itemize}
        \item \showcmd{symbolI}
        \item \showcmd{symbols}
        \item \showcmd{symbolS}
        \item \showcmd{symbolO}
        \item \showcmd{symboln}
        \item \showcmd{symbolN}
      \end{itemize}
      \begin{description}
        \item[æ—§ä»•æ§˜] \showcmd{symbolI[i]\{ID\}\{text\}[ä½ç½®ã‚ªãƒ—ã‚·ãƒ§ãƒ³]}[old]
        \item[æ–°ä»•æ§˜] \showcmd{symbolI[i]\{text\}[id=ID, ä½ç½®ã‚ªãƒ—ã‚·ãƒ§ãƒ³]}[new]
      \end{description}
      ã“ã®å¤‰æ›´ã«ã‚ˆã‚Š, \showcmd[]{ID}ã®æŒ‡å®šã‚’çœç•¥ã§ãã‚‹ã‚ˆã†ã«ãªã‚Š, å¾“æ¥ã®\showcmd{symbolI\{ID\}\{text\}}[old]ã«æ¯”ã¹, \showcmd[]{ID}ãŒä¸è¦ãªå&nbsp;´é¢ã§ã¯\showcmd{symbolI\{text\}}[new]ã¨è¨˜è¿°ã™ã‚‹ã&nbsp;ã‘ã§æ¸ˆã‚€ã‚ˆã†ã«ãªã£ãŸ. çµæžœã¨ã—ã¦, è¨˜è¿°é‡ãŒå‰Šæ¸›ã•ã‚Œã‚³ãƒ¼ãƒ‰ã®å¯èª­æ€§ãŒå‘ä¸Šã—ãŸ. 
    \added
      \item è‹±èªžã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®è¿½åŠ&nbsp;\par ãƒ‘ãƒƒã‚±ãƒ¼ã‚¸ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¬ã‚¤ãƒ‰ (è‹±èªžç‰ˆ) ã‚’æ–°ãŸã«è¿½åŠ&nbsp;ã—ãŸ. 
  \end{version}
  \shortversion{v=1.0.0,
    date=2025-04-01,
    changes={åˆå›žãƒªãƒªãƒ¼ã‚¹}
  }
\end{changelog}
\section*{License and Copyright}

This package is distributed under the \textbf{LaTeX Project Public License (LPPL)}, version 1.3c or later.  
For details, see \url{https://www.latex-project.org/lppl.txt}.

Copyright \textcopyright 2025 Niina Ryota

You are free to distribute and modify this package under the terms of LPPL.  
However, any modified versions \textbf{must not} be distributed under the original name, and the original author must be credited.
\end{document}</pre></body></html>