scine_autocas.plots.entanglement_plot¶
The entanglement plot class.
This module implements a class to conveniently plot an entanglement diagram.
Classes
A class to plot the entanglement diagram from s1 entropies and mutual information. |
- class scine_autocas.plots.entanglement_plot.EntanglementPlot[source]¶
A class to plot the entanglement diagram from s1 entropies and mutual information.
The size of the dots is scaled by the corresponding s1 value and the thickness of the lines by the corresponding mututal information.
Attributes
s1_color
(str) color of the s1 circles
mutual_information_color1
(str) color for large mututal information
mutual_information_color2
(str) color for medium mututal information
mutual_information_color3
(str) color for small mututal information
background_color
(str) color of the background
s1_scaled
(bool) flage to enable scaling of the s1 entropies with respect to the maxium s1 values
alpha_s1
(float) opacity of the s1 circles, used if 2 diagrams are plotted
alpha_mut_inf
(float) opacity of the mutual information, used if 2 diagrams are plotted
s1_position
(float) position of the second cirlce of s1 blobds, used if 2 diagrams are plotted
label_offset
(float) ofset for labels in entanglement plot
- __slots__ = ('s1_color', 'mutual_information_color1', 'mutual_information_color2', 'mutual_information_color3', 'background_color', 's1_scaled', 'alpha_s1', 'alpha_mut_inf', 's1_position', 'label_offset')¶
- s1_scaled: bool¶
flag to enable scaling of s1 with respect to max(s1), to get circles with relative size
- __doc__ = 'A class to plot the entanglement diagram from s1 entropies and mutual information.\n\n The size of the dots is scaled by the corresponding s1 value and the thickness of the lines\n by the corresponding mututal information.\n\n Attributes\n ----------\n s1_color : str\n color of the s1 circles\n mutual_information_color1 : str\n color for large mututal information\n mutual_information_color2 : str\n color for medium mututal information\n mutual_information_color3 : str\n color for small mututal information\n background_color : str\n color of the background\n s1_scaled : bool\n flage to enable scaling of the s1 entropies with respect to the maxium s1 values\n alpha_s1 : float\n opacity of the s1 circles, used if 2 diagrams are plotted\n alpha_mut_inf : float\n opacity of the mutual information, used if 2 diagrams are plotted\n s1_position : float\n position of the second cirlce of s1 blobds, used if 2 diagrams are plotted\n label_offset : float\n ofset for labels in entanglement plot\n '¶
- __module__ = 'scine_autocas.plots.entanglement_plot'¶
- _plot_s1_circles(axes, theta, radii, labels, area, alpha, number_of_orbitals)[source]¶
Help function to plot circles with labels.
- Parameters
- axesmatplotlib.axes._axes.Axes
The matplotlib axes
- thetanp.ndarray
Position of s1 circles
- radiinp.ndarray
Distance form the center for s1 circles
- labelsList[str]
Orbital labels
- areanp.ndarray
Size of each circle
- alphafloat
opacity of the circles and labels
- number_of_orbitalsint
number of oritals
- _plot_s1(axes, s1_entropy, orbitals_index)[source]¶
Help function to plot the s1 circles.
- Parameters
- axesmatplotlib.axes._axes.Axes
The diagram axes
- s1_entropynp.ndarray
Single orbital entropies
- orbitals_indexList[int]
Orbital labels for outer diagram
- Returns
- thetanp.ndarray
Position of S1 circles
- rtype
ndarray
..
- _plot_mutual_information(axes, mut_inf, theta)[source]¶
Help function to plot the mutual information lines.
- Parameters
- axesmatplotlib.axes._axes.Axes
The diagram axes
- mut_infnp.ndarray
mutual information for the outer diagram
- thetanp.ndarray
the position of the s1 circle
- _entanglement_plot(axes, s1_entropy, mut_inf, order1=None)[source]¶
Help function for the entanglement diagram within an entanglement diagram.
- Parameters
- axesmatplotlib.axes._axes.Axes
The diagram axes
- s1_entropynp.ndarray
single orbital entropy for the outer diagram
- mut_infnp.ndarray
mutual information for the outer diagram
- order1List[Union[int, str, float]]
orbital labels for the outer diagram
- plot(s1_entropy, mut_inf_1, order_1=None)[source]¶
Generate entanglement diagram, within an entanglement diagram.
S1 entropies with a label appearing in both diagrams are highlighted in the outer one.
- Parameters
- s1_entropynp.ndarray
single orbital entropy for the outer diagram
- mut_inf_1np.ndarray
mutual information for the outer diagram
- order_1Optional[List[int]]
orbital labels for the outer diagram
- Returns
- pltmatplotlib.pyplot
the plot object
- rtype
<module ‘matplotlib.pyplot’ from ‘/fast_scratch/tweymuth/cache/scine/autoCAS/venv/lib/python3.6/site-packages/matplotlib/pyplot.py’> ..
- plot_in_plot(s1_entropy_1, mut_inf_1, s1_entropy_2, mut_inf_2, order_1=None, order_2=None)[source]¶
Generate entanglement diagram, within an entanglement diagram.
S1 entropies with a label appearing in both diagrams are highlighted in the outer one.
- Parameters
- s1_entropy_1np.ndarray
single orbital entropy for the outer diagram
- mut_inf_1np.ndarray
mutual information for the outer diagram
- s1_entropy_2np.ndarray
single orbital entropy for the inner diagram
- mut_inf_2np.ndarray
mutual information for the inner diagram
- order_1Optional[List[int]]
orbital labels for the outer diagram
- order_2Optional[List[int]]
orbital labels for the inner diagram
- Returns
- pltmatplotlib.pyplot
the plot object
- rtype
<module ‘matplotlib.pyplot’ from ‘/fast_scratch/tweymuth/cache/scine/autoCAS/venv/lib/python3.6/site-packages/matplotlib/pyplot.py’> ..