答案1
默认情况下,有用于左、右、上、下循环的键,但可以轻松定义任意角度的版本,这允许人们修改开口角度和松散度,从而控制循环的“长度”。
\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{arrows.meta,bending,automata,positioning,quotes}
\begin{document}
\begin{tikzpicture}[angle loop/.style={out=#1+30,in=#1-30,loop,looseness=15},
>={Stealth[bend]},auto,every state/.append style={minimum size=1.5em}]
\node[state] (A){};
\node[state,right=2cm of A] (B){};
\path[->] (A) edge[angle loop=180,"{$(1,0)$}"] (A)
(A) edge["{$(0,1)$}"] (B)
(B) edge[angle loop=60,"{$(0,0)$}"] (B)
(B) edge[angle loop=-60,"{$(1,1)$}"] (B);
\end{tikzpicture}
\end{document}