Difference between revisions of "Template:Braket/doc"

From blackwiki
Jump to navigation Jump to search
imported>Crissov
(→‎See also: {{angle bracket}}, {{angle}}/{{rangle}})
(Replaced content with 'MT')
Line 1: Line 1:
{{Documentation subpage}}
+
MT
<!-- Categories and interwikis go at the bottom of this page. -->
 
:''"Template:Dirac notation" redirects here.''
 
 
 
This is for producing templates {{tl|bra}}, {{tl|ket}}, and {{tl|bra-ket}}. It can also produce [[quantum state]] vectors in [[bra–ket notation]], using wikicode, ideally with {{tl|math}}, as an alternative to [[LaTeX]] in <nowiki><math></nowiki> mode, but using this template ( <nowiki>{{braket}}</nowiki> ) is more clumsy than the simpler and more directly applicable <nowiki>{{bra}}, {{ket}}, and {{bra-ket}}</nowiki>.
 
 
 
==Application==
 
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>
 
<li>''Brackets:'' choose one of:
 
*''bra'' (for a bra vector),
 
*''ket'' (for a ket vector),
 
*''bra-ket'' (for the [[Bra–ket notation#Inner products and bras|inner product]]), or
 
</li>
 
<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-ket'': enter the symbol for the ''bra'' part of the inner product
 
</li>
 
<li>''Symbol 2:''
 
*if 1 is set to ''bra'' or ''ket'': this parameter is not needed.
 
*if 1 is set to ''bra-ket'': enter the symbol for the ''ket'' part of the inner product
 
</li>
 
</ol>
 
 
 
If 1 is set to ''bra-ket'', the symbols are entered in the order they are read, left to right. The symbols can of course be '''bold''', ''italic'', <u>underlined<u>, any [[unicode]] symbol, etc.
 
 
 
==Examples==
 
;Ket
 
 
 
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>.
 
 
 
;Bra
 
 
 
A bra can be written: {{braket|bra|ψ}} = {{braket|ket|ψ}}<sup>†</sup>, that is <code><nowiki>{{braket|bra|ψ}} = {{braket|ket|ψ}}<sup>†</sup></nowiki></code>.
 
 
 
Using {{tl|math}}, a bra can be written: {{math|{{braket|bra|ψ}} {{=}} {{braket|ket|ψ}}<sup>†</sup>}}, that is <code><nowiki>{{math|{{braket|bra|ψ}} {{=}} {{braket|ket|ψ}}<sup>†</sup>}}</nowiki></code>.
 
 
 
;Bra-ket
 
 
 
The [[Bra–ket notation#Inner products and bras|inner product]] of the kets {{braket|ket|ξ}} and {{braket|ket|ψ}} can be written: {{braket|bra-ket|ψ|ξ}} = {{braket|bra-ket|ξ|ψ}}<sup>†</sup>, that is <code><nowiki>{{braket|bra-ket|ψ|ξ}} = {{braket|bra-ket|ξ|ψ}}<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|bra-ket|ψ|ξ}} {{=}} {{braket|bra-ket|ξ|ψ}}<sup>†</sup>}}, that is <code><nowiki>{{math|{{braket|bra-ket|ψ|ξ}} {{=}} {{braket|bra-ket|ξ|ψ}}<sup>†</sup>}}</nowiki></code>.
 
 
 
;Outer products
 
 
 
The [[Bra–ket notation#Outer products|outer product]] of the kets {{braket|ket|ξ}} and {{braket|ket|ψ}} can be written: {{braket|ket|ψ}}{{braket|bra|ξ}} = [{{braket|ket|ξ}}{{braket|bra|ψ}}]<sup>†</sup>, that is <code><nowiki>{{braket|ket|ψ}}{{braket|bra|ξ}} = [{{braket|ket|ξ}}{{braket|bra|ψ}}]<sup>†</sup></nowiki></code>.
 
 
 
Using {{tl|math}}, the outer product of the kets {{math|{{braket|ket|ξ}}}} and {{math|{{braket|ket|ψ}}}} can be written: {{math|{{braket|ket|ψ}}{{braket|bra|ξ}} {{=}} [{{braket|ket|ξ}}{{braket|bra|ψ}}]<sup>†</sup>}}, that is <code><nowiki>{{braket|ket|ψ}}{{braket|bra|ξ}} {{=}} [{{braket|ket|ξ}}{{braket|bra|ψ}}]<sup>†</sup></nowiki></code>.
 
 
 
;Inner products including [[operator (physics)|operator]]s
 
 
 
The inner product of the kets {{braket|ket|ξ}} and ''Ĥ''{{braket|ket|ψ}} is written using a bra and ket separately between the operator (there is no third parameter for the operator symbol):
 
:{{braket|bra|ψ}}''Ĥ''{{braket|ket|ξ}} = {{braket|bra|ξ}}''Ĥ''<sup>†</sup>{{braket|ket|ψ}},
 
that is
 
:<code><nowiki>{{braket|bra|ψ}}''Ĥ''{{braket|ket|ξ}} = {{braket|bra|ξ}}''Ĥ''<sup>†</sup>{{braket|ket|ψ}}</nowiki></code>.
 
 
 
Using {{tl|math}}, the inner product of the kets {{math|{{braket|ket|ξ}}}} and {{math|''Ĥ''{{braket|ket|ψ}}}} is written using a bra and ket separately between the operator:
 
:{{math|{{braket|bra|ψ}}''Ĥ''{{braket|ket|ξ}} {{=}} {{braket|bra|ξ}}''Ĥ''<sup>†</sup>{{braket|ket|ψ}}}},
 
that is
 
:<code><nowiki>{{math|{{braket|bra|ψ}}''Ĥ''{{braket|ket|ξ}} {{=}} {{braket|bra|ξ}}''Ĥ''<sup>†</sup>{{braket|ket|ψ}}}}</nowiki></code>.
 
 
 
;[[Schrödinger equation]]:
 
In wiki-markup rather than LaTeX:
 
:{{math|''iħ''{{sfrac|''d''|''dt''}}{{braket|ket|Ψ(''t'')}} {{=}} ''Ĥ''{{braket|ket|Ψ(''t'')}} ↔ −''iħ''{{braket|bra|Ψ(''t'')}}{{sfrac|''d''|''dt''}} {{=}} {{braket|bra|Ψ(''t'')}}''Ĥ''<sup>†</sup>}}
 
that is,
 
:<code><nowiki>{{math|''iħ''{{sfrac|''d''|''dt''}}{{braket|ket|Ψ(''t'')}} {{=}} ''Ĥ''{{braket|ket|Ψ(''t'')}} ↔ −''iħ''{{braket|bra|Ψ(''t'')}}{{sfrac|''d''|''dt''}} {{=}} {{braket|bra|Ψ(''t'')}}''Ĥ''<sup>†</sup>}}</nowiki></code>
 
 
 
;[[Bra–ket notation#Composite bras and kets|Tensor products]]:
 
 
 
The [[tensor product]] of the kets {{braket|ket|ξ}} and {{braket|ket|ψ}} is written using the ket mode only (there is no paramter for tensor products):
 
:{{braket|ket|ξ}}{{braket|ket|ψ}} ≡ {{braket|ket|ξ}}&otimes;{{braket|ket|ψ}} ≡ {{braket|ket|ξ, ψ}},
 
that is
 
:<code><nowiki>{{braket|ket|ξ}}{{braket|ket|ψ}} ≡ {{braket|ket|ξ}}&amp;otimes;{{braket|ket|ψ}} ≡ {{braket|ket|ξ, ψ}}</nowiki></code>.
 
 
 
Using {{tl|math}}, the tensor product of the kets {{math|{{braket|ket|ξ}}}} and {{math|{{braket|ket|ψ}}}} is written using the ket mode only:
 
:{{math|{{braket|ket|ξ}}{{braket|ket|ψ}} ≡ {{braket|ket|ξ}}&otimes;{{braket|ket|ψ}} ≡ {{braket|ket|ξ, ψ}}}},
 
that is
 
:<code><nowiki>{{math|{{braket|ket|ξ}}{{braket|ket|ψ}} ≡ {{braket|ket|ξ}}&amp;otimes;{{braket|ket|ψ}} ≡ {{braket|ket|ξ, ψ}}}}</nowiki></code>.
 
 
 
==See also==
 
 
 
* {{tl|Angle bracket}}: surrounding angle brackets
 
* {{tl|Langle}}, {{tl|Rangle}}: single angle brackets
 
 
 
{{Math templates|notation}}
 
 
 
<includeonly>
 
{{#ifeq:{{PAGENAME}}|Braket|
 
<!-- Categories go here -->
 
[[Category:Mathematical formatting templates]]
 
[[Category:Physics templates]]
 
}}</includeonly>
 

Revision as of 22:04, 13 August 2016

MT