Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Convert quantum bases, states or operators in Hilbert space to functions in phase space
ResourceFunction["QuantumWignerTransform"][QuantumBasis[…]] performs a Wigner transform on the specified QuantumBasis, mapping from the Hilbert space picture to the phase space picture. | |
ResourceFunction["QuantumWignerTransform"][QuantumDiscreteState[…]] performs a Wigner transform on the specified QuantumDiscreteState. | |
ResourceFunction["QuantumWignerTransform"][QuantumDiscreteOperator[…]] performs a Wigner transform on the specified QuantumDiscreteOperator. | |
ResourceFunction["QuantumWignerTransform"][QuantumMeasurementOperator[…]] performs a Wigner transform on the specified QuantumMeasurementOperator. | |
ResourceFunction["QuantumWignerTransform"][QuantumHamiltonianOperator[…]] performs a Wigner transform on the specified QuantumHamiltonianOperator. | |
ResourceFunction["QuantumWignerTransform"][QuantumCircuitOperator[…]] performs a Wigner transform on the operator representation of the specified QuantumCircuitOperator. |
Compute the Wigner transform of a single-qubit Pauli-X QuantumBasis object to obtain a single-qubit QuantumBasis object in the phase space picture:
| In[1]:= |
| Out[1]= |
| In[2]:= |
| Out[2]= |
| In[3]:= |
| Out[3]= | ![]() |
Compute the Wigner transform of a two-qubit Pauli-X QuantumBasis object to obtain a two-qubit QuantumBasis object in the phase space picture instead:
| In[4]:= |
| Out[4]= | ![]() |
| In[5]:= |
| Out[5]= |
| In[6]:= |
| Out[6]= |
Compute the Wigner transform of an arity-1 QuantumDiscreteOperator object in the computational basis (default) to obtain a corresponding arity-1 QuantumDiscreteOperator object in the phase space picture:
| In[7]:= | ![]() |
| Out[7]= |
| In[8]:= |
| Out[8]= |
Compute the Wigner transform of an arity-2 QuantumDiscreteOperator object to obtain a corresponding arity-2 QuantumDiscreteOperator object in the phase space picture instead:
| In[9]:= | ![]() |
| Out[9]= | ![]() |
| In[10]:= |
| Out[10]= |
Compute the Wigner transform of an arity-2 projection-valued QuantumMeasurementOperator object in the computational basis (default) to obtain a corresponding arity-2 QuantumMeasurementOperator object in the phase space picture:
| In[11]:= | ![]() |
| Out[11]= | ![]() |
Compute the Wigner transform of an arity-1 QuantumHamiltonianOperator object in the computational basis (default) to obtain an arity-1 QuantumHamiltonianOperator object in the phase space picture:
| In[12]:= | ![]() |
| Out[12]= |
Compute the Wigner transform of an arity-2 QuantumCircuitOperator object in the computational basis (default) to obtain an arity-2 QuantumDiscreteOperator object in the phase space picture:
| In[13]:= | ![]() |
| Out[13]= | ![]() |
| In[14]:= |
| Out[14]= |
Show the operator association of the resulting QuantumDiscreteOperator:
| In[15]:= |
| Out[15]= | ![]() |
Compute the Wigner transform of a single-qubit QuantumDiscreteState object in the computational basis (default) to obtain a single-qudit 4-dimensional QuantumDiscreteState object in the phase space picture:
| In[16]:= |
| Out[16]= |
| In[17]:= |
| Out[17]= | ![]() |
Compute the Wigner transform of higher-dimensional quantum objects:
| In[18]:= | ![]() |
| Out[18]= | ![]() |
| In[19]:= |
| Out[19]= |
Wigner transforms can be computed for quantum objects in arbitrary bases:
| In[20]:= | ![]() |
| Out[20]= |
| In[21]:= |
| Out[21]= |
However, the input object must be in either the "Schrodinger", "Heisenberg" or "Interaction" picture. If the input object is already in the "PhaseSpace" picture, then QuantumWignerTransform will not evaluate:
| In[22]:= |
| Out[22]= |
By default, QuantumWignerTransform performs all computations using exact arithmetic:
| In[23]:= | ![]() |
| Out[23]= |
However, in some cases, performance can be improved by using the option "Exact"→False, in which case QuantumWignerTransform performs all computations using numerical approximations instead:
| In[24]:= | ![]() |
| Out[24]= |
This work is licensed under a Creative Commons Attribution 4.0 International License