Difference between revisions of "Template:Langle/doc"

From blackwiki
Jump to navigation Jump to search
imported>F=q(E+v^B)
imported>Vanisaac
m (→‎See also: clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other)
 
(17 intermediate revisions by 8 users not shown)
Line 1: Line 1:
This is the left-handed angular bracket used for writing [[average]]s or [[bra-ket]] notation, with other applications primarily in [[mathematics]] and [[physics]], for use when inline html rendering is desired rather than {{TeX}} rendering.
+
{{documentation subpage}}
 +
This is the left-handed angular bracket used for writing [[average]]s or [[bra–ket notation]], with other applications primarily in [[mathematics]] and [[physics]], for use when inline html rendering is desired rather than [[TeX]] rendering.
 +
 
 +
This is used in the {{tl|braket}} template. When creating bra or ket vectors, or inner products, use {{tl|Braket}} to save the trouble of typing | (for the pipe symbol), {{tl|langle}}, or {{tl|rangle}} every time.
  
 
==Examples==
 
==Examples==
 +
;Bras
  
The template has two main parameters:
+
The superposition of states can be written {{langle}}p| + {{langle}}q| + {{langle}}χ| + {{langle}}ψ|, which is inline with the text.
  
* '''out''' - content out of the bracket (i.e. behind the vertex of the bracket)
+
Another superposition of states: {{langle}}P| + {{langle}}Q| + {{langle}}Φ| + {{langle}}Ψ|, again inline.
* '''in''' - defualt setting, content in the bracket (i.e. behind the vertex of the bracket),
 
  
and an additional parameter '''di''' for an optional delimiter:
+
<pre>
 +
The superposition of states can be written {{langle}}p| + {{langle}}q| + {{langle}}χ| + {{langle}}ψ|, which is inline with the text.
  
* if set to '''bra''' - an additional vertical bar to the right of the content in the bracket appears, to create a bra vector
+
Another superposition of states: {{langle}}P| + {{langle}}Q| + {{langle}}Φ| + {{langle}}Ψ|, again inline.
* if left blank it remains as '''in'''.
+
</pre>
  
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.
+
;Tables (also hidden boxes)
  
;Example of the left angular bracket alone
+
Due to the vertical bar | used in template coding, the html code '''&amp;#124;''' must be used when bra–ket notation is used in tables, else some parts will not show up because of code interference.
  
Notice that {{langle|di=in|in=ψ}} is the same as {{langle|in=ψ}}, becuase '''di''' left blank defualts to '''in'''.
+
The correct way:
  
<pre>
+
{| class="wikitable"
Notice that {{langle|di=in|in=ψ}} is the same as {{langle|in=ψ}}, becuase '''di''' left blank defualts to '''in'''.
+
|-
</pre>
+
! Left bracket alone
 +
! Bra
 +
|-
 +
| {{langle}}Φ + {{langle}}Ψ
 +
| {{langle}}Φ&#124; + {{langle}}Ψ&#124;
 +
|}
  
;Examples of bras
+
and the wrong way:
  
The superposition of states can be written {{langle|di=bra|in=p}} + {{langle|di=bra|in=q}} + {{langle|di=bra|in=χ}} + {{langle|di=bra|in=ψ}}, which is inline with the text.
+
{| class="wikitable"
 +
|-
 +
! Left bracket alone
 +
! Bra
 +
|-
 +
| {{langle}}Φ + {{langle}}Ψ
 +
| {{langle}}Φ| + {{langle}}Ψ|
 +
|}
  
Another superposition of states: {{langle|di=bra|in=P}} + {{langle|di=bra|in=Q}} + {{langle|di=bra|in=Φ}} + {{langle|di=bra|in=Ψ}}, again inline.
+
<pre>
 +
The correct way:  
  
<pre>
+
{| class="wikitable"
The superposition of states can be written {{langle|di=bra|in=p}} + {{langle|di=bra|in=q}} + {{langle|di=bra|in=χ}} +  
+
|-
{{langle|di=bra|in=ψ}}, which is inline with the text.
+
! Left bracket alone
 +
! Bra
 +
|-
 +
| {{langle}}Φ + {{langle}}Ψ
 +
| {{langle}}Φ&amp;#124; + {{langle}}Ψ&amp;#124;
 +
|}
  
 +
and the wrong way:
  
Another superposition of states: {{langle|di=bra|in=P}} + {{langle|di=bra|in=Q}} + {{langle|di=bra|in=Φ}} + {{langle|di=bra|in=Ψ}},
+
{| class="wikitable"
again inline.
+
|-
 +
! Left bracket alone
 +
! Bra
 +
|-
 +
| {{langle}}Φ + {{langle}}Ψ
 +
| {{langle}}Φ| + {{langle}}Ψ|
 +
|}
 
</pre>
 
</pre>
  
 
;In conjunction with {{tl|rangle}}:
 
;In conjunction with {{tl|rangle}}:
  
