Template:Langle/doc
This is the left-handed angular bracket used for writing averages or bra-ket notation, with other applications primarily in mathematics and physics, for use when inline html rendering is desired rather than Template:TeX rendering.
Examples
The template has two parameters:
- in - content in the bracket (i.e. behind the vertex of the bracket)
- out - content out of the bracket (i.e. in front of the vertex of the bracket)
Usually, there is no need to use the out parameter, it is optional - typical use may be for a punctuation/coefficient/operation symbol in front of the the vertex. Due to the large spacing in the glyph, it helps to "absorb" the extra space which would displace other characters in front of the vertex away. See the following examples. Notice that the vertical bar | used in the template is |, since vertical bars are used in template code for parameters. Using a vertical bar outside of the template can cause tables or other templates to not function properly.
- Examples of bras
The superposition of states can be written ⟨ + ⟨ + ⟨ + ⟨, which is inline with the text.
Another superposition of states: ⟨ + ⟨ + ⟨ + ⟨, again inline.
The superposition of states can be written {{langle|in=p|}} + {{langle|in=q|}} + {{langle|in=χ|}} + {{langle|in=ψ|}},
which is inline with the text.
Another superposition of states: {{langle|in=P|}} + {{langle|in=Q|}} + {{langle|in=Φ|}} + {{langle|in=Ψ|}},
again inline.
- Tables (also hidden boxes)
The correct way:
| Left bracket alone | Bra |
|---|---|
| ⟨ + ⟨ | ⟨ + ⟨ |
and the wrong way:
| Left bracket alone | Bra |
|---|---|
| ⟨ + ⟨ | + ⟨| |
The correct way:
{| class="wikitable"
|-
! Left bracket alone
! Bra
|-
| {{langle|in=Φ}} + {{langle|in=Ψ}}
| {{langle|in=Φ|}} + {{langle|in=Ψ|}}
|}
and the wrong way:
{| class="wikitable"
|-
! Left bracket alone
! Bra
|-
| {{langle|in=Φ}} + {{langle|in=Ψ}}
| {{langle|in=Φ}}| + {{langle|in=Ψ}}|
|}
- In conjunction with {{rangle}}
One sum of inner products is ⟨|Template:Rangle+⟨|Template:Rangle, a real number.
A sum of average values could be ⟨|E|Template:Rangle+⟨|p|Template:Rangle, another real number.
One sum of inner products is {{langle|in=p}}|{{rangle|in=q}}+{{langle|in=χ}}|{{rangle|in=ψ}}, a real number.
A sum of average values could be {{langle|in=P}}|''E''|{{rangle|in=Q}}+{{langle|in=Φ}}|''p''|{{rangle|in=Ψ}}, another real number.
The average of a quantity q may be written ⟨qTemplate:Rangle. The root mean square is then √⟨q2Template:Rangle, i.e. square every value, then average, then take the root.
The average of a quantity ''q'' may be written {{langle}}''q''{{rangle}}. The root mean square is
then √{{langle}}''q''<sup>2</sup>{{rangle}}, i.e. square every value, then average, then take the root.