<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://qetlab.com/wiki/index.php?action=history&amp;feed=atom&amp;title=RandomPOVM</id>
	<title>RandomPOVM - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://qetlab.com/wiki/index.php?action=history&amp;feed=atom&amp;title=RandomPOVM"/>
	<link rel="alternate" type="text/html" href="https://qetlab.com/wiki/index.php?title=RandomPOVM&amp;action=history"/>
	<updated>2026-04-16T16:26:47Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.3</generator>
	<entry>
		<id>https://qetlab.com/wiki/index.php?title=RandomPOVM&amp;diff=940&amp;oldid=prev</id>
		<title>Nathaniel at 13:23, 14 February 2019</title>
		<link rel="alternate" type="text/html" href="https://qetlab.com/wiki/index.php?title=RandomPOVM&amp;diff=940&amp;oldid=prev"/>
		<updated>2019-02-14T13:23:44Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 13:23, 14 February 2019&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l73&quot; &gt;Line 73:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 73:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   -0.0000 + 0.0000i   0.0000 - 0.0000i   0.0000 + 0.0000i   1.0000 + 0.0000i&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   -0.0000 + 0.0000i   0.0000 - 0.0000i   0.0000 + 0.0000i   1.0000 + 0.0000i&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==Notes==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* Other methods of generating random POVMs (as well as an analysis of their properties) are provided in [https://arxiv.org/abs/1902.04751 arXiv:1902.04751]. Someone should implement some of these methods in QETLAB at some point.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{SourceCode|name=RandomPOVM}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{SourceCode|name=RandomPOVM}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Nathaniel</name></author>
	</entry>
	<entry>
		<id>https://qetlab.com/wiki/index.php?title=RandomPOVM&amp;diff=834&amp;oldid=prev</id>
		<title>Nathaniel: Created page with &quot;{{Function |name=RandomPOVM |desc=Generates a random POVM (positive-operator valued measure) |rel=RandomSuperoperator&lt;br /&gt;RandomUnitary |cat=List of functions#Rando...&quot;</title>
		<link rel="alternate" type="text/html" href="https://qetlab.com/wiki/index.php?title=RandomPOVM&amp;diff=834&amp;oldid=prev"/>
		<updated>2016-01-06T19:51:14Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Function |name=RandomPOVM |desc=Generates a random POVM (positive-operator valued measure) |rel=&lt;a href=&quot;/RandomSuperoperator&quot; title=&quot;RandomSuperoperator&quot;&gt;RandomSuperoperator&lt;/a&gt;&amp;lt;br /&amp;gt;&lt;a href=&quot;/RandomUnitary&quot; title=&quot;RandomUnitary&quot;&gt;RandomUnitary&lt;/a&gt; |cat=List of functions#Rando...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Function&lt;br /&gt;
|name=RandomPOVM&lt;br /&gt;
|desc=Generates a random POVM (positive-operator valued measure)&lt;br /&gt;
|rel=[[RandomSuperoperator]]&amp;lt;br /&amp;gt;[[RandomUnitary]]&lt;br /&gt;
|cat=[[List of functions#Random_things|Random things]]&lt;br /&gt;
|upd=January 6, 2016}}&lt;br /&gt;
&amp;lt;tt&amp;gt;'''RandomPOVM'''&amp;lt;/tt&amp;gt; is a [[List of functions|function]] that generates a random [https://en.wikipedia.org/wiki/POVM POVM (positive-operator valued measure)] with a specified dimension and number of measurement outcomes.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
* &amp;lt;tt&amp;gt;P = RandomPOVM(DIM,OUTC)&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;P = RandomPOVM(DIM,OUTC,RE)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Argument descriptions==&lt;br /&gt;
* &amp;lt;tt&amp;gt;DIM&amp;lt;/tt&amp;gt;: A scalar indicating the size of the POVM elements (i.e., each POVM element will have size &amp;lt;tt&amp;gt;DIM&amp;lt;/tt&amp;gt;-by-&amp;lt;tt&amp;gt;DIM&amp;lt;/tt&amp;gt;).&lt;br /&gt;
* &amp;lt;tt&amp;gt;OUTC&amp;lt;/tt&amp;gt;: The number of POVM elements (i.e., the number of possible measurement outcomes).&lt;br /&gt;
* &amp;lt;tt&amp;gt;RE&amp;lt;/tt&amp;gt; (optional, default 0): A flag (either 1 or 0) indicating that the entries of the POVM should or should not all be real.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
The following code generates a random POVM on 4-dimensional space with 3 measurement outcomes:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; P  = RandomPOVM(4,3);&lt;br /&gt;
&amp;gt;&amp;gt; celldisp(P) % display the POVM elements&lt;br /&gt;
 &lt;br /&gt;
P{1} =&lt;br /&gt;
 &lt;br /&gt;
   0.3485 + 0.0000i   0.0512 + 0.0443i   0.0016 - 0.0853i  -0.0861 + 0.0509i&lt;br /&gt;
   0.0512 - 0.0443i   0.4188 + 0.0000i  -0.1040 - 0.0067i  -0.0271 - 0.0281i&lt;br /&gt;
   0.0016 + 0.0853i  -0.1040 + 0.0067i   0.3005 + 0.0000i  -0.0853 - 0.0330i&lt;br /&gt;
  -0.0861 - 0.0509i  -0.0271 + 0.0281i  -0.0853 + 0.0330i   0.3845          &lt;br /&gt;
&lt;br /&gt;
P{2} =&lt;br /&gt;
 &lt;br /&gt;
   0.3658 + 0.0000i   0.0037 - 0.0577i   0.0351 + 0.0928i   0.0223 + 0.0511i&lt;br /&gt;
   0.0037 + 0.0577i   0.2127 + 0.0000i   0.0961 + 0.0384i   0.0656 - 0.0671i&lt;br /&gt;
   0.0351 - 0.0928i   0.0961 - 0.0384i   0.4426 + 0.0000i   0.0813 - 0.0791i&lt;br /&gt;
   0.0223 - 0.0511i   0.0656 + 0.0671i   0.0813 + 0.0791i   0.4032 - 0.0000i&lt;br /&gt;
&lt;br /&gt;
P{3} =&lt;br /&gt;
 &lt;br /&gt;
   0.2857 + 0.0000i  -0.0549 + 0.0135i  -0.0367 - 0.0076i   0.0638 - 0.1020i&lt;br /&gt;
  -0.0549 - 0.0135i   0.3685 + 0.0000i   0.0079 - 0.0317i  -0.0385 + 0.0952i&lt;br /&gt;
  -0.0367 + 0.0076i   0.0079 + 0.0317i   0.2569 + 0.0000i   0.0040 + 0.1121i&lt;br /&gt;
   0.0638 + 0.1020i  -0.0385 - 0.0952i   0.0040 - 0.1121i   0.2123 + 0.0000i&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is straightforward to verify that these operators are positive semidefinite and sum to the identity (and thus form a valid POVM):&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; IsPSD(P{1})&lt;br /&gt;
&lt;br /&gt;
ans =&lt;br /&gt;
&lt;br /&gt;
     1&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; IsPSD(P{2})&lt;br /&gt;
&lt;br /&gt;
ans =&lt;br /&gt;
&lt;br /&gt;
     1&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; IsPSD(P{3})&lt;br /&gt;
&lt;br /&gt;
ans =&lt;br /&gt;
&lt;br /&gt;
     1&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; P{1} + P{2} + P{3}&lt;br /&gt;
&lt;br /&gt;
ans =&lt;br /&gt;
&lt;br /&gt;
   1.0000 + 0.0000i   0.0000 + 0.0000i  -0.0000 - 0.0000i  -0.0000 - 0.0000i&lt;br /&gt;
   0.0000 - 0.0000i   1.0000 + 0.0000i  -0.0000 + 0.0000i   0.0000 + 0.0000i&lt;br /&gt;
  -0.0000 + 0.0000i  -0.0000 - 0.0000i   1.0000 + 0.0000i   0.0000 - 0.0000i&lt;br /&gt;
  -0.0000 + 0.0000i   0.0000 - 0.0000i   0.0000 + 0.0000i   1.0000 + 0.0000i&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{SourceCode|name=RandomPOVM}}&lt;/div&gt;</summary>
		<author><name>Nathaniel</name></author>
	</entry>
</feed>