public final class QuantumMath extends AbstractMath
Modifier and Type | Method and Description |
---|---|
static Operator |
anticommutator(Operator A,
Operator B)
Returns the anticommutator {A,B}.
|
static Operator |
commutator(Operator A,
Operator B)
Returns the commutator [A,B].
|
static Complex |
expectation(DensityMatrix dm,
Operator op)
Returns the expectation value.
|
static Complex |
expectation(Operator op,
KetVector ket)
Returns the expectation value.
|
static Complex |
probability(DensityMatrix dm,
Projector p)
Returns the probability.
|
static Complex |
probability(Projector p,
KetVector ket)
Returns the probability.
|
public static Operator commutator(Operator A, Operator B)
A
- an operatorB
- an operatorpublic static Operator anticommutator(Operator A, Operator B)
A
- an operatorB
- an operatorpublic static Complex expectation(Operator op, KetVector ket)
op
- an operatorket
- a ket vectorDimensionException
- If the operator and vector have different dimensions.public static Complex expectation(DensityMatrix dm, Operator op)
dm
- a density matrixop
- an operatorMatrixDimensionException
- If the operator and matrix have different dimensions.public static Complex probability(Projector p, KetVector ket)
p
- a projectorket
- a ket vectorDimensionException
- If the projector and vector have different dimensions.public static Complex probability(DensityMatrix dm, Projector p)
dm
- a density matrixp
- a projectorMatrixDimensionException
- If the projector and matrix have different dimensions.