3

In quantum mechanics it is often needed to write the expectation value of an observable:

enter image description here

How do I type such in LyX? I can write a bra using \left\langle ___ \right| and a ket with \left| ___ \right\rangle or simply with "Insert delimiters", but I have no idea how to insert a third, middle object between a bra and a ket.

E Be
  • 271
  • Do you know how to load the braket package? If so, you could type \braket{\psi|A|\psi}. – Mico Dec 13 '16 at 17:48
  • No, I don't. Actually am not familiar with the "behind the scenes" stuff. But I guess you can guide me and I will make it through. – E Be Dec 13 '16 at 17:51
  • Do learn about ERTs ("Evil Red Tags"). They are lyx's way to allow users to enter LaTeX code directly into a document. – Mico Dec 13 '16 at 18:02
  • 4
    See if http://tex.stackexchange.com/questions/48031/lyx-quick-way-to-insert-dirac-bra-ket/48038#48038 helps. – Torbjørn T. Dec 13 '16 at 21:31

2 Answers2

3

The right way to do this would be to use

\left\langle \psi \middle| A \middle| \psi \right\rangle

To get an even more fancy view in LyX, you could wrap this in a math macro (Insert --> Math --> Macro)

akvilas
  • 988
  • 6
  • 11
1

Include the physics package by typing:

\usepackage{physics}

Then you can use bra and ket commands:

$\bra{\psi}A\ket{\psi}$
Appo
  • 21