Difference between revisions of "Template:Langle/doc"

From blackwiki
Jump to navigation Jump to search
imported>F=q(E+v^B)
imported>F=q(E+v^B)
Line 3: Line 3:
 
==Examples==
 
==Examples==
  
The template has two parameters:
+
;Bras
  
* '''in''' - content in the bracket (i.e. behind the vertex of the bracket)
+
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. 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.
+
Another superposition of states: {{langle}}P| + {{langle}}Q| + {{langle}}Φ| + {{langle}}Ψ|, again inline.
 
 
;Examples of bras
 
 
 
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.
 
  
 
<pre>
 
<pre>
The superposition of states can be written {{langle|in=p&amp;#124;}} + {{langle|in=q&amp;#124;}} + {{langle|in=χ&amp;#124;}} + {{langle|in=ψ&amp;#124;}},  
+
The superposition of states can be written {{langle}}p| + {{langle}}q| + {{langle}}χ| + {{langle}}ψ|, which is inline with the text.
which is inline with the text.
 
  
 
+
Another superposition of states: {{langle}}P| + {{langle}}Q| + {{langle}}Φ| + {{langle}}Ψ|, again inline.
Another superposition of states: {{langle|in=P&amp;#124;}} + {{langle|in=Q&amp;#124;}} + {{langle|in=Φ&amp;#124;}} + {{langle|in=Ψ&amp;#124;}},  
 
 
again inline.
 
again inline.
 
</pre>
 
</pre>
  
 
;Tables (also hidden boxes)
 
;Tables (also hidden boxes)
 +
 +
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 becuase of code interference.
  
 
The correct way:  
 
The correct way:  
Line 34: Line 27:
 
! Bra  
 
! Bra  
 
|-
 
|-
| {{langle|in=Φ}} + {{langle|in=Ψ}}
+
| {{langle}}Φ + {{langle}}Ψ
| {{langle|in=Φ&#124;}} + {{langle|in=Ψ&#124;}}
+
| {{langle}}Φ&#124; + {{langle}}Ψ&#124;
 
|}
 
|}
  
Line 45: Line 38:
 
! Bra  
 
! Bra  
 
|-
 
|-
| {{langle|in=Φ}} + {{langle|in=Ψ}}
+
| {{langle}}Φ + {{langle}}Ψ
| {{langle|in=Φ}}| + {{langle|in=Ψ}}|
+
| {{langle}}Φ| + {{langle}}Ψ|
 
|}
 
|}
  
Line 57: Line 50:
 
! Bra  
 
! Bra  
 
|-
 
|-
| {{langle|in=Φ}} + {{langle|in=Ψ}}
+
| {{langle}}Φ + {{langle}}Ψ
| {{langle|in=Φ&amp;#124;}} + {{langle|in=Ψ&amp;#124;}}
+
| {{langle}}Φ&#124; + {{langle}}Ψ&#124;
 
|}
 
|}
  
Line 68: Line 61:
 
! Bra  
 
! Bra  
 
|-
 
|-
| {{langle|in=Φ}} + {{langle|in=Ψ}}
+
| {{langle}}Φ + {{langle}}Ψ
| {{langle|in=Φ}}| + {{langle|in=Ψ}}|
+
| {{langle}}Φ| + {{langle}}Ψ|
 
|}
 
|}
 
</pre>
 
</pre>
Line 75: Line 68:
 
;In conjunction with {{tl|rangle}}:
 
;In conjunction with {{tl|rangle}}:
  
One sum of inner products is {{langle|in=p}}&#124;{{rangle|in=q}}+{{langle|in=χ}}&#124;{{rangle|in=ψ}}, a 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|in=P}}&#124;''E''&#124;{{rangle|in=Q}}+{{langle|in=Φ}}&#124;''p''&#124;{{rangle|in=Ψ}}, another real number.
+
A sum of average values could be {{langle}}P|''E''|Q{{rangle}} + {{langle}}Φ|''p''{{rangle}}, another real number.
  
 
<pre>
 
<pre>
One sum of inner products is {{langle|in=p}}&amp;#124;{{rangle|in=q}}+{{langle|in=χ}}&amp;#124;{{rangle|in=ψ}}, a 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|in=P}}&amp;#124;''E''&amp;#124;{{rangle|in=Q}}+{{langle|in=Φ}}&amp;#124;''p''&amp;#124;{{rangle|in=Ψ}}, another real number.
+
A sum of average values could be {{langle}}P|''E''|Q{{rangle}} + {{langle}}Φ|''p''{{rangle}}, another real number.
 
</pre>
 
</pre>
  

Revision as of 23:47, 13 June 2012

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

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.
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 becuase 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}}Φ| + {{langle}}Ψ|
|}

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.