One sum of inner products is {{langle|di=bra|in=p}}{{rangle|in=q}}+{{langle|di=bra|in=χ}}{{rangle|in=ψ}}, a real number.
+
One sum of inner products is {{langle}}p|q{{rangle}} + {{langle}}χ|ψ{{rangle}}, a real number.
  
Another sum of inner products is {{langle|di=bra|in=P}}{{rangle|in=Q}}+{{langle|di=bra|in=Φ}}{{rangle|in=Ψ}}, another real number.
+
A sum of average values could be {{langle}}P|''E''|Q{{rangle}} + {{langle}}Φ|''p''|Ψ{{rangle}}, another real number.
 
 
A matrix element of operator Ω is {{langle|di=bra|in=ψ}}Ω{{rangle|di=ket|in=ψ}}, and overlapping the states together incorrectly on the same line: {{langle|di=bra|in=ψ{{rangle|in=ψ}}}}, while the correct way is {{langle|in=ψ{{rangle|di=ket|in=ψ}}}}.
 
  
 
<pre>
 
<pre>
One sum of inner products is {{langle|di=bra|in=p}}{{rangle|in=q}}+{{langle|di=bra|in=χ}}{{rangle|in=ψ}}, a real number.
+
One sum of inner products is {{langle}}p|q{{rangle}} + {{langle}}χ|ψ{{rangle}}, a real number.
 
 
 
 
Another sum of inner products is {{langle|di=bra|in=P}}{{rangle|in=Q}}+{{langle|di=bra|in=Φ}}{{rangle|in=Ψ}}, another real number.
 
 
 
  
A matrix element of operator Ω is {{langle|di=bra|in=ψ}}Ω{{rangle|di=ket|in=ψ}}, and compacting the states together incorrectly on the
+
A sum of average values could be {{langle}}P|''E''|Q{{rangle}} + {{langle}}Φ|''p''|Ψ{{rangle}}, another real number.
same line: {{langle|di=bra|in=ψ{{rangle|in=ψ}}}}, while the correct way is {{langle|in=ψ{{rangle|di=ket|in=ψ}}}}.
 
 
</pre>
 
</pre>
  
The average of a quantity ''q'' may be written {{rangle|in={{langle|in=''q''}}}} or identically {{langle|in={{rangle|in=''q''}}}}. The root mean square is then √{{rangle|in={{langle|in=''q''<sup>2</sup>}}}}, 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.
  
 
<pre>
 
<pre>
The average of a quantity ''q'' may be written {{rangle|in={{langle|in=''q''}}}} or identically {{langle|in={{rangle|in=''q''}}}}. The  
+
The average of a quantity ''q'' may be written {{langle}}''q''{{rangle}}. The root mean square is  
root mean square is then √{{rangle|in={{langle|in=''q''<sup>2</sup>}}}}, i.e. square every value, then average, then take the root.
+
then √{{langle}}''q''<sup>2</sup>{{rangle}}, i.e. square every value, then average, then take the root.
 
</pre>
 
</pre>
  
 
==See also==
 
==See also==
 +
{{Math templates|notation}}
  
For use with {{tl|Rangle}}
+
<includeonly>{{Sandbox other||
 +
<!-- CATEGORIES HERE, THANKS -->
 +
[[Category:Mathematical formatting templates]]
 +
}}</includeonly>

Latest revision as of 23:35, 25 April 2020

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 TeX rendering.

This is used in the {{braket}} template. When creating bra or ket vectors, or inner products, use {{Braket}} to save the trouble of typing &#124; (for the pipe symbol), {{langle}}, or {{rangle}} every time.

Examples

Bras

The superposition of states can be written ⟨p| + ⟨q| + ⟨χ| + ⟨ψ|, which is inline with the text.

Another superposition of states: ⟨P| + ⟨Q| + ⟨Φ| + ⟨Ψ|, again inline.

The superposition of states can be written {{langle}}p| + {{langle}}q| + {{langle}}χ| + {{langle}}ψ|, which is inline with the text.

Another superposition of states: {{langle}}P| + {{langle}}Q| + {{langle}}Φ| + {{langle}}Ψ|, again inline.
Tables (also hidden boxes)

Due to the vertical bar | used in template coding, the html code &#124; must be used when bra–ket notation is used in tables, else some parts will not show up because of code interference.

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}}Φ + {{langle}}Ψ
| {{langle}}Φ&#124; + {{langle}}Ψ&#124;
|}

and the wrong way:

{| class="wikitable"
|-
! Left bracket alone 
! Bra 
|-
| {{langle}}Φ + {{langle}}Ψ
| {{langle}}Φ| + {{langle}}Ψ|
|}
In conjunction with {{rangle}}

One sum of inner products is ⟨p|qTemplate:Rangle + ⟨χ|ψTemplate:Rangle, a real number.

A sum of average values could be ⟨P|E|QTemplate:Rangle + ⟨Φ|pTemplate:Rangle, another real number.

One sum of inner products is {{langle}}p|q{{rangle}} + {{langle}}χ|ψ{{rangle}}, a real number.

A sum of average values could be {{langle}}P|''E''|Q{{rangle}} + {{langle}}Φ|''p''|Ψ{{rangle}}, 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.

See also