org.jscience.physics.quantum
Class Operator

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

public class Operator
extends java.lang.Object
implements Member

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

See Also:
Serialized Form

Field Summary
protected  AbstractComplexSquareMatrix representation
          DOCUMENT ME!
 
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.
 boolean equals(java.lang.Object a)
          Compares two operators for equality.
 int getDimension()
          Returns the dimension.
 AbstractComplexSquareMatrix getRepresentation()
          Returns the representation.
 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.
 java.lang.String toString()
          Returns a string representing this operator.
 Complex trace()
          Returns the trace.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

representation

protected AbstractComplexSquareMatrix representation
DOCUMENT ME!

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(java.lang.Object a)
Compares two operators for equality.

Overrides:
equals in class java.lang.Object
Parameters:
a - an operator
Returns:
DOCUMENT ME!

toString

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

Overrides:
toString in class java.lang.Object
Returns:
DOCUMENT ME!

hashCode

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

Overrides:
hashCode in class java.lang.Object
Returns:
DOCUMENT ME!

getRepresentation

public AbstractComplexSquareMatrix getRepresentation()
Returns the representation.

Returns:
DOCUMENT ME!

isSelfAdjoint

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

Returns:
DOCUMENT ME!

isUnitary

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

Returns:
DOCUMENT ME!

trace

public Complex trace()
Returns the trace.

Returns:
DOCUMENT ME!

norm

public double norm()
Returns the operator norm.

Returns:
DOCUMENT ME!

getDimension

public int getDimension()
Returns the dimension.

Returns:
DOCUMENT ME!

add

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

Parameters:
op - an operator
Returns:
DOCUMENT ME!

subtract

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

Parameters:
op - an operator
Returns:
DOCUMENT ME!

multiply

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

Parameters:
op - an operator
Returns:
DOCUMENT ME!

multiply

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

Parameters:
ket - a ket vector
Returns:
DOCUMENT ME!
Throws:
IllegalDimensionException - If the operator and vector have different dimensions.