我想画一个“八”(垂直双纽线)连接这个简单代码的第二层和第三层
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usepackage{float}
\usepackage{physics}
\usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue,citecolor=blue,pdfusetitle]{hyperref}
\usetikzlibrary{arrows,snakes,backgrounds}
\definecolor{blue}{rgb}{0.368417, 0.506779, 0.709798}
\definecolor{gray}{rgb}{0.43, 0.5, 0.5}
\definecolor{red}{rgb}{0.922526, 0.385626, 0.209179}
\definecolor{yellow}{rgb}{1.0, 0.75, 0.0}
\title{TikZ Level Diagram}
\begin{document}
\maketitle
\begin{figure}[h]
\begin{tikzpicture}
\tikzstyle{arr}=[<->,thick];
\node (L3) at (2,1) {$\ket{3}$};
\node (L2) at (2,0) {$\ket{2}$};
\node (L1) at (2,-1) {$\ket{1}$};
\node at (-0.3, 0.6) {$\omega_A$};
\node at (.5,-.4) {$\omega_B$};
\draw[black,thick] (0,1)--(L3);
\draw[black,thick] (0,0)--(L2);
\draw[black,thick] (0,-1)--(L1);
\draw[arr,red] (0,-1)--(0,1);
\draw[arr,blue] (.8,-1)--(.8,0);
\end{tikzpicture}
\end{figure}
\end{document}
编译结果如下:
我提到的“包装”应该是类似于“热与冷”之间的包装,但在垂直方向上以及在上面的代码输出的第二条和第三条绘制的线之间(来自:https://www.quantamagazine.org/quantum-correlations-reverse-thermodynamic-arrow-of-time-20180402/)
答案1
我确信,我不明白应该如何放置 8 以及将其放置在何处,但这是一个开始。我只是随机画一个 8,然后通过移动和缩放来放置它。
\documentclass[tikz, border=1cm]{standalone}
\usepackage{physics}
\begin{document}
\begin{tikzpicture}
\tikzstyle{arr}=[<->,thick];
\node (L3) at (2,1) {$\ket{3}$};
\node (L2) at (2,0) {$\ket{2}$};
\node (L1) at (2,-1) {$\ket{1}$};
\node at (-0.3, 0.6) {$\omega_A$};
\node at (.5,-.4) {$\omega_B$};
\draw[black,thick] (0,1)--(L3);
\draw[black,thick] (0,0)--(L2);
\draw[black,thick] (0,-1)--(L1);
\draw[arr,red] (0,-1)--(0,1);
\draw[arr,blue] (.8,-1)--(.8,0);
\begin{scope}[xshift=2, yshift=8, xscale=1, yscale=0.35]
\draw [thick, lime, dashed] (0,0) arc(-225:45:1) -- (0,{sqrt(2)}) arc (225:-45:1) -- cycle;
\end{scope}
\end{tikzpicture}
\end{document}