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

ProductState Class Reference
[Objects with a TPS]

A tensor product state vector. More...

#include <quantum.h>

Collaboration diagram for ProductState:

Collaboration graph
List of all members.

Public Member Functions

 ProductState (const TensorProductStructure &Uinit)
 Constructor: constructs the zero state on a given TensorProductStructure.
 ProductState (const ProductState &other)
 Copy constructor: constructs an exact copy of another ProductState.
 ~ProductState ()
 Destructor: de-allocates the array of subsystem states.
ProductStateoperator= (const ProductState &other)
 Assignment operator: sets this ProductState equal to other, if their underlying structures are the same.
StateRealize (State &fullstate) const
 Realizes the dense state vector represented by this ProductState, assigning it to the provided fullstate.
StateAddTo (State &fullstate, complex amplitude=complex(1.0, 0)) const
 Realizes a scalar multiple of this ProductState, adding it to the provided fullstate.
StateComponent (itype index)
 Returns a reference to the state of the index'th subsystem.
const StateComponent (itype index) const
 Returns a const reference to the state of the index'th subsystem.
const Stateoperator[] (itype index) const
 Returns a const reference to the state of the index'th subsystem.
Stateoperator[] (itype index)
 Returns a reference to the state of the index'th subsystem.
const TensorProductStructureTPS () const
 Returns a const reference to this ProductState's underlying TensorProductStructure.
double Norm ()
 Calculates the squared 2-norm of this state, as the product of all the subsystem states' squared 2-norms.
ProductStateNormalize ()
 Normalizes this state, by normalizing the state of each subsystem.
ProductStateRandomize ()
 Assigns an unnormalized Gaussian random vector (Haar measure) to each subsystem state.

Detailed Description

A tensor product state vector.

ProductState is exactly what anyone familiar with quantum info would expect; it's a complex-valued vector defined as a tensor product of vectors on vector spaces corresponding to subsystems. This provides a tremendous savings in space. An arbitrary State vector in a 4x4x4-dimensional space requires storing 4x4x4=64 complex numbers, while a ProductState only requires 4+4+4=12 numbers. The advantage is exponential in the number of subsystems.

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

The ProductState 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 ProductState inherit from Vector<complex>; move the Randomize() function outside the class to match DenseVector<complex>; etc.

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