Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

ProductOperator Class Reference
[Objects with a TPS]

A tensor product of operators (complex matrices). More...

#include <quantum.h>

Collaboration diagram for ProductOperator:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ProductOperator (const TensorProductStructure &Uinit)
 Constructor: constructs the zero operator on a given TensorProductStructure.
 ProductOperator (const ProductOperator &other)
 Copy constructor: constructs an exact copy of another ProductOperator.
 ~ProductOperator ()
 Destructor: de-allocates the array of subsystem operators.
OperatorRealize (Operator &fulloperator) const
 Realizes the dense matrix represented by this ProductOperator, assigning it to the provided fulloperator.
OperatorAddTo (Operator &fulloperator, complex amplitude=complex(1.0, 0)) const
 Realizes a scalar multiple of this ProductOperator, adding it to the provided fulloperator.
OperatorComponent (itype index) const
 Returns a reference to an operator on the index'th subsystem.
Operatoroperator[] (itype index) const
 Returns a reference to an operator on the index'th subsystem.
complex Amplitude () const
 Returns the overall scaling factor of this ProductOperator.
const TensorProductStructureTPS () const
 Returns a const reference to this ProductOperator's underlying TensorProductStructure.
void ApplyTo (const State &psi, State &result) const
 Acts on the dense State psi with this ProductOperator, storing the result in result.
void ApplyAndAddTo (const State &psi, State &result, complex coefficient=complex(1.0)) const
 Acts on the dense State psi with this ProductOperator; adds a scalar multiple of the result to result.
State operator * (State &psi) const
 Returns a new dense State which is psi transformed by this rProductOperator.
ProductOperator operator * (complex scalar) const
 Returns a new ProductOperator, scaled by scalar. Much slower than the *= operator!
ProductOperator operator/ (complex scalar) const
 Returns a new ProductOperator, scaled by 1/scalar. Much slower than the /= operator!
ProductOperatoroperator *= (complex scalar)
 Scales this ProductOperator in place by scalar, and returns a reference to the result.
ProductOperatoroperator/= (complex scalar)
 Scales this ProductOperator in place by 1/scalar, and returns a reference to the result.
double Norm () const
 Calculates the squared 2-norm of this operator, as the product of all the subsystem operators' squared 2-norms.

Detailed Description

A tensor product of operators (complex matrices).

ProductOperator is exactly what anyone familiar with quantum info would expect; it's a complex matrix defined as a tensor product of matrices, each of which acts on a vector space that represents a subsystem. This provides a tremendous savings in space. An arbitrary Operator on a 4x4x4-dimensional space requires storing (4x4x4)^2=4096 complex numbers, while a ProductOpereator only requires 4^2+4^2+4^2=48 numbers. The advantage is exponential in the number of subsystems.

Each of the subsystem operators in a ProductOperator can be accessed and changed at will, but the overall operator's elements are not writable (and, as of 6/06, not directly accessible at all). Things you can do with a ProductOperator:

The ProductOperator class was put together rather hurriedly in late 2004 for a particular project, so it's not as well structured as it could be. At some point, it should be revised, but this will require updating old code (the Spinbath project) to make sure that it still works. Things to change include: make ProductOperator inherit from Matrix<complex>, etc.


Member Function Documentation

void ProductOperator::ApplyTo const State psi,
State result
const
 

Acts on the dense State psi with this ProductOperator, storing the result in result.

WARNING: psi and result must not share any data, otherwise the result will be undefined!

void ProductOperator::ApplyAndAddTo const State psi,
State result,
complex  coefficient = complex(1.0)
const
 

Acts on the dense State psi with this ProductOperator; adds a scalar multiple of the result to result.

WARNING: psi and result must not share any data, otherwise the result will be undefined!


The documentation for this class was generated from the following files:
Generated on Wed Jun 14 22:25:29 2006 for linalg by  doxygen 1.4.4