summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/quantikz/tikzlibraryquantikz.code.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/quantikz/tikzlibraryquantikz.code.tex')
-rw-r--r--Master/texmf-dist/tex/latex/quantikz/tikzlibraryquantikz.code.tex171
1 files changed, 146 insertions, 25 deletions
diff --git a/Master/texmf-dist/tex/latex/quantikz/tikzlibraryquantikz.code.tex b/Master/texmf-dist/tex/latex/quantikz/tikzlibraryquantikz.code.tex
index 3c67e016daf..ff85895781e 100644
--- a/Master/texmf-dist/tex/latex/quantikz/tikzlibraryquantikz.code.tex
+++ b/Master/texmf-dist/tex/latex/quantikz/tikzlibraryquantikz.code.tex
@@ -1,9 +1,20 @@
-%This is the quantikz library for typesetting quantum circuits using LaTeX/Tikz. version 0.9.4
+%This is the quantikz library for typesetting quantum circuits using LaTeX/Tikz. version 0.9.6
% Written by Alastair Kay, 2018. Published under a CC-BY-4.0 licence
% Please email me (alastair.kay@rhul.ac.uk) with any bug reports or feature requests.
% If you find this library useful, please cite its usage in your work, using arXiv:1809.03842, and possibly the DOI: 10.17637/rh.7000520.
% Usage is at your own risk.
+%version 0.9.6:
+% changed packaging so there isn't a compile warning any more
+% modified the meter command so that \meter[draw=blue]{} colours everything blue, not just outline.
+% added trash command
+% added \ctrlbundle command so that \ctrl works well with \qwbundle[alternate]. If you supple \ctrlbundle[2]{}, then the bundle only contains 2 wires instead of the default of 3
+% \qwbundle[alternate] now also works with the parameter \qwbundle[alternate=2] to only have 2 wires in the bundle.
+% added \midstick. Works a bit like rstick and lstick, but reserves space for the text. Can choose to have brackets=none|left|right|both (default is both). Gives better method for circuit identities and other things.
+% added "align equals at" key for setting circuit identities (specifies wire number that should line up with equals. can be non-integer)
+% added makeebit command. accepts one parameter which is the text. Haven't got tyling and different angles of the split working yet.
+% added bundle option to supplement nwires and cwires.
+% fixed bug where you couldn't put a wire command after the declaration of a multi-qubit gate command.
%version 0.9.5:
% fixed bug which meant multi-wire gates didn't work outside of an environment such as center.
%version 0.9.4:
@@ -32,13 +43,13 @@
%version 0.9.0:
%original release.
-\ProvidesPackage{quantikz}[2019/04/24 typeset quantum circuit diagrams]
+%\ProvidesPackage{quantikz}[2020/04/27 typeset quantum circuit diagrams]
% Package(s) to include
-\RequirePackage{xargs,ifthen,xstring,xparse,etoolbox,mathtools}
+\RequirePackage{xargs,ifthen,xstring,xparse,etoolbox,mathtools,pgfmath}
\RequirePackage{environ} %in an attempt to help with compatibility with the external library of tikz.
-\RequirePackage{tikz}
-\usetikzlibrary{cd,decorations.pathreplacing,calc,positioning,fit,shapes.symbols,decorations.pathmorphing,shapes.misc,backgrounds,decorations.markings}
+%\RequirePackage{tikz}
+\usetikzlibrary{cd,decorations.pathreplacing,calc,positioning,fit,shapes.symbols,decorations.pathmorphing,shapes.misc,backgrounds,decorations.markings,math}
\newlength{\myl}
\newlength{\myh}
@@ -126,6 +137,10 @@
% \minwidth
% }
+%find the vertical position of the middle of an equals sign
+%https://tex.stackexchange.com/questions/355680/how-can-i-vertically-align-an-equals-sign-in-a-tikz-node/355686
+\pgfmathsetmacro\MathAxis{height("$\vcenter{}$")}
+
%the main gate command
\DeclareExpandableDocumentCommand{\gate}{O{}O{1.5pt}O{1.5pt}m}{%optional parameter contains styling info. compulsory is gate text.
|[inner sep=4pt,minimum width=#2,minimum height=#3]|%
@@ -143,6 +158,7 @@
\pgfkeysgetvalue{/quantikz/label style}{\b}
\pgfkeysgetvalue{/quantikz/cwires}{\mylist}
\pgfkeysgetvalue{/quantikz/nwires}{\nowires}
+ \pgfkeysgetvalue{/quantikz/bundle}{\bundle}
\ifthenelse{\toswap=1}{%if it's a swap gate...
\def\quantwires{2}
\phantom{wide}
@@ -162,29 +178,32 @@
}
}
%
- \IfInList{1}{\mylist}{\cw}{\IfInList{1}{\nowires}{}{\qw}}%do we need classical, no wire, or quantum wire?
+ \IfInList{1}{\mylist}{\cw}{\IfInList{1}{\nowires}{}{\IfInList{1}{\bundle}{\qwbundle[alternate]{}}{\qw}}}%do we need classical, no wire, or quantum wire?
\edef\k{\the\numexpr\n+\quantwires-1\relax}
\edef\mn{\the\numexpr\m-1\relax}
\ifthenelse{\quantwires=1}{}{%more than 1 wire on gate. iterate through each wire
\foreach \i in {\the\numexpr\n+1\relax,...,\k} {
\edef\newcom{\noexpand\vcwhexplicit{\i-\m}{\i-\mn}}
\edef\newcomb{\noexpand\vqwexplicit{\i-\m}{\i-\mn}}
+ \edef\newcomc{\noexpand\vqbundleexplicit{\i-\m}{\i-\mn}}
\edef\val{\the\numexpr\i+1-\n\relax}
- \IfInList{\val}{\mylist}{\newcom}{\IfInList{\val}{\nowires}{}{\newcomb}}%do we need classical, no wire, or quantum wire?
+ \IfInList{\val}{\mylist}{\newcom}{\IfInList{\val}{\nowires}{}{\IfInList{\val}{\bundle}{\newcomc}{\newcomb}}}%do we need classical, no wire, or quantum wire?
%apply auto width to the cell, and make sure we unset the setting so that it doesn't apply to later circuits.
+ %I think use of globaldefs in this way is very slow, but I don't know of a better way.
\globaldefs=1
- \edef\dotikzset{\noexpand\tikzset{row \i\space column \m/.append style={minimum width={max(\the\myl+8pt,#2)}}}}
- \dotikzset
- \edef\undotikzset{\noexpand\tikzset{row \i\space column \m/.style={}}}
- \expandafter\pgfutil@g@addto@macro\expandafter\tikzcd@atendglobals\expandafter{\undotikzset}
+ \edef\dotikzset{\noexpand\tikzset{row \i\space column \m/.append style={minimum width={max(\the\myl+8pt,#2)}}}}%
+ \dotikzset%
+ \edef\undotikzset{\noexpand\tikzset{row \i\space column \m/.style={}}}%
+ \expandafter\pgfutil@g@addto@macro\expandafter\tikzcd@atendglobals\expandafter{\undotikzset}%
}
%apply auto height to last row only. unsetting already handled above.
- \globaldefs=1
- \edef\dotikzset{\noexpand\tikzset{row \k\space column \m/.append style={minimum height={max(\the\myh+\the\myd+8pt,#3)}}}}
- \dotikzset
+ \globaldefs=1%
+ \edef\dotikzset{\noexpand\tikzset{row \k\space column \m/.append style={minimum height={max(\the\myh+\the\myd+8pt,#3)}}}}%
+ \dotikzset%
+ \globaldefs=0%
%
}
- %call deferred gate command.
+ %call deferred gate command. to be executed after the tikzcd matrix stuff is completed
\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\pgfutil@g@addto@macro\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\tikzcd@atendsavedpaths\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter{%
\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\gate@end\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter{\expandafter\expandafter\expandafter\a\expandafter\expandafter\expandafter}\expandafter\expandafter\expandafter{\expandafter\b\expandafter}\expandafter{\options}{#4}
}
@@ -195,12 +214,13 @@
\pgfkeys{/quantikz,wires=1}
\def\toswap{0}
\def\DisableMinSize{0}
- \pgfkeys{/quantikz,#3}%
+ \pgfkeys{/quantikz,#3}%import options
\pgfkeysgetvalue{/quantikz/wires}{\quantwires}
\pgfkeysgetvalue{/quantikz/row}{\row}
\pgfkeysgetvalue{/quantikz/col}{\col}
\ifthenelse{\toswap=1}{\def\quantwires{2}}{}
\xdef\LoopGG{}
+ %create a list of cell names to be included in this grouped gate
\foreach \n in {\row,...,\the\numexpr\row+\quantwires-1\relax} {
\ifnodedefined{\tikzcdmatrixname-\n-\col}{
\xdef\LoopGG{\LoopGG(\tikzcdmatrixname-\n-\col)}
@@ -212,6 +232,7 @@
\draw [line width=3pt,white,shorten >=0.9pt,shorten <=0.9pt] (group\tikzcdmatrixname-\row-\col.east|-\tikzcdmatrixname-\row-\col.center) to[out=180,in=0] (group\tikzcdmatrixname-\row-\col.west|-\tikzcdmatrixname-\the\numexpr\row+1\relax-\col.center);
\draw [thickness] (group\tikzcdmatrixname-\row-\col.east|-\tikzcdmatrixname-\row-\col.center) to[out=180,in=0] (group\tikzcdmatrixname-\row-\col.west|-\tikzcdmatrixname-\the\numexpr\row+1\relax-\col.center);
}{
+ %the actual gate drawing command
\node (group\tikzcdmatrixname-\row-\col) [fit=\LoopGG,operator,inner sep=0pt,label={[gg label,#2]$#4$},#1] {\hphantom{$#4$}};
}
}
@@ -290,6 +311,41 @@
\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\groupoutput@end\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter{\expandafter\expandafter\expandafter\newoptions\expandafter\expandafter\expandafter}\expandafter\expandafter\expandafter{\expandafter\options\expandafter}\expandafter{\opts}{#2}%
}
}
+
+\newcommand\midstick[2][]{%
+ \hphantom{\text{gg#2gg}}\ %leave enough space for whatever text we've inserted
+ \pgfkeys{/quantikz,wires=1,style=,label style=,braces=}
+ \pgfkeys{/quantikz,#1}%
+ \edef\newoptions{row=\the\pgfmatrixcurrentrow,col=\the\pgfmatrixcurrentcolumn,#1}
+ \pgfkeysgetvalue{/quantikz/wires}{\quantwires}
+ \pgfkeysgetvalue{/quantikz/label style}{\options}
+ \pgfkeysgetvalue{/quantikz/braces}{\opts}
+ \edef\n{\the\pgfmatrixcurrentrow} %the row
+ \edef\m{\the\pgfmatrixcurrentcolumn} %the column
+ \edef\mn{\the\numexpr\m-1\relax}
+ \edef\k{\the\numexpr\n+\quantwires-1\relax}
+ \settowidth{\myl}{gg#2gg}
+ %if more than 1 wire, need to reserve space for each wire
+ \ifthenelse{\quantwires=1}{}{
+ \foreach \i in {\the\numexpr\n+1\relax,...,\k} {
+ \edef\val{\the\numexpr\i+1-\n\relax}
+ %apply auto width to the cell, and make sure we unset the setting so that it doesn't apply to later circuits.
+ %I think use of globaldefs in this way is very slow, but I don't know of a better way.
+ \globaldefs=1
+ \edef\dotikzset{\noexpand\tikzset{row \i\space column \m/.append style={minimum width={\the\myl}}}}
+ \dotikzset
+ \edef\undotikzset{\noexpand\tikzset{row \i\space column \m/.style={}}}
+ \expandafter\pgfutil@g@addto@macro\expandafter\tikzcd@atendglobals\expandafter{\undotikzset}
+ \globaldefs=0
+ }
+%
+ }
+ %\edef\n{\the\pgfmatrixcurrentrow}
+ %\edef\m{\the\pgfmatrixcurrentcolumn}
+ \expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\pgfutil@g@addto@macro\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\tikzcd@atendsavedpaths\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter{%
+ \expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\groupoutput@mid\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter{\expandafter\expandafter\expandafter\newoptions\expandafter\expandafter\expandafter}\expandafter\expandafter\expandafter{\expandafter\options\expandafter}\expandafter{\opts}{#2}%
+ }
+}
%deferred labelling of inputs
\newcommand{\groupinput@end}[4]{%basic data as keys, lable options, brace options, text
\pgfkeys{/quantikz,wires=1}
@@ -311,7 +367,7 @@
}
} %
%deferred labelling of outputs
-\newcommand{\groupoutput@end}[4]{%basic data as keys, lable options, brace options, text
+\newcommand{\groupoutput@end}[4]{%basic data as keys, label options, brace options, text
\pgfkeys{/quantikz,wires=1}
\pgfkeys{/quantikz,#1}%
\pgfkeysgetvalue{/quantikz/wires}{\quantwires}
@@ -329,6 +385,31 @@
\draw[dd,#3] ($(outgr-\row.north east)+(0.1cm,0.1cm)$) to node[midway,align=center,anchor=west,xshift=0.1cm,#2] {#4} ($(outgr-\row.south east)+(0.1cm,-0.1cm)$);
}
} %
+%deferred labelling in the middle of circuits
+\newcommand{\groupoutput@mid}[4]{%basic data as keys, label options, brace options, text
+ \pgfkeys{/quantikz,wires=1}
+ \def\leftbrace{1}\def\rightbrace{1}
+ \pgfkeys{/quantikz,#1}%
+ \pgfkeysgetvalue{/quantikz/wires}{\quantwires}
+ \pgfkeysgetvalue{/quantikz/row}{\row}
+ \pgfkeysgetvalue{/quantikz/col}{\col}
+ \xdef\LoopGO{}
+ \foreach \n in {\row,...,\the\numexpr\row+\quantwires-1\relax} {
+ \ifnodedefined{\tikzcdmatrixname-\n-\col}{
+ \xdef\LoopGO{\LoopGO(\tikzcdmatrixname-\n-\col)}
+ }}
+ \ifthenelse{\quantwires=1} {
+ \node (midgr-\row-\col) [fit=\LoopGO, inner sep=0pt,label={[align=center,#2]#4}] {};
+ }{
+ \node (midgr-\row-\col) [fit=\LoopGO, inner sep=0pt,label={[anchor=mid,#2]center:#4}] {};
+ \ifthenelse{\rightbrace=1}{
+ \draw[dm,#3] ($(midgr-\row-\col.north east)+(-0.1cm,0.05cm)$) to ($(midgr-\row-\col.south east)+(-0.1cm,-0.05cm)$);
+ }{}
+ \ifthenelse{\leftbrace=1}{
+ \draw[dd,#3] ($(midgr-\row-\col.north west)+(0.1cm,0.05cm)$) to ($(midgr-\row-\col.south west)+(0.1cm,-0.05cm)$);
+ }{}
+ }
+} %
%inputs and outputs within a multi-wire gate
\newcommand\gateinput[2][]{%
\pgfkeys{/quantikz,wires=1,style=,label style=,braces=}%
@@ -409,6 +490,14 @@
\node (wave-#1) [fit=(\tikzcdmatrixname-row#1),wave,#2] {};
}
+\DeclareDocumentCommand{\makeebit}{O{-45}O{}m}{
+ \arrow[arrows,line cap=round,to path={(\tikztostart) -- ($(\tikztostart)!{0.5/cos(#1)}!#1:(\tikztotarget)$) node [anchor=east,style={#2}]{#3} -- (\tikztotarget) }]{d}
+}
+
+% \newcommand{\makeebit}[2][-45]{
+% \arrow[arrows,line cap=round,to path={(\tikztostart) -- ($(\tikztostart)!0.707!#1:(\tikztotarget)$) node [anchor=east]{#2} -- (\tikztotarget) }]{d}
+% }
+
%put a border around a group of gates
\newcommand\gategroup[2][]{%
\pgfkeys{/quantikz,wires=1,style=,label style=,braces=}
@@ -484,7 +573,7 @@
\def\errmessage##1{\tikzcd@errmessage{##1^^J...^^Jl.\tikzcd@lineno\space%
I think the culprit is a tikzcd arrow in cell \tikzcd@currentrow-\tikzcd@currentcolumn}}%
\tikzcd@before@paths@hook%
- \tikzcd@savedpaths\tikzcd@atendsavedpaths\tikzcd@atendlabels\tikzcd@atendslices{\globaldefs=1\tikzcd@atendglobals}%I just added stuff here instead
+ \tikzcd@savedpaths\tikzcd@atendsavedpaths\tikzcd@atendlabels\tikzcd@atendslices{\globaldefs=1\tikzcd@atendglobals\globaldefs=0}%I just added stuff here instead
\endgroup%
\end{tikzpicture}%
\ifnum0=`{}\fi}
@@ -521,15 +610,37 @@
}
}
-%initialise all the pgfkeys for key=value parametre passing in macro options
+%take a parameter, row number, where we want to set the baseline. if not integer, use the two rows spanned
+\providecommand{\setmiddle}[1]{%
+\IfInteger{#1}{
+\pgfmathtruncatemacro\wholepart{floor(#1)}
+\edef\temp{\noexpand\tikzset{%
+/tikz/baseline={([yshift=-\MathAxis]\noexpand\tikzcdmatrixname-\wholepart-1.base)}
+}}
+%\show\temp
+\temp
+}{%
+\pgfmathtruncatemacro\wholepart{floor(#1)}
+\pgfmathtruncatemacro\neighbour{floor(#1)+1}
+\pgfmathsetmacro\fractionalpart{#1-floor(#1)}
+\edef\temp{\noexpand\tikzset{%
+/tikz/baseline={([yshift=-\MathAxis]$(\noexpand\tikzcdmatrixname-\wholepart-1.base)!\fractionalpart!(\noexpand\tikzcdmatrixname-\neighbour-1.base)$)}
+}}
+%\show\temp
+\temp
+}
+}
-\pgfkeys{/tikz/slice all/.code={\def\toslice{1}},/tikz/remove end slices/.initial=0,/tikz/slice titles/.initial={\col},/tikz/slice style/.initial={},/tikz/slice label style/.initial={},/tikz/thin lines/.code={\resetstyles},/tikz/transparent/.code={\maketransparent},/tikz/vertical slice labels/.code={\def\vert{1}}}
+%initialise all the pgfkeys for key=value parameter passing in macro options
+
+\pgfkeys{/tikz/slice all/.code={\def\toslice{1}},/tikz/remove end slices/.initial=0,/tikz/slice titles/.initial={\col},/tikz/slice style/.initial={},/tikz/slice label style/.initial={},/tikz/thin lines/.code={\resetstyles},/tikz/transparent/.code={\maketransparent},/tikz/vertical slice labels/.code={\def\vert{1}},/tikz/align equals at/.code={\setmiddle{#1}}}
\pgfkeys{/quantikz/.is family,/quantikz,%
.unknown/.style={%
/quantikz/wires=\pgfkeyscurrentname
},%
wires/.initial=1,%
-style/.initial={},label style/.initial={},braces/.initial={},background/.code={\def\background{1}},alternate/.code={\def\helper{1}},row/.initial=1,col/.initial=1,steps/.initial=1,Strike Width/.initial=0.08cm,Strike Height/.initial=0.12cm,swap/.code={\def\toswap{1}},disable auto height/.code={\def\DisableMinSize{1}},cwires/.initial={-1},nwires/.initial={-1}}
+style/.initial={},label style/.initial={},braces/.initial={},background/.code={\def\background{1}},alternate/.default=1,alternate/.code={\def\helper{#1}},row/.initial=1,col/.initial=1,steps/.initial=1,Strike Width/.initial=0.08cm,Strike Height/.initial=0.12cm,swap/.code={\def\toswap{1}},disable auto height/.code={\def\DisableMinSize{1}},cwires/.initial={-1},nwires/.initial={-1},bundle/.initial={-1},brackets/.is choice,brackets/.initial=both}
+\pgfkeys{/quantikz,brackets/.cd,none/.code={\def\leftbrace{0}\def\rightbrace{0}},left/.code={\def\leftbrace{1}\def\rightbrace{0}},right/.code={\def\leftbrace{0}\def\rightbrace{1}},both/.code={\def\leftbrace{1}\def\rightbrace{1}}}
%my standard Dirac notation commands. can be overridden by user.
\providecommand{\ket}[1]{\ensuremath{\left|#1\right\rangle}}
@@ -554,9 +665,12 @@ style/.initial={},label style/.initial={},braces/.initial={},background/.code={\
\DeclareExpandableDocumentCommand{\measuretab}{O{}{m}}{|[measuretab,#1]| {#2} \qw}
\DeclareExpandableDocumentCommand{\meterD}{O{}{m}}{|[meterD,#1]| {#2} \qw}
\DeclareExpandableDocumentCommand{\measure}{O{}{m}}{|[measure,#1]| {#2} \qw}
+\DeclareExpandableDocumentCommand{\trash}{O{}{m}}{|[trash,label={below:#2},#1]| {} \qw}
+
%controlled gates
\def\ctrl#1{\control{} \vqw{#1}}
+\DeclareExpandableDocumentCommand{\ctrlbundle}{O{1}O{}m}{|[phase bundle,#2]| {} \vqw{#3}\qwbundle[alternate=#1]{}}
\def\octrl#1{\ocontrol{}\vqw{#1}}
\def\swap#1{%
\targX{}
@@ -582,6 +696,9 @@ style/.initial={},label style/.initial={},braces/.initial={},background/.code={\
\newcommand{\vqwexplicit}[2]{
\arrow[from=#1,to=#2,arrows] {}
}
+\newcommand{\vqbundleexplicit}[2]{
+ \arrow[from=#1,to=#2,arrows] {} \arrow[from=#1,to=#2,arrows,yshift=0.1cm] {}\arrow[from=#1,to=#2,arrows,yshift=-0.1cm] {}
+}
%classical vertical wire, absolute positioning
\newcommand{\vcwexplicit}[2]{
\arrow[from=#1,to=#2,arrows,xshift=0.05cm] {}\arrow[from=#1,to=#2,arrows,xshift=-0.05cm] {}
@@ -604,10 +721,12 @@ style/.initial={},label style/.initial={},braces/.initial={},background/.code={\
\newcommand{\qwbundle}[2][]{\ifthenelse{\the\pgfmatrixcurrentcolumn>1}{
\def\helper{0}
\pgfset{/quantikz,#1}
- \ifthenelse{\helper=1}{
- \arrow[arrows,yshift=0.1cm]{l}\arrow[arrows]{l}\arrow[arrows,yshift=-0.1cm]{l}
+ \ifthenelse{\helper>0}{
+ \arrow[arrows,yshift=0.1cm]{l}
+ \ifthenelse{\helper=1}{\arrow[arrows]{l}}{}
+ \arrow[arrows,yshift=-0.1cm]{l}
}{
- \arrow[phantom,strike arrow]{l}[xshift=\pgfkeysvalueof{/quantikz/Strike Width}, yshift=\pgfkeysvalueof{/quantikz/Strike Height},anchor=south west,inner sep=0pt]{\scriptstyle #2}
+ \arrow[phantom,strike arrow]{l}[xshift=\pgfkeysvalueof{/quantikz/Strike Width}, yshift=\pgfkeysvalueof{/quantikz/Strike Height},anchor=south west,inner sep=0pt]{\scriptstyle #2}\qw
}}{}}
@@ -629,6 +748,7 @@ style/.initial={},label style/.initial={},braces/.initial={},background/.code={\
rightinternal/.style={anchor=mid east,font=\scriptsize,inner sep=4pt,align=center},
wave/.style={inner sep=-3pt,tape,fill=white,apply={draw=black} except on segments {5,6,1,2,9}},
phase/.style={fill,shape=circle,minimum size=4pt},
+ phase bundle/.style={fill,shape=rectangle,rounded corners=1.5pt,minimum width=4pt,minimum height=10pt},
phase label/.style={label distance=2mm,anchor=mid,label position=45},
ophase/.style={fill=white,draw=black,shape=circle,minimum size=4pt},
internal/.style={thickness,black},
@@ -645,11 +765,12 @@ style/.initial={},label style/.initial={},braces/.initial={},background/.code={\
(path picture bounding box.south east) -- (path picture bounding box.north west) (path picture bounding box.south west) -- (path picture bounding box.north east) (path picture bounding box.west) -- (path picture bounding box.east);
}},
crossx2/.style={circle,crossx,minimum size=1em},
+ trash/.style={path picture={\draw[internal,inner sep=0pt,-stealth] (path picture bounding box.west) -- (path picture bounding box.center) -- (path picture bounding box.south);},minimum height=2.5em,minimum width=2em},
dd/.style={decoration={brace},decorate,thickness},
dm/.style={decoration={brace,mirror},decorate,thickness},
slice/.style={thickness,red,dash pattern=on 5pt off 3pt,align=center},
meter/.style={draw,fill=white,minimum width=2em,minimum height=1.5em, rectangle, font=\vphantom{A}, thickness,
- path picture={\draw[black] ([shift={(.1,.24)}]path picture bounding box.south west) to[bend left=50] ([shift={(-.1,.24)}]path picture bounding box.south east);\draw[black,-{Latex[scale=0.6]}] ([shift={(0,.1)}]path picture bounding box.south) -- ([shift={(.3,-.1)}]path picture bounding box.north);}},
+ path picture={\draw ([shift={(.1,.24)}]path picture bounding box.south west) to[bend left=50] ([shift={(-.1,.24)}]path picture bounding box.south east);\draw[-{Latex[scale=0.6]}] ([shift={(0,.1)}]path picture bounding box.south) -- ([shift={(.3,-.1)}]path picture bounding box.north);}},
measuretab/.style={draw,signal,signal to=west,inner sep=4pt,fill=white},
meterD/.style={draw,rounded rectangle,rounded rectangle left arc=none,inner sep=4pt,fill=white},
measure/.style={draw,rounded rectangle,inner sep=4pt,fill=white},