所以我尝试了
\begin{figure}[!tbp]
\centering
\begin{minipage}[b]{0.4\textwidth}
\includegraphics[width=1\textwidth]{configuration}
\caption{Nearest-neighbour marginals for minimal 5-qubit configurations}
\label{fig:5qbconf}
\end{minipage}
\hfill
\begin{minipage}[b]{0.4\textwidth}
\begin{table}
\begin{tabular}{|c|c|c|}
\hline
\multicolumn{1}{|c|}{\textbf{\large Configuration \hspace{0.1cm} }} & \multicolumn{1}{c|}{\textbf{\large \hspace{0.2cm} $ \Tr[\rho W] $ \hspace{0.2cm} }} & \multicolumn{1}{c|}{\textbf{\large \hspace{0.1cm} Pure \hspace{0.1cm} }}\tabularnewline
\hline
\hline
\multicolumn{3}{|c|}{\textbf{4-Qubit Configurations}}\tabularnewline
\hline
\hline
\includegraphics[scale=0.5]{4qb_1} & $-3.15 \cdot 10^{-3}$ & No \tabularnewline
\hline
\includegraphics[scale=0.5]{4qb_2} & $-3.56\cdot 10^{-3}$ & Yes\tabularnewline
\hline
\hline
\multicolumn{3}{|c|}{\textbf{5-Qubit Configurations}}\tabularnewline
\hline
\hline
\includegraphics[scale=0.5]{5qb_1} & $-1.13 \cdot 10^{-3}$ & Yes\tabularnewline
\hline
\includegraphics[scale=0.5]{5qb_2} & $-1.31 \cdot 10^{-3}$ & Yes\tabularnewline
\hline
\includegraphics[scale=0.5]{5qb_3} & $-1.38 \cdot 10^{-3}$ & Yes\tabularnewline
\hline
\hline
\multicolumn{3}{|c|}{\textbf{6-Qubit Configurations}}\tabularnewline
\hline
\hline
\includegraphics[scale=0.5]{6qb_1} & $-2.01 \cdot 10^{-4}$ & Yes\tabularnewline
\hline
\includegraphics[scale=0.5]{6qb_2} & $-2.56 \cdot 10^{-4}$ & Yes\tabularnewline
\hline
\includegraphics[scale=0.5]{6qb_3} & $-2.92 \cdot 10^{-4}$ & Yes\tabularnewline
\hline
\includegraphics[scale=0.5]{6qb_4} & $-3.80 \cdot 10^{-4}$ & Yes\tabularnewline
\hline
\end{tabular}
\captionof{table}{Tested states with various configurations. All states are uniquely determined by their known two-body nearest-neighbour marginals.}
\end{table}
\end{minipage}
\end{figure}
并且,在编译时,我收到“不在外部 par 模式”错误。有什么想法可以解决此问题吗?
答案1
您不能将一个浮点数 ( table
) 放在另一个浮点数 ( figure
) 中,这就是出现错误的原因。但是您不需要环境table
来使用tabular
,因此只需删除\begin{table}
和\end{table}
,您的代码就可以正常工作(假设那里没有其他错误,我还没有测试过)。