Extensions.ToLadderSequence Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| ToLadderSequence(IEnumerable<Int32>) |
Construct a sequence of ladder operators from an even-length sequence of integers. |
| ToLadderSequence(IEnumerable<ValueTuple<Int32,Spin>>) |
Construct a sequence of ladder operators from an even-length sequence of spin-orbit indices. |
| ToLadderSequence(IEnumerable<ValueTuple<RaisingLowering,Int32>>, Int32) |
Construct a sequence of ladder operators from sequence of tuples each specifying whether it is a raising or lowering term, and its index. |
ToLadderSequence(IEnumerable<Int32>)
Construct a sequence of ladder operators from an even-length sequence of integers.
public static Microsoft.Quantum.Chemistry.LadderOperators.LadderSequence<int> ToLadderSequence (this System.Collections.Generic.IEnumerable<int> indices);
static member ToLadderSequence : seq<int> -> Microsoft.Quantum.Chemistry.LadderOperators.LadderSequence<int>
<Extension()>
Public Function ToLadderSequence (indices As IEnumerable(Of Integer)) As LadderSequence(Of Integer)
Parameters
- indices
- IEnumerable<Int32>
Even-length sequence of integers.
Returns
Sequence of ladder operators with an equal number of creation and annihilation terms that are normal-ordered.
Examples
// The following two return the same ladder operator sequence.
var seq = new[] { 1, 2, 3, 4 }.ToLadderSequence();
var expected = new[] { (u, 1), (u, 2), (d, 3), (d, 4) }.ToLadderSequence();
Applies to
ToLadderSequence(IEnumerable<ValueTuple<Int32,Spin>>)
Construct a sequence of ladder operators from an even-length sequence of spin-orbit indices.
public static Microsoft.Quantum.Chemistry.LadderOperators.LadderSequence<Microsoft.Quantum.Chemistry.OrbitalIntegrals.SpinOrbital> ToLadderSequence (this System.Collections.Generic.IEnumerable<(int, Microsoft.Quantum.Chemistry.Spin)> indices);
static member ToLadderSequence : seq<ValueTuple<int, Microsoft.Quantum.Chemistry.Spin>> -> Microsoft.Quantum.Chemistry.LadderOperators.LadderSequence<Microsoft.Quantum.Chemistry.OrbitalIntegrals.SpinOrbital>
<Extension()>
Public Function ToLadderSequence (indices As IEnumerable(Of ValueTuple(Of Integer, Spin))) As LadderSequence(Of SpinOrbital)
Parameters
- indices
- IEnumerable<ValueTuple<Int32,Spin>>
Even-length sequence of spin-orbit indices.
Returns
Sequence of ladder operators with an equal number of creation and annihilation terms that are normal-ordered.
Applies to
ToLadderSequence(IEnumerable<ValueTuple<RaisingLowering,Int32>>, Int32)
Construct a sequence of ladder operators from sequence of tuples each specifying whether it is a raising or lowering term, and its index.
public static Microsoft.Quantum.Chemistry.LadderOperators.LadderSequence<int> ToLadderSequence (this System.Collections.Generic.IEnumerable<(Microsoft.Quantum.Chemistry.RaisingLowering, int)> setSequence, int setSign = 1);
static member ToLadderSequence : seq<ValueTuple<Microsoft.Quantum.Chemistry.RaisingLowering, int>> * int -> Microsoft.Quantum.Chemistry.LadderOperators.LadderSequence<int>
<Extension()>
Public Function ToLadderSequence (setSequence As IEnumerable(Of ValueTuple(Of RaisingLowering, Integer)), Optional setSign As Integer = 1) As LadderSequence(Of Integer)
Parameters
- setSequence
- IEnumerable<ValueTuple<RaisingLowering,Int32>>
Sequence of ladder operators.
- setSign
- Int32
Set the sign coefficient of the sequence.
Returns
Sequence of ladder operators.
Examples
// Construct a sequence a ladder operators 1^ 2^ 3 4 var tmp = new[] { (u, 1), (u, 2), (d, 3), (d, 4) }.ToLadderSequence();