This resource function is obsolete. Use the paclet Wolfram/QuantumFramework instead.

Function Repository Resource:

QuantumMeasurement

Source Notebook

Represent the outcomes of a quantum measurement

Contributed by: Jonathan Gorard and Taufiq Murtadho

ResourceFunction["QuantumMeasurement"][<|o1p1,o2p2,|>,{QuantumDiscreteState[],QuantumDiscreteState[],}]

represents the result of a quantum measurement with possible outcomes oi and associated probabilities pi, with a list of QuantumDiscreteState objects representing the possible quantum states of the system following the measurement operation.

Details

ResourceFunction["QuantumMeasurement"] shares many properties in common with CategoricalDistribution.
The Association <|o1p1,o2p2,|> has keys given by named measurement outcomes oi and values given by probabilities pi.
ResourceFunction["QuantumMeasurement"][]["prop"] gives the property "prop" of the specified quantum measurement. Possible properties include:
"Distribution"CategoricalDistribution object representing the measurement outcome(s)
"Outcomes"list of possible measurement outcomes
"Probabilities"association of measurement outcomes and their respective probabilities
"ProbabilitiesList"list of measurement probabilities
"ProbabilityTable"measurement outcomes and their probabilities in a Dataset
"ProbabilityArray"measurement probabilities in a SparseArray
"ProbabilityPlot"visualization of the measurement probability function
"TopProbabilities"list of measurement outcomes with the highest probabilities
"TopProbabilities"nlist of top n measurement outcomes with the highest probabilities
"Entropy"exact entropy of the measurement distribution
"NEntropy"numerical approximation of entropy of the measurement distribution
"SimulatedMeasurement"outcome of one simulated measurement
{"SimulatedMeasurement",n}list of outcomes from n simulated measurements
"Mean"(symbolic) mean of all measurement outcomes
"States"list of possible QuantumDiscreteState objects following measurement
"StateAssociation"association of measurement outcomes and their respective QuantumDiscreteState objects
"StateProbabilities"association of QuantumDiscreteState objects and their respective probabilities
"StateProbabilityTable"QuantumDiscreteState objects and their probabilities in a Dataset
"TopStateProbabilities"list of QuantumDiscreteState objects with the highest probabilities
"TopStateProbabilities"nlist of top n QuantumDiscreteState objects with the highest probabilities
"SimulatedStateMeasurement"QuantumDiscreteState object yielded by one simulated measurement
{"SimulatedStateMeasurement",n}list of QuantumDiscreteState objects yielded by n simulated measurements
"MeanState"(symbolic) mean of all QuantumDiscreteState objects
"Properties"list of all property names

Examples

Basic Examples (3) 

Define a QuantumMeasurement object for a two-level quantum system with two possible measurement outcomes:

In[1]:=
measurement = ResourceFunction[
  "QuantumMeasurement"][<|Ket["up"] -> 0.7, Ket["down"] -> 0.3|>, {ResourceFunction["QuantumDiscreteState"][{1, 0}], ResourceFunction["QuantumDiscreteState"][{0, 1}]}]
Out[1]=

Return the associated CategoricalDistribution object:

In[2]:=
measurement["Distribution"]
Out[2]=

Return the list possible QuantumDiscreteState objects following measurement:

In[3]:=
measurement["States"]
Out[3]=

Conduct a simulated measurement:

In[4]:=
measurement["SimulatedMeasurement"]
Out[4]=

Conduct 100 simulated measurements:

In[5]:=
measurement[{"SimulatedMeasurement", 100}]
Out[5]=

QuantumMeasurement automatically normalizes the input probabilities:

In[6]:=
measurement = ResourceFunction[
  "QuantumMeasurement"][<|Ket[1] -> 1, Ket[2] -> 2, Ket[3] -> 3|>, {ResourceFunction["QuantumDiscreteState"][{1 + I, 0}], ResourceFunction["QuantumDiscreteState"][{1 - I, 0}], ResourceFunction["QuantumDiscreteState"][{1, 1 - I}]}]
Out[6]=

Return the association of measurement outcomes and their respective probabilities:

In[7]:=
measurement["Probabilities"]
Out[7]=

Return the association of measurement outcomes and their respective QuantumDiscreteState objects:

In[8]:=
measurement["StateAssociation"]
Out[8]=

Compute the QuantumDiscreteState object yielded by a simulated measurement:

In[9]:=
measurement["SimulatedStateMeasurement"]
Out[9]=

Compute the list of QuantumDiscreteState objects yielded by 10 simulated measurements:

In[10]:=
measurement[{"SimulatedStateMeasurement", 10}]
Out[10]=

Compute the exact entropy of the measurement distribution:

In[11]:=
measurement["Entropy"]
Out[11]=

