jsci.physics.quantum
Class QuantumMath
- java.lang.Object
-
- jsci.maths.AbstractMath
-
- jsci.physics.quantum.QuantumMath
-
public final class QuantumMath extends AbstractMath
The Quantum math library. This class cannot be subclassed or instantiated because all methods are static.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static Operatoranticommutator(Operator A, Operator B)Returns the anticommutator {A,B}.static Operatorcommutator(Operator A, Operator B)Returns the commutator [A,B].static Complexexpectation(DensityMatrix dm, Operator op)Returns the expectation value.static Complexexpectation(Operator op, KetVector ket)Returns the expectation value.static Complexprobability(DensityMatrix dm, Projector p)Returns the probability.static Complexprobability(Projector p, KetVector ket)Returns the probability.
-
-
-
Method Detail
-
commutator
public static Operator commutator(Operator A, Operator B)
Returns the commutator [A,B].- Parameters:
A- an operatorB- an operator
-
anticommutator
public static Operator anticommutator(Operator A, Operator B)
Returns the anticommutator {A,B}.- Parameters:
A- an operatorB- an operator
-
expectation
public static Complex expectation(Operator op, KetVector ket)
Returns the expectation value.- Parameters:
op- an operatorket- a ket vector- Throws:
DimensionException- If the operator and vector have different dimensions.
-
expectation
public static Complex expectation(DensityMatrix dm, Operator op)
Returns the expectation value.- Parameters:
dm- a density matrixop- an operator- Throws:
MatrixDimensionException- If the operator and matrix have different dimensions.
-
probability
public static Complex probability(Projector p, KetVector ket)
Returns the probability.- Parameters:
p- a projectorket- a ket vector- Throws:
DimensionException- If the projector and vector have different dimensions.
-
probability
public static Complex probability(DensityMatrix dm, Projector p)
Returns the probability.- Parameters:
dm- a density matrixp- a projector- Throws:
MatrixDimensionException- If the projector and matrix have different dimensions.
-
-
DMelt 3.0 © DataMelt by jWork.ORG