Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
forum:data:2024:definition_of_density_matrix [2024/08/06 03:21] – Created from the form at forum:start David Tam | forum:data:2024:definition_of_density_matrix [2024/08/07 07:41] (current) – Maurits W. Haverkort | ||
---|---|---|---|
Line 7: | Line 7: | ||
The Mathematica documentation states that the density matrix is constructed from | The Mathematica documentation states that the density matrix is constructed from | ||
+ | < | ||
Subscript[B, | Subscript[B, | ||
+ | |||
r[\[Theta], | r[\[Theta], | ||
+ | </ | ||
+ | |||
+ | I tried to define this basis using: | ||
+ | |||
+ | < | ||
+ | basis3 =With[{l = 3}, Flatten[Table[{SphericalHarmonicY[l, | ||
+ | < | ||
- | I defined this basis using: | ||
- | basis3 = | ||
- | | ||
- | Flatten[Table[{SphericalHarmonicY[l, | ||
- | | ||
which is exactly as written on the help page for Hydrogen wavefunctions, | which is exactly as written on the help page for Hydrogen wavefunctions, | ||
- | basis3conj = | + | |
- | Simplify[ | + | < |
- | | + | basis3conj = Simplify[Conjugate[# |
- | | + | </ |
I then looked at the real part of the density matrix given for CeRu2Al10 in the help files, using at the real and imaginary parts of the charge density (with some tricks to simplify the expressions): | I then looked at the real part of the density matrix given for CeRu2Al10 in the help files, using at the real and imaginary parts of the charge density (with some tricks to simplify the expressions): | ||
+ | |||
+ | < | ||
Chop@Simplify@Chop@ComplexExpand@Re[basis3conj . dm1 . basis3] | Chop@Simplify@Chop@ComplexExpand@Re[basis3conj . dm1 . basis3] | ||
+ | |||
Chop@Simplify@Chop@ComplexExpand@Im[basis3conj . dm1 . basis3] | Chop@Simplify@Chop@ComplexExpand@Im[basis3conj . dm1 . basis3] | ||
- | which gives 0 for the imaginary part as I expected. | + | </ |
+ | |||
+ | |||
+ | which gives 0 for the imaginary part as I expected. | ||
+ | |||
+ | < | ||
+ | SphericalPlot3D[Chop@Simplify@Chop@ComplexExpand@Re[basis3conj . dm1 . basis3], {\[Theta], 0, \[Pi]}, {\[Phi], 0, 2 \[Pi]}, PlotRange -> All, Axes -> False, Boxed -> False, PlotStyle -> Lighter@Gray] | ||
+ | </ | ||
- | I then tried to plot the real part of the charge density using | ||
- | SphericalPlot3D[ | ||
- | | ||
- | | ||
- | 0, \[Pi]}, {\[Phi], 0, 2 \[Pi]}, PlotRange -> All, Axes -> False, | ||
- | Boxed -> False, PlotStyle -> Lighter@Gray] | ||
The result looks similar to the shape given in the help, but not exactly. Moreover, repeating the exercise for the simple p-shell wavefunction in the " | The result looks similar to the shape given in the help, but not exactly. Moreover, repeating the exercise for the simple p-shell wavefunction in the " |