FermionWavefunction<TIndex> Constructors
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
| FermionWavefunction<TIndex>(IEnumerable<ValueTuple<TIndex[],Double>>) |
Constructs a sparse multi-reference wave function |
| FermionWavefunction<TIndex>(IEnumerable<TIndex>) |
Constructs a single-reference wave function. This is treated as sparse multi-reference wave function with only one term. |
| FermionWavefunction<TIndex>(IEnumerable<TIndex>, IEnumerable<ValueTuple<TIndex[],Double>>) |
Constructs a unitary coupled-cluster wave function represented by a unitary coupled-cluster operator acting on a single-reference state. |
FermionWavefunction<TIndex>(IEnumerable<ValueTuple<TIndex[],Double>>)
Constructs a sparse multi-reference wave function
public FermionWavefunction (System.Collections.Generic.IEnumerable<(TIndex[], double)> terms);
new Microsoft.Quantum.Chemistry.Fermion.FermionWavefunction<'Index (requires 'Index :> IEquatable<'Index> and 'Index :> IComparable<'Index>)> : seq<ValueTuple<'Index[], double>> -> Microsoft.Quantum.Chemistry.Fermion.FermionWavefunction<'Index (requires 'Index :> IEquatable<'Index> and 'Index :> IComparable<'Index>)>
Public Sub New (terms As IEnumerable(Of ValueTuple(Of TIndex(), Double)))
Parameters
- terms
- IEnumerable<ValueTuple<TIndex[],Double>>
List of tuples specifying an unnormalized superposition of basis states. The first item of each tuple is a list of indices to the creation operator sequence acting on the vacuum state. The second item of each tuple is the unnormalized amplitude of the specified basis state.
Examples
Create a list of tuples where the first item of each tuple are indices to the creation operators acting on the vacuum state, and the second item is the coefficient of that basis state. Next, create a fermion wavefunction object that represents the superposition.
var superposition = new[]
{
(new[] {1, 2, 6}, 0.1),
(new[] {2, 1, 5}, -0.2)
};
var wavefunction = new FermionWavefunction<int>(superposition);
Applies to
FermionWavefunction<TIndex>(IEnumerable<TIndex>)
Constructs a single-reference wave function. This is treated as sparse multi-reference wave function with only one term.
public FermionWavefunction (System.Collections.Generic.IEnumerable<TIndex> term);
new Microsoft.Quantum.Chemistry.Fermion.FermionWavefunction<'Index (requires 'Index :> IEquatable<'Index> and 'Index :> IComparable<'Index>)> : seq<'Index (requires 'Index :> IEquatable<'Index> and 'Index :> IComparable<'Index>)> -> Microsoft.Quantum.Chemistry.Fermion.FermionWavefunction<'Index (requires 'Index :> IEquatable<'Index> and 'Index :> IComparable<'Index>)>
Public Sub New (term As IEnumerable(Of TIndex))
Parameters
- term
- IEnumerable<TIndex>
Sequence of indices of creation operators acting on the vacuum state.
Examples
Create a list of indices of the creation operators, then
Convert the list of indices to a FermionWavefunction instance.
var indices = new[] { 1, 2, 6 };
var wavefunction = new FermionWavefunction<int>(indices);
Applies to
FermionWavefunction<TIndex>(IEnumerable<TIndex>, IEnumerable<ValueTuple<TIndex[],Double>>)
Constructs a unitary coupled-cluster wave function represented by a unitary coupled-cluster operator acting on a single-reference state.
public FermionWavefunction (System.Collections.Generic.IEnumerable<TIndex> reference, System.Collections.Generic.IEnumerable<(TIndex[], double)> excitations);
new Microsoft.Quantum.Chemistry.Fermion.FermionWavefunction<'Index (requires 'Index :> IEquatable<'Index> and 'Index :> IComparable<'Index>)> : seq<'Index (requires 'Index :> IEquatable<'Index> and 'Index :> IComparable<'Index>)> * seq<ValueTuple<'Index[], double>> -> Microsoft.Quantum.Chemistry.Fermion.FermionWavefunction<'Index (requires 'Index :> IEquatable<'Index> and 'Index :> IComparable<'Index>)>
Public Sub New (reference As IEnumerable(Of TIndex), excitations As IEnumerable(Of ValueTuple(Of TIndex(), Double)))
Parameters
- reference
- IEnumerable<TIndex>
Sequence of indices of creation operators acting on the vacuum state.
- excitations
- IEnumerable<ValueTuple<TIndex[],Double>>
Examples
Create a list of indices of the creation operators for the single-reference state.
Then create a list describing the cluster operator. The first half of each list of integers will be associated with the creation operators, and the second half with the annihilation operators.
Finally, create a fermion wavefunction object that represents the unitary coupled-cluster wavefunction. It is assumed implicity that the exponent of the unitary coupled-cluster operator is the cluster operator minus its Hermitian conjugate.
var reference = new[] { 1, 2 };
var clusterOperator = new[]
{
(new [] {0, 1}, 0.123),
(new [] {0, 3, 1, 2}, 0.456),
(new [] {3, 2, 1, 0}, 0.789)
};
var wavefunction = new FermionWavefunction<int>(reference, clusterOperator);