From d65a6d56cb3f8845006610543775a2ff954fc98d Mon Sep 17 00:00:00 2001 From: jmoo2880 Date: Thu, 26 Dec 2024 17:55:41 +1100 Subject: [PATCH] add more info to SEE/BEE docs --- docs/src/figures/tools/bee.svg | 650 ++++++++++++++++++++++++ docs/src/figures/tools/entanglement.svg | 444 ++++++++++------ docs/src/figures/tools/see.svg | 621 ++++++++++++++++++++++ docs/src/refs.bib | 22 + docs/src/tools.md | 34 +- 5 files changed, 1602 insertions(+), 169 deletions(-) create mode 100644 docs/src/figures/tools/bee.svg create mode 100644 docs/src/figures/tools/see.svg diff --git a/docs/src/figures/tools/bee.svg b/docs/src/figures/tools/bee.svg new file mode 100644 index 0000000..6dd7bd6 --- /dev/null +++ b/docs/src/figures/tools/bee.svg @@ -0,0 +1,650 @@ + + + + diff --git a/docs/src/figures/tools/entanglement.svg b/docs/src/figures/tools/entanglement.svg index 1ec586d..d76444a 100644 --- a/docs/src/figures/tools/entanglement.svg +++ b/docs/src/figures/tools/entanglement.svg @@ -7,7 +7,7 @@ viewBox="0 0 126.89835 57.754335" version="1.1" id="svg5" - sodipodi:docname="joint_distribution_analogy.svg" + sodipodi:docname="entanglement.svg" inkscape:version="1.2.1 (9c6d41e, 2022-07-14)" xml:space="preserve" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" @@ -24,16 +24,32 @@ inkscape:deskcolor="#d1d1d1" inkscape:document-units="mm" showgrid="false" - inkscape:zoom="1.6701826" - inkscape:cx="-1235.4937" - inkscape:cy="936.12519" + inkscape:zoom="2.3619949" + inkscape:cx="220.36458" + inkscape:cy="156.01219" inkscape:window-width="1920" inkscape:window-height="1027" - inkscape:window-x="21" + inkscape:window-x="0" inkscape:window-y="25" - inkscape:window-maximized="0" + inkscape:window-maximized="1" inkscape:current-layer="layer1" - showguides="false" />(i) BEE(ii) SEE + style="fill:#3400c3;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:1.19942;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1.19942, 4.79769;stroke-dashoffset:0;stroke-opacity:1" + d="m -212.88666,214.4679 v 35.58958" + id="path537228-2-8" /> diff --git a/docs/src/figures/tools/see.svg b/docs/src/figures/tools/see.svg new file mode 100644 index 0000000..f0fc3a2 --- /dev/null +++ b/docs/src/figures/tools/see.svg @@ -0,0 +1,621 @@ + + + + diff --git a/docs/src/refs.bib b/docs/src/refs.bib index 36386bf..5454405 100644 --- a/docs/src/refs.bib +++ b/docs/src/refs.bib @@ -182,3 +182,25 @@ @article{FULCHER2017527 url = {https://www.sciencedirect.com/science/article/pii/S2405471217304386}, author = {Ben D. Fulcher and Nick S. Jones}, } + +@article{RanCompressedSensing2020, +author = {Ran, Shi-Ju and Sun, Zheng-Zhi and Fei, Shao-Ming and Su, Gang and Lewenstein, Maciej}, +year = {2020}, +month = {08}, +pages = {}, +title = {Tensor network compressed sensing with unsupervised machine learning}, +volume = {2}, +journal = {Physical Review Research}, +doi = {10.1103/PhysRevResearch.2.033293} +} + +@article{LiuEntanglementFeatureExtract2021, +author = {Liu, Yuhan and Li, Wen-Jun and Zhang, Xiao and Lewenstein, Maciej and Su, Gang and Ran, Shi-Ju}, +year = {2021}, +month = {08}, +pages = {}, +title = {Entanglement-Based Feature Extraction by Tensor Network Machine Learning}, +volume = {7}, +journal = {Frontiers in Applied Mathematics and Statistics}, +doi = {10.3389/fams.2021.716044} +} diff --git a/docs/src/tools.md b/docs/src/tools.md index 78d75c9..36c78d4 100644 --- a/docs/src/tools.md +++ b/docs/src/tools.md @@ -7,10 +7,37 @@ More simply, the EE can be thought of as quantifying the information shared betw In practice, the EE is computed as the [von Neumman entropy](https://en.wikipedia.org/wiki/Von_Neumann_entropy) of the reduced density matrix for any of the two subsystems ($A$ or $B$). An EE of zero implies that there is no entanglement between the subsystems. -We provide functions for two types of EE: (i) Single-site entanglement entropy (SEE) and (ii) Bipartite entanglement entropy (BEE): +We provide functions for two types of EE: (i) single-site entanglement entropy (SEE), and (ii) bipartite entanglement entropy (BEE): #### (1) Single-site entanglement entropy (SEE) -#### (2) Bipartite entanglement entropy (SEE) -![](./figures/tools/entanglement.svg) +The single-site entanglement entropy (SEE) quantifies the degree of entanglement between a single site (time-point) in the MPS and all other sites (time points). +Given a particular site in the MPS, $i$, the SEE is then specified by the von Neumann entropy of the reduced density matrix [RanCompressedSensing2020, LiuEntanglementFeatureExtract2021,](@cite): +$$ +S_\textrm{SEE} = -\mathrm{tr}\ \rho_i \log \rho_i\,, +$$ +where $\rho_i$ is the reduced density matrix (rdm) at site $i$, obtained by tracing over all sites except for the $i$-th site: +$$ +\rho_i = Tr_{/i} \ket{\psi}\bra{\psi}\,, +$$ +and $\ket{\psi}$ is the MPS. +Using the 1D spin-chain as an illustrative example, the SEE between a single site (dark blue) and the rest of the system (light blue) can be depicted as: + +![](./figures/tools/see.svg) +#### (2) Bipartite entanglement entropy (BEE) +The bipartite entanglement entropy (BEE) quantifies the quantum entanglement between two complementary subsystems of a matrix product state (MPS). +For an MPS with $N$ sites, we can create a bipartition by splitting the system at any bond $l$, resulting in region $A$ (sites $1$ to $l$) and region $B$ (sites $l+1$ to $N$). +The BEE can be expressed using the singular values of the [Shmidt decomposition](https://en.wikipedia.org/wiki/Schmidt_decomposition) of either of the two subsystems: +$$ +\ket{\psi} = \sum_i \alpha_i \ket{u_i}_A +\otimes \ket{v_i}_B\,, +$$ +where $\alpha_i$ are the Schmidt coefficients (singular values) satisfying $\sum_i \alpha_i^2 = 1$, $\ket{u_i}_A$ and $\ket{v_i}_B$ are orthonormal states in subsystem $A$ and $B$, respectively. +The BEE is then given by the von Neumann entropy: +$$ +S_\textrm{BEE} = -\sum_i \alpha_i^2 \log \alpha_i^2\,. +$$ +The BEE can be represented schematically using the 1D spin chain analogy where the red dotted line denotes the bipartition, the light blue particles represent subsystem $A$ and the dark blue represent subsystem $B$: + +![](./figures/tools/bee.svg) ### Bipartite Entanglement Entropy (BEE) @@ -41,6 +68,7 @@ opts = MPSOptions(d=10, chi_max=40, nsweeps=10; init_rng=4567) mps, _, _ = fitMPS(X_train, y_train, X_test, y_test, opts) ``` Let's take a look at the training dataset for this problem: + ![](./figures/tools/ipd_dataset.svg) Using the trained MPS, we can then inspect the BEE for the class 0 (winter) and class 1 (summer) MPS individually: ```Julia