Best way to do bra-kets in latex?

  • LaTeX
  • Thread starter LAHLH
  • Start date
  • Tags
    Latex
In summary, the conversation discusses different ways to represent bras and kets in LaTeX and how to adjust spacing for a more professional look. It also mentions using definitions to abbreviate repetitive code.
  • #1
LAHLH
409
1
Hi,

sorry if this is the wrong place, but is there a good way to do bras and kets in latex. I usually just do \mid 0\rangle but this gives big gaps that doesn't look very professional
 
Physics news on Phys.org
  • #2
You can use | directly, as in [itex]|0\rangle[/itex].
 
  • #3
cheers
 
  • #4
The distance can come out wrong when you use | too. Apparently it doesn't when the next symbol is 0, but it does when the next symbol is \uparrow, as you can see here: [itex]|\uparrow\rangle[/itex]. Then you can use \left| to get [itex]\left|\uparrow\rangle[/itex]. I'm too lazy to type \left every time though.
 
  • #5
Interestingly, \mid works with \uparrow.

Anyways, You can always subtract spacing yourself with \!. For example, using mid and 0:
[tex]\mid \!\! 0 \rangle[/tex]
and, you can always make a definition to abbreviate stuff, although that doesn't work as well on PF:

[tex]\def\ket#1{\left | #1 \right \rangle}
\ket{0} \qquad \ket{\uparrow} \qquad \ket{\frac{1}{2}}[/tex]
 

1. What is the "bra-ket" notation used for in quantum mechanics?

The "bra-ket" notation, also known as Dirac notation, is used to represent the states of quantum systems and their corresponding observables. It is a shorthand way of writing mathematical expressions that describe the relationships between quantum states and measurements.

2. How do I insert a bra or ket symbol in LaTeX?

To insert a bra or ket symbol in LaTeX, you can use the command \bra{} or \ket{}, respectively. Make sure to include the appropriate subscripts or superscripts to represent the quantum state or observable you are describing.

3. What is the difference between a bra and a ket in quantum mechanics?

A bra represents the dual vector of a ket, and is used to represent the complex conjugate of a ket state. In other words, a bra represents the "bra-vector" or "row vector" and a ket represents the "ket-vector" or "column vector" in a quantum system.

4. Can I use the bra-ket notation outside of a quantum mechanics context?

Yes, the bra-ket notation can be used in other mathematical contexts, such as linear algebra or functional analysis. It is a shorthand notation for representing inner products and dual spaces, which can be applied to various mathematical systems.

5. Are there any packages or templates available for typesetting bra-ket notation in LaTeX?

Yes, there are several packages and templates available for typesetting bra-ket notation in LaTeX, such as the braket package and the ketcindy template. These can make it easier to format and align bra-ket expressions in your document.

Similar threads

  • Quantum Physics
Replies
7
Views
823
  • MATLAB, Maple, Mathematica, LaTeX
2
Replies
36
Views
915
  • Linear and Abstract Algebra
Replies
8
Views
1K
  • Advanced Physics Homework Help
Replies
8
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
Replies
1
Views
962
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • Quantum Physics
Replies
5
Views
1K
Back
Top