-
Notifications
You must be signed in to change notification settings - Fork 58k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] 矩阵显示错误 #3436
Comments
Title: [Bug] Matrix display error |
it's model issue related #3351 |
i use gpt4-1106-preview |
OpenAI 为了避免 LaTex 的公式符号与美元 $ 符号冲突,使用 [] 作为公式语法,所以会出现这种情况,虽然现在可以通过调整 prompts 来解决,但未来需要提交代码,来彻底解决这个问题。 |
In order to avoid conflicts between LaTex formulas and the dollar sign, OpenAI uses [] as the formula syntax, so this situation occurs. Although it can be solved by adjusting prompts now, code needs to be submitted in the future to completely solve this problem. |
Describe the bug
gpr4-1106-preview
latex语法显示出错
gpt回复内容:
一个三阶酉矩阵的例子可以是以下矩阵:
[ U = \begin{bmatrix}
\frac{1}{\sqrt{2}} & 0 & \frac{1}{\sqrt{2}} \
0 & 1 & 0 \
\frac{1}{\sqrt{2}} & 0 & -\frac{1}{\sqrt{2}}
\end{bmatrix} ]
为了验证这个矩阵确实是酉的,我们需要检查它是否满足 ( U^{\dagger}U = UU^{\dagger} = I ),其中 ( I ) 是三阶单位矩阵。
首先,计算 ( U^{\dagger} )(U 的共轭转置):
[ U^{\dagger} = \begin{bmatrix}
\frac{1}{\sqrt{2}} & 0 & \frac{1}{\sqrt{2}} \
0 & 1 & 0 \
\frac{1}{\sqrt{2}} & 0 & -\frac{1}{\sqrt{2}}
\end{bmatrix}^{\dagger} = \begin{bmatrix}
\frac{1}{\sqrt{2}} & 0 & \frac{1}{\sqrt{2}} \
0 & 1 & 0 \
\frac{1}{\sqrt{2}} & 0 & -\frac{1}{\sqrt{2}}
\end{bmatrix} ]
(注意:在这个特殊的例子中,矩阵 U 的元素都是实数,所以共轭转置只涉及转置。)
接下来,计算 ( U^{\dagger}U ) 和 ( UU^{\dagger} ):
[ U^{\dagger}U = \begin{bmatrix}
\frac{1}{\sqrt{2}} & 0 & \frac{1}{\sqrt{2}} \
0 & 1 & 0 \
\frac{1}{\sqrt{2}} & 0 & -\frac{1}{\sqrt{2}}
\end{bmatrix} \begin{bmatrix}
\frac{1}{\sqrt{2}} & 0 & \frac{1}{\sqrt{2}} \
0 & 1 & 0 \
\frac{1}{\sqrt{2}} & 0 & -\frac{1}{\sqrt{2}}
\end{bmatrix} = \begin{bmatrix}
1 & 0 & 0 \
0 & 1 & 0 \
0 & 0 & 1
\end{bmatrix} = I ]
[ UU^{\dagger} = \begin{bmatrix}
\frac{1}{\sqrt{2}} & 0 & \frac{1}{\sqrt{2}} \
0 & 1 & 0 \
\frac{1}{\sqrt{2}} & 0 & -\frac{1}{\sqrt{2}}
\end{bmatrix} \begin{bmatrix}
\frac{1}{\sqrt{2}} & 0 & \frac{1}{\sqrt{2}} \
0 & 1 & 0 \
\frac{1}{\sqrt{2}} & 0 & -\frac{1}{\sqrt{2}}
\end{bmatrix} = \begin{bmatrix}
1 & 0 & 0 \
0 & 1 & 0 \
0 & 0 & 1
\end{bmatrix} = I ]
由于 ( U^{\dagger}U ) 和 ( UU^{\dagger} ) 都等于单位矩阵 I,我们可以确认这个矩阵 U 是酉的。
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Deployment
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional Logs
Add any logs about the problem here.
The text was updated successfully, but these errors were encountered: