RandomPOVM

From QETLAB
Jump to navigation Jump to search
RandomPOVM
Generates a random POVM (positive-operator valued measure)

Other toolboxes required none
Related functions RandomSuperoperator
RandomUnitary
Function category Random things

RandomPOVM is a function that generates a random POVM (positive-operator valued measure) with a specified dimension and number of measurement outcomes.

Syntax

  • P = RandomPOVM(DIM,OUTC)
  • P = RandomPOVM(DIM,OUTC,RE)

Argument descriptions

  • DIM: A scalar indicating the size of the POVM elements (i.e., each POVM element will have size DIM-by-DIM).
  • OUTC: The number of POVM elements (i.e., the number of possible measurement outcomes).
  • RE (optional, default 0): A flag (either 1 or 0) indicating that the entries of the POVM should or should not all be real.

Examples

The following code generates a random POVM on 4-dimensional space with 3 measurement outcomes:

>> P  = RandomPOVM(4,3);
>> celldisp(P) % display the POVM elements
 
P{1} =
 
   0.3485 + 0.0000i   0.0512 + 0.0443i   0.0016 - 0.0853i  -0.0861 + 0.0509i
   0.0512 - 0.0443i   0.4188 + 0.0000i  -0.1040 - 0.0067i  -0.0271 - 0.0281i
   0.0016 + 0.0853i  -0.1040 + 0.0067i   0.3005 + 0.0000i  -0.0853 - 0.0330i
  -0.0861 - 0.0509i  -0.0271 + 0.0281i  -0.0853 + 0.0330i   0.3845          

P{2} =
 
   0.3658 + 0.0000i   0.0037 - 0.0577i   0.0351 + 0.0928i   0.0223 + 0.0511i
   0.0037 + 0.0577i   0.2127 + 0.0000i   0.0961 + 0.0384i   0.0656 - 0.0671i
   0.0351 - 0.0928i   0.0961 - 0.0384i   0.4426 + 0.0000i   0.0813 - 0.0791i
   0.0223 - 0.0511i   0.0656 + 0.0671i   0.0813 + 0.0791i   0.4032 - 0.0000i

P{3} =
 
   0.2857 + 0.0000i  -0.0549 + 0.0135i  -0.0367 - 0.0076i   0.0638 - 0.1020i
  -0.0549 - 0.0135i   0.3685 + 0.0000i   0.0079 - 0.0317i  -0.0385 + 0.0952i
  -0.0367 + 0.0076i   0.0079 + 0.0317i   0.2569 + 0.0000i   0.0040 + 0.1121i
   0.0638 + 0.1020i  -0.0385 - 0.0952i   0.0040 - 0.1121i   0.2123 + 0.0000i

It is straightforward to verify that these operators are positive semidefinite and sum to the identity (and thus form a valid POVM):

>> IsPSD(P{1})

ans =

     1

>> IsPSD(P{2})

ans =

     1

>> IsPSD(P{3})

ans =

     1

>> P{1} + P{2} + P{3}

ans =

   1.0000 + 0.0000i   0.0000 + 0.0000i  -0.0000 - 0.0000i  -0.0000 - 0.0000i
   0.0000 - 0.0000i   1.0000 + 0.0000i  -0.0000 + 0.0000i   0.0000 + 0.0000i
  -0.0000 + 0.0000i  -0.0000 - 0.0000i   1.0000 + 0.0000i   0.0000 - 0.0000i
  -0.0000 + 0.0000i   0.0000 - 0.0000i   0.0000 + 0.0000i   1.0000 + 0.0000i

Notes

  • Other methods of generating random POVMs (as well as an analysis of their properties) are provided in arXiv:1902.04751. Someone should implement some of these methods in QETLAB at some point.

Source code

Click here to view this function's source code on github.