You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To use the Wigner distribution, simply use the `WignerDistribution` class and pass a quantum state to the constructor. Optionally, define a range of values for each coordinate with the parameter called `extent`. Also, define a number of data points inside the given range with the optional parameter called `steps`. From this information, the distribution is generated and can be visualized with the `visualize` method.
It is also possible to calculate the marginal and projection distribution along a given dimension. These methods are available for the other distributions below as well.
To use the Husimi-Q distribution, simply use the `QDistribution` class and pass it a quantum state. Again, `extent` and `steps` are optional parameters for this distribution.
In this case, we use the `TwoModeQuadratureCorrelation` class.
29
+
### Harmonic Oscillator Wave Function
90
30
91
-
```python
92
-
two_mode_psi = TwoModeQuadratureCorrelation(psi)
93
-
two_mode_psi.visualize()
31
+
Here, we display the spatial distribution of the wave function for the harmonic oscillator (n=0 to n=7) with the `HarmonicOscillatorWaveFunction()` class.
94
32
95
-
two_mode_rho = TwoModeQuadratureCorrelation(rho)
96
-
two_mode_rho.visualize()
97
-
```
33
+
Optionally, define a range of values for each coordinate with the parameter called `extent`. Also, define a number of data points inside the given range with the optional parameter called `steps`. From this information, the distribution is generated and can be visualized with the `.visualize()` method.
98
34
99
-
### Harmonic Oscillator Wave Function
100
-
Here, we display the spatial distribution of the wave function for the harmonic oscillator (n=0 to n=7) with the `HarmonicOscillatorWaveFunction` class.
35
+
It is also possible to calculate, along a given axis, the marginal distribution with `.marginal()` or the projection distribution with `.project()`.
The class `HarmonicOscillatorProbabilityFunction` is the squared magnitude of the data that would normally be in `HarmonicOscillatorWaveFunction`. We use the same example as before.
51
+
The class `HarmonicOscillatorProbabilityFunction()` is the squared magnitude of the data that would normally be in `HarmonicOscillatorWaveFunction()`. We use the same example as before.
0 commit comments