Difference between revisions of "Template:Braket/doc"

From blackwiki
Jump to navigation Jump to search
imported>Maschen
imported>Maschen
(update)
Line 7: Line 7:
  
 
It's very easy to use. There are three parameters, use as many as needed in this order:
 
It's very easy to use. There are three parameters, use as many as needed in this order:
 
+
<!---THESE ARE NOT SPELLING MISTAKES - THEY ARE ACTUALLY USED IN THE TEMPLATE PARAMETERS - PLEASE DON'T "CORRECT" THE SPELLING (SAY) "BRAKET" TO "BRACKET" - THANKS!!!--->
 
<ol>
 
<ol>
<li>'''''Brakets:''''' choose one of:  
+
<li>'''''Brackets:''''' choose one of:  
 
*'''bra''' (for a bra vector),  
 
*'''bra''' (for a bra vector),  
*'''ket''' (for a ket vector), or
+
*'''ket''' (for a ket vector),
*'''braket''' (for the inner product).</li>
+
*'''braket''' (for the [[Bra–ket notation#Inner products and bras|inner product]]), or
 +
*'''ketbra''' (for the [[Bra–ket notation#Outer products|outer product]]).</li>
 
<li>'''''Symbol 1:'''''
 
<li>'''''Symbol 1:'''''
 
*if 1 is set to ''bra'' or ''ket'': enter the first symbol for the bra or ket,  
 
*if 1 is set to ''bra'' or ''ket'': enter the first symbol for the bra or ket,  
*if 1 is set to ''braket'': enter the symbol for the ''bra'' part of the inner product.</li>
+
*if 1 is set to ''braket'' or ''ketbra'': enter the symbol for the ''bra'' part of the inner product, or ''ket'' part of the outer product.</li>
 
<li>'''''Symbol 2:'''''
 
<li>'''''Symbol 2:'''''
 
*if 1 is set to ''bra'' or ''ket'': this parameter is not needed.
 
*if 1 is set to ''bra'' or ''ket'': this parameter is not needed.
*if 1 is set to ''braket'': enter the symbol for the ''ket'' part of the inner product.</li>
+
*if 1 is set to ''braket'' or ''ketbra'': enter the symbol for the ''ket'' part of the inner product, or ''bra'' part of the outer product.</li>
 
</ol>
 
</ol>
  
The symbols can of course be '''bold''', ''italic'', <u>underlined<u>, any unicode symbol, etc.
+
The symbols can of course be '''bold''', ''italic'', <u>underlined<u>, any [[unicode]] symbol, etc.
  
 
==Examples==
 
==Examples==
Line 29: Line 30:
 
A ket can be written: {{braket|ket|ψ}}, that is <code><nowiki>{{braket|ket|ψ}}</nowiki></code>.
 
A ket can be written: {{braket|ket|ψ}}, that is <code><nowiki>{{braket|ket|ψ}}</nowiki></code>.
  
Using {{tl|math}}; a ket can be written: {{math|{{braket|ket|ψ}}}}, that is <code><nowiki>{{math|{{braket|ket|ψ}}}}</nowiki></code>.
+
Using {{tl|math}}, a ket can be written: {{math|{{braket|ket|ψ}}}}, that is <code><nowiki>{{math|{{braket|ket|ψ}}}}</nowiki></code>.
  
 
;Bra
 
;Bra
Line 35: Line 36:
 
A bra can be written: {{braket|bra|ψ}}, that is <code><nowiki>{{braket|bra|ψ}}</nowiki></code>.
 
A bra can be written: {{braket|bra|ψ}}, that is <code><nowiki>{{braket|bra|ψ}}</nowiki></code>.
  
Using {{tl|math}}; a bra can be written: {{math|{{braket|bra|ψ}}}}, that is <code><nowiki>{{math|{{braket|bra|ψ}}}}</nowiki></code>.
+
Using {{tl|math}}, a bra can be written: {{math|{{braket|bra|ψ}}}}, that is <code><nowiki>{{math|{{braket|bra|ψ}}}}</nowiki></code>.
  
 
;Braket
 
;Braket
  
The inner product of the kets {{braket|ket|ξ}} and {{braket|ket|ψ}} can be written: {{braket|braket|ψ|ξ}} = {{braket|braket|ξ|ψ}}<sup>†</sup>, that is <code><nowiki>{{braket|braket|ψ|ξ}} = {{braket|braket|ξ|ψ}}<sup>†</sup></nowiki></code>.
+
The [[Bra–ket notation#Inner products and bras|inner product]] of the kets {{braket|ket|ξ}} and {{braket|ket|ψ}} can be written: {{braket|braket|ψ|ξ}} = {{braket|braket|ξ|ψ}}<sup>†</sup>, that is <code><nowiki>{{braket|braket|ψ|ξ}} = {{braket|braket|ξ|ψ}}<sup>†</sup></nowiki></code>.
 +
 
 +
Using {{tl|math}}, the inner product of the kets {{math|{{braket|ket|ξ}}}} and {{math|{{braket|ket|ψ}}}} can be written: {{math|{{braket|braket|ψ|ξ}} {{=}} {{braket|braket|ξ|ψ}}<sup>†</sup>}}, that is <code><nowiki>{{math|{{braket|braket|ψ|ξ}} {{=}} {{braket|braket|ξ|ψ}}<sup>†</sup>}}</nowiki></code>.
 +
 
 +
;Ketbra
 +
 
 +
The [[Bra–ket notation#Outer products|outer product]] of the kets {{braket|ket|ξ}} and {{braket|ket|ψ}} can be written: {{braket|ketbra|ψ|ξ}} = [{{braket|ketbra|ξ|ψ}}]<sup>†</sup>, that is <code><nowiki>{{braket|ketbra|ψ|ξ}} = [{{braket|ketbra|ξ|ψ}}]<sup>†</sup></nowiki></code>.
  
Using {{tl|math}}; the inner product of the kets {{math|{{braket|ket|ξ}}}} and {{math|{{braket|ket|ψ}}}} can be written: {{math|{{braket|braket|ψ|ξ}} {{=}} {{braket|braket|ξ|ψ}}<sup>†</sup>}}, that is <code><nowiki>{{math|{{braket|braket|ψ|ξ}} {{=}} {{braket|braket|ξ|ψ}}<sup>†</sup>}}</nowiki></code>.
+
Using {{tl|math}}, the outer product of the kets {{braket|ket|ξ}} and {{braket|ket|ψ}} can be written: {{math|{{braket|ketbra|ψ|ξ}} {{=}} [{{braket|ketbra|ξ|ψ}}]<sup>†</sup>}}, that is <code><nowiki>{{math|{{braket|ketbra|ψ|ξ}} {{=}} [{{braket|ketbra|ξ|ψ}}]<sup>†</sup>}}</nowiki></code>.
  
 
==See also==
 
==See also==

Revision as of 00:50, 11 February 2013

This is for producing quantum state vectors in bra-ket notation, using wikicode, ideally with {{math}}, as an alternative to LaTeX in <math> mode.

Application

It's very easy to use. There are three parameters, use as many as needed in this order:

  1. Brackets: choose one of:
  2. Symbol 1:
    • if 1 is set to bra or ket: enter the first symbol for the bra or ket,
    • if 1 is set to braket or ketbra: enter the symbol for the bra part of the inner product, or ket part of the outer product.
  3. Symbol 2:
    • if 1 is set to bra or ket: this parameter is not needed.
    • if 1 is set to braket or ketbra: enter the symbol for the ket part of the inner product, or bra part of the outer product.

The symbols can of course be bold, italic, underlined, any unicode symbol, etc.

Examples

Ket

A ket can be written: Template:Rangle, that is {{braket|ket|ψ}}.

Using {{math}}, a ket can be written: Template:Rangle, that is {{math|{{braket|ket|ψ}}}}.

Bra

A bra can be written: ⟨ψ|, that is {{braket|bra|ψ}}.

Using {{math}}, a bra can be written: ⟨ψ|, that is {{math|{{braket|bra|ψ}}}}.

Braket

The inner product of the kets Template:Rangle and Template:Rangle can be written: = , that is {{braket|braket|ψ|ξ}} = {{braket|braket|ξ|ψ}}<sup>†</sup>.

Using {{math}}, the inner product of the kets Template:Rangle and Template:Rangle can be written: = , that is {{math|{{braket|braket|ψ|ξ}} {{=}} {{braket|braket|ξ|ψ}}<sup>†</sup>}}.

Ketbra

The outer product of the kets Template:Rangle and Template:Rangle can be written: = [], that is {{braket|ketbra|ψ|ξ}} = [{{braket|ketbra|ξ|ψ}}]<sup>†</sup>.

Using {{math}}, the outer product of the kets Template:Rangle and Template:Rangle can be written: = [], that is {{math|{{braket|ketbra|ψ|ξ}} {{=}} [{{braket|ketbra|ξ|ψ}}]<sup>†</sup>}}.

See also