jsci.physics.quantum
Class Operator

java.lang.Object
  extended by jsci.physics.quantum.Operator
All Implemented Interfaces:
Serializable, Member
Direct Known Subclasses:
DensityMatrix, Projector, SpinOperator

public class Operator
extends Object
implements Member

The Operator class provides an object for encapsulating quantum mechanical operators.

See Also:
Serialized Form

Constructor Summary
Operator(AbstractComplexSquareMatrix rep)
          Constructs an operator given a matrix representation.
 
Method Summary
 Operator add(Operator op)
          Returns the addition of this operator and another.
 int dimension()
          Returns the dimension.
 boolean equals(Object a)
          Compares two operators for equality.
 AbstractComplexSquareMatrix getRepresentation()
          Returns the representation.
 Object getSet()
           
 int hashCode()
          Returns a hashcode for this operator.
 boolean isSelfAdjoint()
          Returns true if this operator is self-adjoint.
 boolean isUnitary()
          Returns true if this operator is unitary.
 KetVector multiply(KetVector ket)
          Returns the multiplication of this operator and a ket vector.
 Operator multiply(Operator op)
          Returns the multiplication of this operator and another.
 double norm()
          Returns the operator norm.
 Operator subtract(Operator op)
          Returns the subtraction of this operator and another.
 String toString()
          Returns a string representing this operator.
 Complex trace()
          Returns the trace.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Operator

public Operator(AbstractComplexSquareMatrix rep)
Constructs an operator given a matrix representation.

Parameters:
rep - a matrix representation
Method Detail

equals

public boolean equals(Object a)
Compares two operators for equality.

Overrides:
equals in class Object
Parameters:
a - an operator

toString

public String toString()
Returns a string representing this operator.

Overrides:
toString in class Object

hashCode

public int hashCode()
Returns a hashcode for this operator.

Overrides:
hashCode in class Object

getRepresentation

public AbstractComplexSquareMatrix getRepresentation()
Returns the representation.


isSelfAdjoint

public boolean isSelfAdjoint()
Returns true if this operator is self-adjoint.


isUnitary

public boolean isUnitary()
Returns true if this operator is unitary.


trace

public Complex trace()
Returns the trace.


norm

public double norm()
Returns the operator norm.


dimension

public int dimension()
Returns the dimension.


getSet

public Object getSet()
Specified by:
getSet in interface Member

add

public Operator add(Operator op)
Returns the addition of this operator and another.

Parameters:
op - an operator
Throws:
MatrixDimensionException - If the operators have different dimensions.

subtract

public Operator subtract(Operator op)
Returns the subtraction of this operator and another.

Parameters:
op - an operator
Throws:
MatrixDimensionException - If the operators have different dimensions.

multiply

public Operator multiply(Operator op)
Returns the multiplication of this operator and another.

Parameters:
op - an operator
Throws:
MatrixDimensionException - If the operators have different dimensions.

multiply

public KetVector multiply(KetVector ket)
Returns the multiplication of this operator and a ket vector.

Parameters:
ket - a ket vector
Throws:
DimensionException - If the operator and vector have different dimensions.


jHepWork 3.1 ©