Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
documentation:language_reference:objects:matrix:functions:addspin [2018/09/25 11:45] – created Simon Heinzedocumentation:language_reference:objects:matrix:functions:addspin [2024/12/12 16:58] (current) Maurits W. Haverkort
Line 3: Line 3:
  
 ### ###
-Matrix.AddSpin($M$) takes a Matrix $M$ that acts on a space with no spin included and returns the matrix doubled in size, where every former entry now splits in spin-up and spin-down. This behaviour is equivalent to calling //[[documentation:language_reference:objects:matrix:Enlarge|Matrix.Enlarge($M$,2)]]//.+Matrix.AddSpin($M$) takes a Matrix $M$ that acts on a space with no spin included and returns the matrix doubled in size, where every former entry now splits in spin-up and spin-down. We assume the ordering of the basis alternates between spin up and down. This behaviour is equivalent to calling //[[documentation:language_reference:objects:matrix:functions:Enlarge|Matrix.Enlarge($M$,2)]]//.
 ### ###
  
 ===== Example ===== ===== Example =====
- 
-### 
-An example will follow one day. 
-### 
  
 ==== Input ==== ==== Input ====
 <code Quanty Example.Quanty> <code Quanty Example.Quanty>
--- some example code+A = Matrix.New({{1,2},{3,4}}) 
 +B = Matrix.AddSpin(A) 
 +print(B)
 </code> </code>
  
 ==== Result ==== ==== Result ====
 <file Quanty_Output> <file Quanty_Output>
-text produced as output+{ {  1      ,  0      ,  2      ,  0      } , 
 +  {  0      ,  1      ,  0      ,  2      } , 
 +  {  3      ,  0      ,  4      ,  0      } , 
 +  {  0      ,  3      ,  0      ,  4      } }
 </file> </file>
  
 ===== Table of contents ===== ===== Table of contents =====
-{{indexmenu>.#1|msort}}+{{indexmenu>..:#2|tsort}}
  
Print/export