#include <quantum.h>
Collaboration diagram for SinglyBranchingState:
Public Member Functions  
SinglyBranchingState (const TensorProductStructure &Uinit)  
Constructor: constructs a zero SinglyBranchingState with the given TensorProductStructure.  
SinglyBranchingState (const SinglyBranchingState &other)  
Copy Constructor: constructs a new SinglyBranchingState that is an exact copy of other .  
SinglyBranchingState (const ProductState &other, ISet SystemIndices)  
Constructor: creates a SinglyBranchingState from a single ProductState, by identifying a (possibly composite) subsystem as the System.  
~SinglyBranchingState ()  
Destructor: deallocates component structures.  
SinglyBranchingState &  operator= (const SinglyBranchingState &other) 
Assignment operator; sets this SinglyBranchingState equal to other , provided they have identical TensorProductStructures.  
State &  Realize (State &fullstate) const 
Realizes the dense state vector represented by this SinglyBranchingState, assigning it to the provided fullstate .  
State &  AddTo (State &fullstate, complex amplitude=complex(1.0, 0)) const 
Realizes a scalar multiple of this SinglyBranchingState, adding it to the provided fullstate .  
ProductState &  Branch (itype index) const 
Returns a reference to the ProductState describing the index 'th branch.  
complex &  BranchAmplitude (itype index) 
Returns a reference to the amplitude of the index 'th branch. This is also a component of the System's putative undecohered state.  
State &  SystemState () 
Returns a reference to a state vector describing the System's state IF all branches were identical. This is a vector of branch amplitudes.  
const State &  SystemState () const 
Returns a const reference to a state vector describing the System's state IF all branches were identical.  
TensorProductStructure &  TPS () 
Returns a reference to this ProductState's underlying TensorProductStructure.  
const TensorProductStructure &  TPS () const 
Returns a const reference to this ProductState's underlying TensorProductStructure.  
double  Norm () 
Calculates the squared 2norm of this state.  
SinglyBranchingState &  Normalize () 
Normalizes this state, by normalizing: (1) the vector of amplitudes (System's state); (2) each branch state. 
A SinglyBranchingState is a particular type of quantum state defined on a Hilbert space endowed with a tensor product structure, where one subsystem is singled out as the "System", and the others are ancillae or "Subenvironments" (i.e., subsystems of the environment). The defining property is that, conditional upon a particular measurement of the System, the remaining subsystems will be found in a product state. If the System has Ds dimensions, then this means that the SinglyBranchingState is a superposition of Ds ProductStates, where the System component of each one has only one nonzero component.
SinglyBranchingStates are, in practice, a fairly straightforward extension of ProductStates. Each of the ProductStates going into the superposition is stored, along with its amplitude. Things that can be done with a SinglyBranchingState include:

Constructor: creates a SinglyBranchingState from a single ProductState, by identifying a (possibly composite) subsystem as the System. A ProductState can be interpreted as a trivial SinglyBranchingState, in which one subsystem is the System, and all the branches are identical. Such a state generally serves as the starting point for a dynamical evolution into a more complex SinglyBranchingState. This constructor reinterprets a ProductState in this way. However, it can define the System to be a composite of several subsystems from the original ProductState.
EXAMPLE: Suppose 

Returns a reference to the ProductState describing the Note that the branch has a different tensor product structure from the full SinglyBranchingState  it is missing the System component. 