35 #ifndef MBO_TENSOR_OP_H
36 #define MBO_TENSOR_OP_H
38 #include <MboExport.h>
112 MboElemOp elemop,
int i, MboTensorOp top);
127 MBO_EXPORT
void mboTensorOpMul(MboTensorOp a, MboTensorOp b, MboTensorOp *c);
MBO_EXPORT void mboTensorOpMul(MboTensorOp a, MboTensorOp b, MboTensorOp *c)
Multiply two operators and add result to third (*c) += a * b.
MBO_EXPORT MBO_STATUS mboTensorOpKron(int n, MboTensorOp *ops, MboTensorOp *c)
Tensor product of two operators.
MBO_EXPORT void mboTensorOpDestroy(MboTensorOp *top)
Destroy a tensor operator object.
struct MboProdSpace_t * MboProdSpace
Type for describing tensor product spaces.
Definition: MboProdSpace.h:46
MBO_EXPORT int mboTensorOpCheck(MboTensorOp op)
Check integrity of tensor operator.
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 ...
MBO_EXPORT void mboTensorOpNull(MboProdSpace h, MboTensorOp *top)
Create a tensor operator corresponding to the Null operator.
MBO_EXPORT void mboTensorOpPlus(MboTensorOp a, MboTensorOp *b)
Add a tensor operator to another operator (*b) += a.
Error codes used by the MBO library.
MBO_EXPORT MboTensorOp mboTensorOpCopy(MboTensorOp a)
Create a deep copy of a tensor operator.
MBO_EXPORT void mboTensorOpScale(struct MboAmplitude *alpha, MboTensorOp *a)
Scale operator.
Minimal complex numbers.
Definition: MboAmplitude.h:37
struct MboElemOp_t * MboElemOp
Type for representing elementary operators.
Definition: MboElemOp.h:56
MBO_EXPORT void mboTensorOpAddTo(MboElemOp elemop, int i, MboTensorOp top)
Add an embedding to a tensor operator.
MBO_STATUS
Error codes used by the MBO library.
Definition: MboErrors.h:33
Definition of elementary operators.
MBO_EXPORT void mboTensorOpAddScaledTo(struct MboAmplitude *alpha, MboElemOp elemop, int i, MboTensorOp top)
Adds scaled version of embedded operator to tensor operator.
struct MboTensorOp_t * MboTensorOp
Definition: MboTensorOp.h:50
MBO_EXPORT void mboTensorOpIdentity(MboProdSpace h, MboTensorOp *top)
Create a tensor operator corresponding to the Identity operator.