# Difference between revisions of "SkVectorNorm"

 Other toolboxes required SkVectorNorm Computes the s(k)-norm of a vector none KyFanNormSchmidtDecompositionSkOperatorNorm Norms no

SkVectorNorm is a function that computes the s(k)-norm of a vector (i.e., the Euclidean norm of the vector of its k largest Schmidt coefficients).

## Syntax

• SkVectorNorm(VEC)
• SkVectorNorm(VEC,K)
• SkVectorNorm(VEC,K,DIM)

## Argument descriptions

• VEC: A vector living in bipartite space.
• K (optional, default 1): A positive integer.
• DIM (optional, by default has both subsystems of equal dimension): A 1-by-2 vector containing the dimensions of the subsystems that VEC lives on.

## Examples

### Sum of squares of eigenvalues of reduced density matrix

The square of the s(k)-vector norm is equal to the Ky Fan k-norm of the vector's reduced density matrix:

```>> v = RandomStateVector(9);
>> [SkVectorNorm(v,1)^2, KyFanNorm(PartialTrace(v*v'),1)]

ans =

0.7754    0.7754

>> [SkVectorNorm(v,2)^2, KyFanNorm(PartialTrace(v*v'),2)]

ans =

0.9333    0.9333

>> [SkVectorNorm(v,3)^2, KyFanNorm(PartialTrace(v*v'),3)]

ans =

1.0000    1.0000```

## Source code

Click on "expand" to the right to view the MATLAB source code for this function.