SymmetricProjection

SymmetricProjection is a function that computes the orthogonal projection onto the symmetric subspace of two or more subsystems. The output of this function is always a sparse matrix.

Syntax

 * PS = SymmetricProjection(DIM)
 * PS = SymmetricProjection(DIM,P)
 * PS = SymmetricProjection(DIM,P,PARTIAL)
 * PS = SymmetricProjection(DIM,P,PARTIAL,MODE)

Argument descriptions

 * DIM: The dimension of each of the subsystems.
 * P (optional, default 2): The number of subsystems.
 * PARTIAL (optional, default 0): If PARTIAL = 1</tt> then PS</tt> isn't the orthogonal projection itself, but rather a matrix whose columns form an orthonormal basis for the symmetric subspace (and hence PS*PS'</tt> is the orthogonal projection onto the symmetric subspace).
 * MODE</tt> (optional, default -1): A flag that determines which of two algorithms is used to compute the symmetric projection. If MODE = -1</tt> then this script chooses which algorithm it thinks will be faster based on the values of DIM</tt> and P</tt>. If you wish to force the script to use a specific one of the algorithms (not recommended!), they are as follows:
 * MODE = 0</tt>: Computes the symmetric projection by explicitly constructing an orthonormal basis of the symmetric subspace. The details of how to construct such a basis can be found in . This method is typically fast when DIM</tt> is small compared to P</tt>.
 * MODE = 1</tt>: Computes the symmetric projection by averaging all P!</tt> permutation operators (in the sense of the PermutationOperator</tt> function). Because P!</tt> grows very quickly, this method is only practical when P</tt> is small.

Two subsystems
To compute the symmetric projection on two-qubit space, the following code suffices:

Note that the output of this function is always sparse. If you want a full matrix (not recommended for even moderately large DIM</tt> or <tt>P</tt>), you must explicitly convert it (as in the following example).

Three subsystems
To compute a matrix whose columns form an orthonormal basis for the symmetric subspace of three-qubit space, set <tt>PARTIAL = 1</tt>:

Note that <tt>PS</tt> is an isometry from the symmetric subspace to the full three-qubit space. In other words, <tt>PS'*PS</tt> is the identity matrix and <tt>PS*PS'</tt> is the orthogonal projection onto the symmetric subspace, which we can verify as follows: