0

How can create a \newcommand that be able generate:

|\phi\rangle\langle \psi|

However \ket{\phi}\bra{\psi} does that but we think that the distance between ket and bra in |\phi\rangle\langle \psi| is shorter than that of \ket{\phi}\bra{\psi}.

  • 2
    \op{\phi}{\psi} from the physics package does this. – Troy Jan 25 '18 at 7:54
6

Use the braket package:

\documentclass{article}
\usepackage{braket}

\begin{document}

$\braket{\varphi|\psi}$

$\bra{\varphi}$

$\ket{\psi}$

$\ket{\varphi}\bra{\psi}$

\end{document}

enter image description here

-1

try the command \ketbra{\phi}{\psi}, this should minimize the distance between the ket and the bra.

command \ketbra{\phi}{\psi}

  • 3
    Welcome to TeX.SE! Can you please add a screenshot of your result? (And no, I did not downvote!) – Mensch Jun 13 at 16:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.