我需要绘制如图所示的(可能非常简单的)图表,但我以前从未使用过 Tikz。
我的问题基本上是如何绘制这些垂直虚线,并主要将数学排列成这样的块,这些箭头从一个指向另一个 - 当然,我写数学没有问题,所需的结构给我带来了问题。任何帮助都将不胜感激。提前致谢。
到目前为止,我能够做到这一点。我觉得我快完成了,但在对齐方面遇到了问题。有什么帮助吗?
\begin{tikzpicture}[square/.style={regular polygon,regular polygon sides=4}]
%Draw dashed lines
\draw [dashed] (2.5,0) -- (2.5,2);
\draw [dashed] (5,0) -- (5,2);
\draw [dashed] (7.5,0) -- (7.5,2);
%Draw nodes of equations
\node at (1.25,1) [square,inner sep=-1.3em, draw] {
$\begin{aligned}
\vert \Psi \rangle &= \sum_{i}{c_i \vert a_i \rangle},\\
&\sum_{i}{\vert a_i \rangle \langle a_i \vert} = \mathds{1}
\end{aligned}$
};
\node at (3.75,1) [square,inner sep=-1.3em, draw] {};
\node at (6.25,1) [square,inner sep=-1.3em, draw] {};
%Draw title nodes
\node at (1.25,2) [square,inner sep=-1.3em, draw] {$\left( \mathcal{H}, \langle \cdot \vert \cdot \rangle \right)$};
\node at (3.75,2) [square,inner sep=-1.3em, draw] {$\left( \mathcal{H}_{Phys}, \langle \cdot \vert \cdot \rangle _{\eta _{+}} \right)$};
\node at (6.25,2) [square,inner sep=-1.3em, draw] {$\left( \mathcal{H}, \langle \cdot \vert \cdot \rangle \right)$};
\end{tikzpicture}
另外,我不知道这是否是实现我想要的目标的好方法。谢谢。
答案1
还有arydshln
一些技巧。
\documentclass{article}
\usepackage{amsmath,braket,rsfso,arydshln}
\newcommand{\blank}{{\,{\cdot}\,}}
\begin{document}
\begin{equation*}
\addtolength{\arraycolsep}{0.5em}
\begin{array}{@{}c@{}c:c@{}c:c@{}}
% first column
\begin{gathered}[t]
(\mathcal{H},\braket{\blank|\blank}) \\
\ket{\psi}=\sum_i c_i\ket{a_i} \\
\sum_i \lvert a_i\times a_i\rvert = 1
\end{gathered}
&\makebox[0pt][l]{\raisebox{-2\normalbaselineskip}{$\:\longrightarrow$}}&
%second column
\begin{gathered}[t]
(\mathcal{H}_{\rho hy},\braket{\blank|\blank}_{\eta_+}) \\
\begin{aligned}
\ket{\psi} &\to \ket{\psi'}=\sum_i c_i\rho^{-1}\ket{a_i} \\
\ket{\psi'} &\to \ket{\psi'(t)}=e^{-iHt/\hbar}\ket{\psi'}
\end{aligned}
\end{gathered}
&\makebox[0pt][l]{\raisebox{-2\normalbaselineskip}{$\:\longrightarrow$}}&
% third column
\begin{gathered}[t]
(\mathcal{H},\braket{\blank|\blank}) \\
\begin{aligned}
& \ket{\psi'} \to \ket{\psi(t)} = \rho\ket{\psi'(t)} \\
& \quad = \rho e^{-iHt/\hbar}\ket{\psi'} \\
& \quad = \rho e^{-iHt/\hbar}\rho^{-1}\ket{\psi} \\
& \quad = e^{-iHt/\hbar}\ket{\psi}
\end{aligned}
\end{gathered}
\end{array}
\end{equation*}
\end{document}