0

what is the error in this equation

\begin{equation}
  \noindent\(\pmb{|\psi \rangle =\alpha \right.| 0\rangle +\beta \right.| 1\rangle }\)
\end{equation}
moewe
  • 175,683
  • 1
    The \noindent seems unnecessary and should be removed (not sure if it would cause an error, but that would not surprise me). The \( and \) are not needed because you are in math mode already. Remove them, they can cause all sorts of issues here. You also don't need the \right.s especially since they have no matching \left counterpart - they will cause errors. Finally you will need to load \usepackage{amsmath} (if you haven't done that already) to use \pmb. – moewe Nov 01 '18 at 09:54
  • Note that \pmb is poor man's bold and if you zoom into the resulting PDF you can see that the effect is achieved by overlaying several copies of the same symbol with slightly different positions. I'm not sure how this will look printed on paper, but you may want to look into other alternatives. – moewe Nov 01 '18 at 10:04
  • You might be interested in https://tex.stackexchange.com/q/214728/35864 – moewe Nov 01 '18 at 10:29
  • 1
    Please don't ask the same question multiple times. Last time, the question was closed due to its poor quality. Now, the very same question again. – Johannes_B Nov 01 '18 at 11:11
  • @Johannes_B sorry sir it will never happen again – naveed anjum Nov 02 '18 at 04:31

1 Answers1

1

I assume this is what you want to do:

\documentclass{article}

\begin{document}
\begin{equation}
   \mathbf{|\psi \rangle =\alpha \left|0\right\rangle +\beta \left| 1\right\rangle }
\end{equation}
\end{document}

As @moewe already mentioned:

  • no need for \noindent
  • no need for \( and \)

Also:

  • use \mathbf{...} instead of \pmb
  • change \right.| into \left| and \right\rangle

enter image description here

kuropan
  • 246
  • 1
    Looking at the orignal equation I don't think that the pairing of \left and \right suggested here is as desired. Look at the uneven spacing of the |s in the output. If I'm not mistaken the \mathbf does nothing for \psi and in the question the bolding applied to the entire equation, not just the \psi (that's why the braces were around the entire expression, not just the \psi). – moewe Nov 01 '18 at 10:28
  • @moewe Yes, your absolutely right of course, I updated my answer (didn't update the screenshot yet though). Feel free to edit my answer ;) – kuropan Nov 01 '18 at 10:33
  • 2
    That's better thank you. Since the \mathbf only really bolds the 0 and the 1, one may want to consider \bm here... – moewe Nov 01 '18 at 10:35