MBO
|
Typedefs | |
typedef struct MboElemOp_t * | MboElemOp |
Type for representing elementary operators. More... | |
Functions | |
MBO_EXPORT MBO_STATUS | mboElemOpCreate (MboElemOp *elemOp) |
Create a MboElemOp object. More... | |
MBO_EXPORT void | mboElemOpDestroy (MboElemOp *elemOp) |
Destroy a MboElemOp object. More... | |
MBO_EXPORT MBO_STATUS | mboElemOpAddTo (MboLocInd r, MboLocInd c, struct MboAmplitude *a, MboElemOp *elemOp) |
Add a non-zero entry to an MboElemOp. More... | |
MBO_EXPORT void | mboElemOpScale (struct MboAmplitude *a, MboElemOp elemOp) |
Rescale an elementary operator. More... | |
MBO_EXPORT MBO_STATUS | mboElemOpPlus (MboElemOp elemOpA, MboElemOp *elemOpB) |
Add elementary operators. More... | |
MBO_EXPORT MBO_STATUS | mboElemOpMul (MboElemOp elemOpA, MboElemOp *elemOpB) |
Add elementary operators. More... | |
MBO_EXPORT MboElemOp | mboElemOpCopy (MboElemOp elemOp) |
copy an elementary operator More... | |
MBO_EXPORT int | mboElemOpNumEntries (MboElemOp elemOp) |
Get the number of non-zero entries. More... | |
MBO_EXPORT struct MboNonZeroEntry * | mboElemOpGetEntries (MboElemOp elemOp) |
Get the non-zero entries in the operator. More... | |
MBO_EXPORT void | mboElemOpDeleteEntry (MboElemOp elemOp, int e) |
Delete a non-zero entry from an operator. More... | |
MBO_EXPORT int | mboElemOpCheck (MboElemOp elemOp) |
Check internal integrity of an elementary operator. More... | |
MBO_EXPORT MboElemOp | mboSigmaPlus () |
Spin raising operator. More... | |
MBO_EXPORT MboElemOp | mboSigmaMinus () |
Spin lowering operator. More... | |
MBO_EXPORT MboElemOp | mboSigmaZ () |
Sigma z Pauli spin matrix. More... | |
MBO_EXPORT MboElemOp | mboEye (MboLocInd dim) |
Identity operator. More... | |
MBO_EXPORT MboElemOp | mboNumOp (MboLocInd dim) |
Quantum mechanical harmonic oscillator number operator. More... | |
MBO_EXPORT MboElemOp | mboAnnihilationOp (MboLocInd dim) |
Quantum mechanical harmonic oscillator annihilation operator. More... | |
MBO_EXPORT MboElemOp | mboCreationOp (MboLocInd dim) |
Quantum mechanical harmonic oscillator creation operator. More... | |
typedef struct MboElemOp_t* MboElemOp |
Type for representing elementary operators.
MboElemOps are operators acting on an individual subsystem. Roughly speaking, MboElemOps correspond to single particle operators in a quantum mechanical context. Mathematically, MboElemOps are represented by an unordered collection of non-zero entries. MboElemOps can be used to created MboTensorOps (many-particle operators) by embedding them into a tensor product space.
Quantum mechanical harmonic oscillator annihilation operator.
The operator returned by this function must be freed with mboElemOpDestroy.
dim | Dimension of space in which to build the annihilation operator. |
Quantum mechanical harmonic oscillator creation operator.
The operator returned by this function must be freed with mboElemOpDestroy.
dim | Dimension of space in which to build the creation operator. |
MBO_EXPORT MBO_STATUS mboElemOpAddTo | ( | MboLocInd | r, |
MboLocInd | c, | ||
struct MboAmplitude * | a, | ||
MboElemOp * | elemOp | ||
) |
Add a non-zero entry to an MboElemOp.
r | Row index of non-zero entry. |
c | Column index of non-zero entry. |
a | Matrix element of entry |
elemOp | Elementary operator matrix to which to add the entry. |
MBO_EXPORT int mboElemOpCheck | ( | MboElemOp | elemOp | ) |
Check internal integrity of an elementary operator.
copy an elementary operator
The copy returned by this function must be destroyed with mboElemOpDestroy.
elemOp | Operator to copy. |
MBO_EXPORT MBO_STATUS mboElemOpCreate | ( | MboElemOp * | elemOp | ) |
Create a MboElemOp object.
MboElemOps created with mboElemOpCreate have to be destroyed with mboElemOpDestroy.
MBO_EXPORT void mboElemOpDeleteEntry | ( | MboElemOp | elemOp, |
int | e | ||
) |
Delete a non-zero entry from an operator.
Use mboElemOpNumEntries and mboElemOpGetEntries to determine e.
elemOp | Operator from which to delete an entry. |
e | The index of the entry to be delete. |
MBO_EXPORT void mboElemOpDestroy | ( | MboElemOp * | elemOp | ) |
Destroy a MboElemOp object.
MBO_EXPORT struct MboNonZeroEntry* mboElemOpGetEntries | ( | MboElemOp | elemOp | ) |
Get the non-zero entries in the operator.
It is illegal to add entries or to delete entries or otherwise modify the pointer returned by mboElemOpGetEntries. Use mboElemOpDeleteEntry to delete an entry. Modifications to the entries in the array are allowed.
elemOp | Get the non-zero entries of this operator. |
MBO_EXPORT MBO_STATUS mboElemOpMul | ( | MboElemOp | elemOpA, |
MboElemOp * | elemOpB | ||
) |
Add elementary operators.
elemOpB <- elemOpA * elemOpB
elemOpA | Operator to multiply with. |
elemOpB | Operator to be multiplied. |
MBO_EXPORT int mboElemOpNumEntries | ( | MboElemOp | elemOp | ) |
Get the number of non-zero entries.
Note that the operator may contain duplicate entries.
elemOp | Operator of which the number of entries is to be determined. |
MBO_EXPORT MBO_STATUS mboElemOpPlus | ( | MboElemOp | elemOpA, |
MboElemOp * | elemOpB | ||
) |
Add elementary operators.
elemOpB <- elemOpB + elemOpA
elemOpA | Operator to add. |
elemOpB | Operator to which to add. |
MBO_EXPORT void mboElemOpScale | ( | struct MboAmplitude * | a, |
MboElemOp | elemOp | ||
) |
Rescale an elementary operator.
elemOp <- a * elemOp
a | Factor by which to scale the operator. |
elemOp | The operator to scale. |
Identity operator.
The operator returned by this function must be freed with mboElemOpDestroy.
dim | Dimension of space in which to build the identity operator. |
Quantum mechanical harmonic oscillator number operator.
The operator returned by this function must be freed with mboElemOpDestroy.
dim | Dimension of space in which to build the number operator. |
MBO_EXPORT MboElemOp mboSigmaMinus | ( | ) |
Spin lowering operator.
The operator returned by this function must be freed with mboElemOpDestroy.
MBO_EXPORT MboElemOp mboSigmaPlus | ( | ) |
Spin raising operator.
The operator returned by this function must be freed with mboElemOpDestroy.
MBO_EXPORT MboElemOp mboSigmaZ | ( | ) |
Sigma z Pauli spin matrix.
The operator returned by this function must be freed with mboElemOpDestroy.