MBO
 All Data Structures Files Functions Variables Typedefs Enumerations Modules Pages
Typedefs | Functions

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 MboNonZeroEntrymboElemOpGetEntries (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...
 

Detailed Description

Typedef Documentation

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.

See also
MboTensorOp, MboProdSpace, MboNonZeroEntry

Function Documentation

MBO_EXPORT MboElemOp mboAnnihilationOp ( MboLocInd  dim)

Quantum mechanical harmonic oscillator annihilation operator.

The operator returned by this function must be freed with mboElemOpDestroy.

Parameters
dimDimension of space in which to build the annihilation operator.
Returns
The annihilation operator.
See also
mboElemOpDestroy, MboElemOp
MBO_EXPORT MboElemOp mboCreationOp ( MboLocInd  dim)

Quantum mechanical harmonic oscillator creation operator.

The operator returned by this function must be freed with mboElemOpDestroy.

Parameters
dimDimension of space in which to build the creation operator.
Returns
The creation operator.
See also
mboElemOpDestroy, MboElemOp
MBO_EXPORT MBO_STATUS mboElemOpAddTo ( MboLocInd  r,
MboLocInd  c,
struct MboAmplitude a,
MboElemOp elemOp 
)

Add a non-zero entry to an MboElemOp.

Parameters
rRow index of non-zero entry.
cColumn index of non-zero entry.
aMatrix element of entry
elemOpElementary operator matrix to which to add the entry.
See also
mboElemOpScale, MboElemOp
MBO_EXPORT int mboElemOpCheck ( MboElemOp  elemOp)

Check internal integrity of an elementary operator.

Returns
Number of errors found.
See also
MboElemOp
MBO_EXPORT MboElemOp mboElemOpCopy ( MboElemOp  elemOp)

copy an elementary operator

The copy returned by this function must be destroyed with mboElemOpDestroy.

Parameters
elemOpOperator to copy.
Returns
A copy of elemOp.
See also
mboElemOpDestroy, MboElemOp
MBO_EXPORT MBO_STATUS mboElemOpCreate ( MboElemOp elemOp)

Create a MboElemOp object.

MboElemOps created with mboElemOpCreate have to be destroyed with mboElemOpDestroy.

See also
mboElemOpDestroy, MboElemOp
MBO_EXPORT void mboElemOpDeleteEntry ( MboElemOp  elemOp,
int  e 
)

Delete a non-zero entry from an operator.

Use mboElemOpNumEntries and mboElemOpGetEntries to determine e.

Parameters
elemOpOperator from which to delete an entry.
eThe index of the entry to be delete.
See also
mboElemOpNumEntries, mboElemOpGetEntries, MboElemOp
MBO_EXPORT void mboElemOpDestroy ( MboElemOp elemOp)

Destroy a MboElemOp object.

See also
mboElemOpCreate, MboElemOp
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.

Parameters
elemOpGet the non-zero entries of this operator.
Returns
An array with the non-zero entries.
See also
mboElemOpNumEntries, MboElemOp, mboElemOpDeleteEntry
MBO_EXPORT MBO_STATUS mboElemOpMul ( MboElemOp  elemOpA,
MboElemOp elemOpB 
)

Add elementary operators.

elemOpB <- elemOpA * elemOpB

Parameters
elemOpAOperator to multiply with.
elemOpBOperator to be multiplied.
See also
mboElemOpScale, mboElemOpPlus, MboElemOp
MBO_EXPORT int mboElemOpNumEntries ( MboElemOp  elemOp)

Get the number of non-zero entries.

Note that the operator may contain duplicate entries.

Parameters
elemOpOperator of which the number of entries is to be determined.
Returns
Number of non-zero entries in elemOp.
See also
mboElemOpGetEntries, MboElemOp
MBO_EXPORT MBO_STATUS mboElemOpPlus ( MboElemOp  elemOpA,
MboElemOp elemOpB 
)

Add elementary operators.

elemOpB <- elemOpB + elemOpA

Parameters
elemOpAOperator to add.
elemOpBOperator to which to add.
See also
mboElemOpScale, mboElemOpMul, MboElemOp
MBO_EXPORT void mboElemOpScale ( struct MboAmplitude a,
MboElemOp  elemOp 
)

Rescale an elementary operator.

elemOp <- a * elemOp

Parameters
aFactor by which to scale the operator.
elemOpThe operator to scale.
See also
mboElemOpPlus, mboElemOpMul, MboElemOp
MBO_EXPORT MboElemOp mboEye ( MboLocInd  dim)

Identity operator.

The operator returned by this function must be freed with mboElemOpDestroy.

Parameters
dimDimension of space in which to build the identity operator.
Returns
The identity operator.
See also
mboElemOpDestroy, MboElemOp
MBO_EXPORT MboElemOp mboNumOp ( MboLocInd  dim)

Quantum mechanical harmonic oscillator number operator.

The operator returned by this function must be freed with mboElemOpDestroy.

Parameters
dimDimension of space in which to build the number operator.
Returns
The number operator.
See also
mboElemOpDestroy, MboElemOp
MBO_EXPORT MboElemOp mboSigmaMinus ( )

Spin lowering operator.

The operator returned by this function must be freed with mboElemOpDestroy.

Returns
lowering operator.
See also
mboElemOpDestroy, MboElemOp
MBO_EXPORT MboElemOp mboSigmaPlus ( )

Spin raising operator.

The operator returned by this function must be freed with mboElemOpDestroy.

Returns
raising operotr.
See also
mboElemOpDestroy, MboElemOp
MBO_EXPORT MboElemOp mboSigmaZ ( )

Sigma z Pauli spin matrix.

The operator returned by this function must be freed with mboElemOpDestroy.

Returns
Sigma-Z matrix
See also
mboElemOpDestroy, MboElemOp