\NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{quantum} [2011/01/23 v0.2.1 Dirac notation, operator commands, and other quantum stuff] % need amsmath for all kinds of stuff \usepackage{amsmath} % need blackboard fonts for identity and field symbols \usepackage{bbm} %---- identity symbol ---- \newcommand{\identity}{\mathbbm{1}} %\newcommand{\identity}{\mbox{$1 \hspace{-1.0mm} {\bf l}$}} % various fields \newcommand{\RR}{\mathbbm{R}} \newcommand{\CC}{\mathbbm{C}} \newcommand{\FF}{\mathbbm{F}} \newcommand{\NN}{\mathbbm{N}} \newcommand{\ZZ}{\mathbbm{Z}} \newcommand{\PP}{\mathbbm{P}} \newcommand{\QQ}{\mathbbm{Q}} \newcommand{\UU}{\mathbbm{U}} \newcommand{\EE}{\mathbbm{E}} %---- basic Dirac notation ----% %\newcommand{\bra}[2][]{\mathinner{\raisebox{-0.3em} % {\ensuremath{\scriptstyle #1}}\hspace{-0.2em}\langle #2|}} \newcommand{\bra}[2][]{\mathinner{\langle #2|}_{#1}} \newcommand{\ket}[2][]{\mathinner{|#2\rangle}_{\hspace{-0.1em}#1}} %\newcommand{\Bra}[2][]{\raisebox{-0.3em} % {\ensuremath{\scriptstyle{#1}}}\hspace{-0.2em}\left<#2\right|} \newcommand{\Bra}[2][]{\left<#2\right|_{#1}} \newcommand{\Ket}[2][]{\left|#2\right>_{\hspace{-0.1em}#1}} %\newcommand{\bigBra}[2][]{\raisebox{-0.3em} % {\ensuremath{\scriptstyle{#1}}}\hspace{-0.2em}\bigl<#2\bigr|} \newcommand{\bigBra}[2][]{\bigl<#2\bigr|_{#1}} \newcommand{\bigKet}[2][]{\bigl|#2\bigr>_{\hspace{-0.1em}#1}} %\newcommand{\BigBra}[2][]{\raisebox{-0.3em} % {\ensuremath{\scriptstyle{#1}}}\hspace{-0.2em}\Bigl<#2\Bigr|} \newcommand{\BigBra}[2][]{\Bigl<#2\Bigr|_{#1}} \newcommand{\BigKet}[2][]{\Bigl|#2\Bigr>_{\hspace{-0.1em}#1}} %\newcommand{\biggBra}[2][]{\raisebox{-0.3em} % {\ensuremath{\scriptstyle{#1}}}\hspace{-0.2em}\biggl<#2\biggr|} \newcommand{\biggBra}[2][]{\biggl<#2\biggr|_{#1}} \newcommand{\biggKet}[2][]{\biggl|#2\biggr>_{\hspace{-0.1em}#1}} %\newcommand{\BiggBra}[2][]{\raisebox{-0.3em} % {\ensuremath{\scriptstyle{#1}}}\hspace{-0.2em}\Biggl<#2\Biggr|} \newcommand{\BiggBra}[2][]{\Biggl<#2\Biggr|_{#1}} \newcommand{\BiggKet}[2][]{\Biggl|#2\Biggr>_{\hspace{-0.1em}#1}} %---- compound Dirac notation ---- \newcommand{\braket}[3][]{\mathinner{\langle #2|#3\rangle}_{\hspace{-0.1em}#1}} %\newcommand{\ketbra}[3][]{\mathinner{|#2\rangle % \raisebox{-0.3em}{\ensuremath{\scriptstyle #1}}\langle #3|}} \newcommand{\ketbra}[3][]{\mathinner{|#2\rangle\langle #3|}_{#1}} \newcommand{\Braket}[3][]{\left<#2\middle|#3\right>_{\hspace{-0.1em}#1}} %\newcommand{\Ketbra}[3][]{\left|#2\vphantom{#3}\right>\hspace{-0.2em}% % \raisebox{-0.3em}{\ensuremath{\scriptstyle #1}}\hspace{-0.2em}% % \left<#3\vphantom{#2}\right|} \newcommand{\Ketbra}[3][]{\left|#2\middle>\middle<#3\right|_{#1}} \newcommand{\braKet}[3]{\mathinner{\langle #1|#2|#3 \rangle}} \newcommand{\BraKet}[3]{\left< #1\vphantom{#2}\right| #2\left|#3 \vphantom{#2}\right>} \newcommand{\proj}[2][]{\ketbra[#1]{#2}{#2}} \newcommand{\Proj}[2][]{\Ketbra[#1]{#2}{#2}} %---- expectation values ---- \newcommand{\expect}[1]{\mathinner{\langle #1\rangle}} \newcommand{\Expect}[1]{\left< #1 \right>} \newcommand{\bigExpect}[1]{\bigl< #1 \bigr>} \newcommand{\BigExpect}[1]{\Bigl< #1 \Bigr>} \newcommand{\biggExpect}[1]{\biggl< #1 \biggr>} \newcommand{\BiggExpect}[1]{\Biggl< #1 \Biggr>} %---- miscelaneous quantum notation ---- \newcommand{\prj}{\Pi} \newcommand{\comm}[2]{[#1,#2]} \newcommand{\Comm}[2]{\left[#1,#2\right]} \newcommand{\Anticomm}[2]{\left\{#1,#2\right\}} \newcommand{\anticomm}[2]{\{#1,#2\}} %---- norms ---- \newcommand{\abs}[1]{|#1|} \newcommand{\Abs}[1]{\left\vert #1\right\vert} \newcommand{\bigAbs}[1]{\bigl\vert #1\bigr\vert} \newcommand{\BigAbs}[1]{\Bigl\vert #1\Bigr\vert} \newcommand{\biggAbs}[1]{\biggl\vert #1\biggr\vert} \newcommand{\BiggAbs}[1]{\Biggl\vert #1\Biggr\vert} \newcommand{\matnorm}[1]{\|#1\|} \newcommand{\Matnorm}[1]{\left\lVert #1\right\rVert} \newcommand{\bigMatnorm}[1]{\bigl\lVert #1\bigr\rVert} \newcommand{\BigMatnorm}[1]{\Bigl\lVert #1\Bigr\rVert} \newcommand{\biggMatnorm}[1]{\biggl\lVert #1\biggr\rVert} \newcommand{\BiggMatnorm}[1]{\Biggl\lVert #1\Biggr\rVert} \newcommand{\MatnormHS}[1]{\Matnorm{#1}_{\mathrm{HS}}} \newcommand{\matnormHS}[1]{\matnorm{#1}_{\mathrm{HS}}} \newcommand{\MatnormTr}[1]{\Matnorm{#1}_{\mathrm{tr}}} \newcommand{\matnormTr}[1]{\matnorm{#1}_{\mathrm{tr}}} \newcommand{\MatnormF}[1]{\Matnorm{#1}_{\mathrm{F}}} \newcommand{\matnormF}[1]{\matnorm{#1}_{\mathrm{F}}} %---- Horizontal version of \smash ---- \def\mathclap{\mathpalette\mathclapinternal} \def\mathclapinternal#1#2{\clap{$\mathsurround=0pt#1{#2}$}} \def\clap#1{\hbox to 0pt{\hss#1\hss}} \def\mathllap{\mathpalette\mathllapinternal} \def\mathrlap{\mathpalette\mathrlapinternal} \def\mathclap{\mathpalette\mathclapinternal} \def\mathllapinternal#1#2{\llap{$\mathsurround=0pt#1{#2}$}} \def\mathrlapinternal#1#2{\rlap{$\mathsurround=0pt#1{#2}$}} \def\mathclapinternal#1#2{\clap{$\mathsurround=0pt#1{#2}$}} %---- Shorthands ---- \DeclareMathOperator{\tr}{Tr} \DeclareMathOperator{\diag}{diag} \DeclareMathOperator{\real}{Re} \DeclareMathOperator{\imag}{Im} \DeclareMathOperator{\pfaf}{Pf} \DeclareMathOperator{\sgn}{sgn} \DeclareMathOperator{\vspan}{span} \DeclareMathOperator{\rank}{rank} \DeclareMathOperator{\schmidt}{Sch} \DeclareMathOperator{\prob}{Pr} \newcommand{\ox}{\otimes} \newcommand{\dg}{\dagger} \newcommand{\Span}[1]{\vspan\left\{#1\right\}} %\newcommand{\1}{\identity} \newcommand{\id}{\identity} \newcommand{\expectation}{\mathbb{E}} \newcommand{\order}[1]{O({#1})} \newcommand{\Order}[1]{O\left({#1}\right)} \newcommand{\bigOrder}[1]{O\bigl({#1}\bigr)} \newcommand{\BigOrder}[1]{O\Bigl({#1}\Bigr)} \newcommand{\biggOrder}[1]{O\biggl({#1}\biggr)} \newcommand{\BiggOrder}[1]{O\Biggl({#1}\Biggr)} \newcommand{\bipartition}[2]{#1|#2} \newcommand{\dd}{\mathrm{d}} \newcommand{\dt}{\delta t} \newcommand{\HS}{\mathcal{H}} \newcommand{\ebit}{\mathrm{ebit}} \newcommand{\hc}{\mathrm{h.c.}} \newcommand{\Wlog}{w.l.o.g.} \newcommand{\WLOG}{W.l.o.g.} \newcommand{\etal}{\textit{et al.}} \endinput %% %% End of file `quantum.sty'