#include <quantum.h>
Collaboration diagram for ProductOperator:
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: deallocates the array of subsystem operators.  
Operator &  Realize (Operator &fulloperator) const 
Realizes the dense matrix represented by this ProductOperator, assigning it to the provided fulloperator .  
Operator &  AddTo (Operator &fulloperator, complex amplitude=complex(1.0, 0)) const 
Realizes a scalar multiple of this ProductOperator, adding it to the provided fulloperator .  
Operator &  Component (itype index) const 
Returns a reference to an operator on the index 'th subsystem.  
Operator &  operator[] (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 TensorProductStructure &  TPS () 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!  
ProductOperator &  operator *= (complex scalar) 
Scales this ProductOperator in place by scalar , and returns a reference to the result.  
ProductOperator &  operator/= (complex scalar) 
Scales this ProductOperator in place by 1/scalar , and returns a reference to the result.  
double  Norm () const 
Calculates the squared 2norm of this operator, as the product of all the subsystem operators' squared 2norms. 
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 4x4x4dimensional 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.

Acts on the dense State
WARNING: 

Acts on the dense State
WARNING: 