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

Typedefs

typedef struct MboTensorOp_t * MboTensorOp
 

Functions

MBO_EXPORT void mboTensorOpNull (MboProdSpace h, MboTensorOp *top)
 Create a tensor operator corresponding to the Null operator. More...
 
MBO_EXPORT void mboTensorOpIdentity (MboProdSpace h, MboTensorOp *top)
 Create a tensor operator corresponding to the Identity operator. More...
 
MBO_EXPORT void mboTensorOpDestroy (MboTensorOp *top)
 Destroy a tensor operator object. More...
 
MBO_EXPORT void mboTensorOpAddTo (MboElemOp elemop, int i, MboTensorOp top)
 Add an embedding to a tensor operator. More...
 
MBO_EXPORT MboProdSpace mboTensorOpGetSpace (MboTensorOp op)
 Get the space on which the operator is defined This method returns a non-owning pointer to the space on which the tensor operator is defined. The caller must not modify the product space or destroy it. More...
 
MBO_EXPORT void mboTensorOpAddScaledTo (struct MboAmplitude *alpha, MboElemOp elemop, int i, MboTensorOp top)
 Adds scaled version of embedded operator to tensor operator. More...
 
MBO_EXPORT MboTensorOp mboTensorOpCopy (MboTensorOp a)
 Create a deep copy of a tensor operator. More...
 
MBO_EXPORT void mboTensorOpMul (MboTensorOp a, MboTensorOp b, MboTensorOp *c)
 Multiply two operators and add result to third (*c) += a * b.
 
MBO_EXPORT void mboTensorOpPlus (MboTensorOp a, MboTensorOp *b)
 Add a tensor operator to another operator (*b) += a.
 
MBO_EXPORT void mboTensorOpScale (struct MboAmplitude *alpha, MboTensorOp *a)
 Scale operator. More...
 
MBO_EXPORT MBO_STATUS mboTensorOpKron (int n, MboTensorOp *ops, MboTensorOp *c)
 Tensor product of two operators. More...
 
MBO_EXPORT int mboTensorOpCheck (MboTensorOp op)
 Check integrity of tensor operator. More...
 

Detailed Description

Typedef Documentation

typedef struct MboTensorOp_t* MboTensorOp

Data type for representing tensor operators.

Function Documentation

MBO_EXPORT void mboTensorOpAddScaledTo ( struct MboAmplitude alpha,
MboElemOp  elemop,
int  i,
MboTensorOp  top 
)

Adds scaled version of embedded operator to tensor operator.

See also
mboTensorOpAddTo
MBO_EXPORT void mboTensorOpAddTo ( MboElemOp  elemop,
int  i,
MboTensorOp  top 
)

Add an embedding to a tensor operator.

Takes the elementary operator and embeds it into the product space of the tensor operator at slot i. Schematically, this can be written as follows:

top += I_0 x I_1 x ... x I_(i-1) x elemop x I_(i+1) x ... x I_N
Parameters
elemopElementary operator to be embedded.
iSlot where operator gets embedded into the tensor operators product space.
topTensor operator to which to add the result.
MBO_EXPORT int mboTensorOpCheck ( MboTensorOp  op)

Check integrity of tensor operator.

Parameters
opThe operator to check.
Returns
the number of errors.
See also
MboTensorOp
MBO_EXPORT MboTensorOp mboTensorOpCopy ( MboTensorOp  a)

Create a deep copy of a tensor operator.

Parameters
aOperator to copy.
Returns
Deeop copy of a.
MBO_EXPORT void mboTensorOpDestroy ( MboTensorOp top)

Destroy a tensor operator object.

See also
mboTensorOpCreate, mboTensorOpCreateIdentity
MBO_EXPORT MboProdSpace mboTensorOpGetSpace ( MboTensorOp  op)

Get the space on which the operator is defined This method returns a non-owning pointer to the space on which the tensor operator is defined. The caller must not modify the product space or destroy it.

Returns
Pointer to product space of operator (non-owning)
MBO_EXPORT void mboTensorOpIdentity ( MboProdSpace  h,
MboTensorOp top 
)

Create a tensor operator corresponding to the Identity operator.

The resources used by the object have to be release with mboTensorOpDestroy.

Parameters
hUnderlying product space for the operator.
topThe operator produced.
See also
mboTensorOpDestroy, mboTensorOpNull
MBO_EXPORT MBO_STATUS mboTensorOpKron ( int  n,
MboTensorOp ops,
MboTensorOp c 
)

Tensor product of two operators.

*c += ops[0] x ops[1] x ... x ops[n]

MBO_EXPORT void mboTensorOpNull ( MboProdSpace  h,
MboTensorOp top 
)

Create a tensor operator corresponding to the Null operator.

The resources used by the object have to be release with mboTensorOpDestroy.

Parameters
hUnderlying product space for the operator.
topThe operator produced.
See also
mboTensorOpDestroy, mboTensorOpIdentity
MBO_EXPORT void mboTensorOpScale ( struct MboAmplitude alpha,
MboTensorOp a 
)

Scale operator.

Schematically: *a *= alpha;