Compute the approximate (numerical) entropy of the measurement distribution:

In[12]:=
measurement["NEntropy"]
Out[12]=

Define a QuantumMeasurement object for a three-level quantum system with four possible measurement outcomes:

In[13]:=
measurement = ResourceFunction[
  "QuantumMeasurement"][<|Ket[1] -> 0.2, Ket[2] -> 0.4, Ket[3] -> 0.3,
    Ket[4] -> 0.1|>, {ResourceFunction["QuantumDiscreteState"][{1 + I, 0, 0}, 3], ResourceFunction["QuantumDiscreteState"][{1 - I, 1 + I, 0}, 3], ResourceFunction["QuantumDiscreteState"][{0, 1 - I, 1 + I}, 3], ResourceFunction["QuantumDiscreteState"][{0, 0, 1 - I}, 3]}]
Out[13]=

Return the association of measurement outcomes and their respective probabilities:

In[14]:=
measurement["Probabilities"]
Out[14]=

Return the association of QuantumDiscreteState objects and their respective probabilities:

In[15]:=
measurement["StateProbabilities"]
Out[15]=

Scope (24) 

View a list of properties that can be extracted from a QuantumMeasurement object:

In[16]:=
measurement = ResourceFunction[
  "QuantumMeasurement"][<|Ket[-1] -> 3/10, Ket[1] -> 7/10|>, {ResourceFunction["QuantumDiscreteState"][
    "RandomPure"], ResourceFunction["QuantumDiscreteState"]["RandomPure"]}]
Out[16]=
In[17]:=
measurement["Properties"]
Out[17]=

Return the CategoricalDistribution object representing the measurement outcomes:

In[18]:=
measurement["Distribution"]
Out[18]=

Return the list of possible measurement outcomes:

In[19]:=
measurement["Outcomes"]
Out[19]=

Return the association of measurement outcomes and their respective probabilities:

In[20]:=
measurement["Probabilities"]
Out[20]=

Return the list of measurement probabilities:

In[21]:=
measurement["ProbabilitiesList"]
Out[21]=

Return the measurement outcomes and their probabilities in a Dataset:

In[22]:=
measurement["ProbabilityTable"]
Out[22]=

Return the measurement probabilities in a SparseArray:

In[23]:=
measurement["ProbabilityArray"]
Out[23]=

Visualize the measurement probability function:

In[24]:=
measurement["ProbabilityPlot"]
Out[24]=

Return the list of measurement outcomes with the highest probabilities:

In[25]:=
measurement["TopProbabilities"]
Out[25]=

Return the list of 1 top measurement outcomes with the highest probabilities:

In[26]:=
measurement["TopProbabilities" -> 1]
Out[26]=

Return the exact entropy of the measurement distribution:

In[27]:=
measurement["Entropy"]
Out[27]=

Return the approximate (numerical) entropy of the measurement distribution:

In[28]:=
measurement["NEntropy"]
Out[28]=

Return the outcome of one simulated measurement:

In[29]:=
measurement["SimulatedMeasurement"]
Out[29]=

Return the list of outcomes from 100 simulated measurements:

In[30]:=
measurement[{"SimulatedMeasurement", 100}]
Out[30]=

Return the symbolic mean of all measurement outcomes:

In[31]:=
measurement["Mean"]
Out[31]=

Return the list of possible QuantumDiscreteState objects following measurement:

In[32]:=
measurement["States"]
Out[32]=

Return the association of measurement outcomes and their respective QuantumDiscreteState objects:

In[33]:=
measurement["StateAssociation"]
Out[33]=

Return the association of QuantumDiscreteState objects and their respective probabilities:

In[34]:=
measurement["StateProbabilities"]
Out[34]=

Return the QuantumDiscreteState objects and their probabilities in a Dataset:

In[35]:=
measurement["StateProbabilityTable"]
Out[35]=

Return the list of QuantumDiscreteState objects with the highest probabilities:

In[36]:=
measurement["TopStateProbabilities"]
Out[36]=

Return the list of 1 top QuantumDiscreteState objects with the highest probabilities:

In[37]:=
measurement["TopStateProbabilities" -> 1]
Out[37]=

Return the QuantumDiscreteState object yielded by one simulated measurement:

In[38]:=
measurement["SimulatedStateMeasurement"]
Out[38]=

Return the list of QuantumDiscreteState objects yielded by 10 simulated measurements:

In[39]:=
measurement[{"SimulatedStateMeasurement", 10}]
Out[39]=

Return the symbolic mean of all QuantumDiscreteState objects:

In[40]:=
measurement["MeanState"]
Out[40]=

Publisher

Jonathan Gorard

Version History

  • 1.0.0 – 12 April 2021

Related Resources

License Information