Hamiltonian<TTermClassification,TTermIndexing,TTermValue> Class

Definition

Generic Hamiltonian class. This is the base class for any Hamiltonians, which are collections of categorized terms.

public class Hamiltonian<TTermClassification,TTermIndexing,TTermValue> where TTermIndexing : ITermIndex<TTermClassification,TTermIndexing> where TTermValue : ITermValue<TTermValue>
type Hamiltonian<'ermClassification, 'ermIndexing, 'ermValue (requires 'ermIndexing :> ITermIndex<'ermClassification, 'ermIndexing> and 'ermValue :> ITermValue<'ermValue>)> = class
Public Class Hamiltonian(Of TTermClassification, TTermIndexing, TTermValue)

Type Parameters

TTermClassification

Index to categories of terms.

TTermIndexing

Index to individual terms.

TTermValue

The type of the value of each Term

Inheritance
Hamiltonian<TTermClassification,TTermIndexing,TTermValue>
Derived

Constructors

Hamiltonian<TTermClassification,TTermIndexing,TTermValue>()

Constructor for empty Hamiltonian.

Hamiltonian<TTermClassification,TTermIndexing,TTermValue>(Hamiltonian<TTermClassification,TTermIndexing,TTermValue>)

Constructor for copying a Hamiltonian.

Fields

SystemIndices

Indices to systems (e.g. fermions, qubits, or orbitals) the Hamiltonian acts on.

Terms

Container for all terms in a Hamiltonian.

Methods

Add(TTermClassification, TTermIndexing, TTermValue)

Adds a term to a Hamiltonian.

Add(TTermIndexing, TTermValue)

Adds a term to a Hamiltonian. This method infers the term category from the term index if possible.

AddHamiltonian(Hamiltonian<TTermClassification,TTermIndexing,TTermValue>)

Method for add all terms from a source Hamiltonian into this Hamiltonian.

AddRange(IEnumerable<ValueTuple<TTermIndexing,TTermValue>>)

Add multiple terms to a Hamiltonian. This method infers the term category from the term index if possible.

AddRange(TTermClassification, IEnumerable<ValueTuple<TTermIndexing,TTermValue>>)

Adds multiple term to a Hamiltonian.

AddToSystemIndices(TTermIndexing)

Method that add system indices to the systemIndices hashset.

CountTerms()

Counts the number of terms in a Hamiltonian.

CountUniqueSystemIndices()

Counts the number of systems (fermions) in a Hamiltonian.

GetTerm(TTermIndexing)

Method for retrieving a term to a Hamiltonian. This method infers the term category from the term index if possible.

Norm(Double)

Computes the L_p norm of coefficients of all terms in a Hamiltonian.

Norm(IEnumerable<TTermClassification>, Double)

Computes the L_p norm of coefficients of categories of terms in a Hamiltonian.

ToString()

String representation of Hamiltonian.

Applies to