Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Represent the outcomes of a quantum measurement
ResourceFunction["QuantumMeasurement"][<|o1→p1,o2→p2,…|>,{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. |
| "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"→n | list 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"→n | list 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 |
Define a QuantumMeasurement object for a two-level quantum system with two possible measurement outcomes:
| In[1]:= | ![]() |
| Out[1]= |
Return the associated CategoricalDistribution object:
| In[2]:= |
| Out[2]= | ![]() |
Return the list possible QuantumDiscreteState objects following measurement:
| In[3]:= |
| Out[3]= | ![]() |
Conduct a simulated measurement:
| In[4]:= |
| Out[4]= |
Conduct 100 simulated measurements:
| In[5]:= |
| Out[5]= | ![]() |
QuantumMeasurement automatically normalizes the input probabilities:
| In[6]:= | ![]() |
| Out[6]= |
Return the association of measurement outcomes and their respective probabilities:
| In[7]:= |
| Out[7]= |
Return the association of measurement outcomes and their respective QuantumDiscreteState objects:
| In[8]:= |
| Out[8]= | ![]() |
Compute the QuantumDiscreteState object yielded by a simulated measurement:
| In[9]:= |
| Out[9]= |
Compute the list of QuantumDiscreteState objects yielded by 10 simulated measurements:
| In[10]:= |
| Out[10]= | ![]() |
Compute the exact entropy of the measurement distribution:
| In[11]:= |
| Out[11]= |
Compute the approximate (numerical) entropy of the measurement distribution:
| In[12]:= |
| Out[12]= |
Define a QuantumMeasurement object for a three-level quantum system with four possible measurement outcomes:
| In[13]:= | ![]() |
| Out[13]= |
Return the association of measurement outcomes and their respective probabilities:
| In[14]:= |
| Out[14]= |
Return the association of QuantumDiscreteState objects and their respective probabilities:
| In[15]:= |
| Out[15]= | ![]() |
View a list of properties that can be extracted from a QuantumMeasurement object:
| In[16]:= | ![]() |
| Out[16]= |
| In[17]:= |
| Out[17]= | ![]() |
Return the CategoricalDistribution object representing the measurement outcomes:
| In[18]:= |
| Out[18]= | ![]() |
Return the list of possible measurement outcomes:
| In[19]:= |
| Out[19]= |
Return the association of measurement outcomes and their respective probabilities:
| In[20]:= |
| Out[20]= |
Return the list of measurement probabilities:
| In[21]:= |
| Out[21]= |
Return the measurement outcomes and their probabilities in a Dataset:
| In[22]:= |
| Out[22]= | ![]() |
Return the measurement probabilities in a SparseArray:
| In[23]:= |
| Out[23]= |
Visualize the measurement probability function:
| In[24]:= |
| Out[24]= | ![]() |
Return the list of measurement outcomes with the highest probabilities:
| In[25]:= |
| Out[25]= |
Return the list of 1 top measurement outcomes with the highest probabilities:
| In[26]:= |
| Out[26]= |
Return the exact entropy of the measurement distribution:
| In[27]:= |
| Out[27]= |
Return the approximate (numerical) entropy of the measurement distribution:
| In[28]:= |
| Out[28]= |
Return the outcome of one simulated measurement:
| In[29]:= |
| Out[29]= |
Return the list of outcomes from 100 simulated measurements:
| In[30]:= |
| Out[30]= | ![]() |
Return the symbolic mean of all measurement outcomes:
| In[31]:= |
| Out[31]= |
Return the list of possible QuantumDiscreteState objects following measurement:
| In[32]:= |
| Out[32]= | ![]() |
Return the association of measurement outcomes and their respective QuantumDiscreteState objects:
| In[33]:= |
| Out[33]= | ![]() |
Return the association of QuantumDiscreteState objects and their respective probabilities:
| In[34]:= |
| Out[34]= | ![]() |
Return the QuantumDiscreteState objects and their probabilities in a Dataset:
| In[35]:= |
| Out[35]= | ![]() |
Return the list of QuantumDiscreteState objects with the highest probabilities:
| In[36]:= |
| Out[36]= | ![]() |
Return the list of 1 top QuantumDiscreteState objects with the highest probabilities:
| In[37]:= |
| Out[37]= |
Return the QuantumDiscreteState object yielded by one simulated measurement:
| In[38]:= |
| Out[38]= |
Return the list of QuantumDiscreteState objects yielded by 10 simulated measurements:
| In[39]:= |
| Out[39]= | ![]() |
Return the symbolic mean of all QuantumDiscreteState objects:
| In[40]:= |
| Out[40]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License