diff --git a/README.md b/README.md index 37b255e..eff3e52 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ We provide [tutorials](https://jmoo2880.github.io/MPSTime.jl/dev/tutorial/) and - [LATEST DOCS](https://jmoo2880.github.io/MPSTime.jl/) -- the latest documentation. ## Citation -If you use this software in your work, please read and cite the ([arXiv preprint](https://arxiv.org/abs/2412.15826)): +If you use this software in your work, please read and cite the [arXiv preprint](https://arxiv.org/abs/2412.15826): ``` @misc{MPSTime2024, title={Using matrix-product states for time-series machine learning}, diff --git a/docs/make.jl b/docs/make.jl index 54ef8d2..353e568 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -18,6 +18,7 @@ makedocs( "Imputation" => "imputation.md", "Synthetic Data Generation" => "synthdatagen.md", "Encodings" => "encodings.md", + "Tools" => "Tools.md", "Docstrings" => "docstrings.md", "References" => "references.md", ] diff --git a/docs/src/docstrings.md b/docs/src/docstrings.md index a99fa57..087991c 100644 --- a/docs/src/docstrings.md +++ b/docs/src/docstrings.md @@ -25,11 +25,3 @@ MPSTime.symbolic_encoding MPSTime.model_loss_func MPSTime.model_bbopt ``` - -## Analysis -```@docs -MPSTime.von_neumann_entropy -MPSTime.rho_correct -MPSTime.bipartite_spectrum -MPSTime.single_site_spectrum -``` diff --git a/docs/src/imputation.md b/docs/src/imputation.md index e8dda51..15a9aec 100644 --- a/docs/src/imputation.md +++ b/docs/src/imputation.md @@ -11,15 +11,6 @@ MPSTime supports univariate time-series imputation with three key patterns of mi MPSTime can also handle any combination of these patterns. For instance, you might need to impute a single contiguous block from $t = 10-30$, plus individual missing points at $t = 50$ and $t=80$. -#### Imputation Methods -We offer several options for imputing missing data points, based on how we estimate their values from the conditional probability distribution: -| __Method__ | Description | Type| -| ----------- | ----------- | ----------- | -| Mean | `:mean` |Deterministic | -| Median | `:median` |Deterministic| -| Mode | `:mode` |Deterministic| -| Inverse Transform Sampling | `:ITS` |Stochastic| - ## Setup The first step is to train an MPS (see [Tutorial](@ref)). diff --git a/docs/src/tools.md b/docs/src/tools.md new file mode 100644 index 0000000..6657ae2 --- /dev/null +++ b/docs/src/tools.md @@ -0,0 +1,15 @@ +# Tools + + +## Entanglement Entropy +What it is? What it tells us... +### Bipartite Entanglement Entropy (BEE) + + +### Single-Site Entanglement Entropy (SEE) + +```@docs +MPSTime.von_neumann_entropy +MPSTime.bipartite_spectrum +MPSTime.single_site_spectrum +``` diff --git a/src/Analysis/analyse.jl b/src/Analysis/analyse.jl index a4d4e47..869c24c 100644 --- a/src/Analysis/analyse.jl +++ b/src/Analysis/analyse.jl @@ -46,13 +46,14 @@ end """ ```Julia +bipartite_spectrum(mps::TrainedMPS; logfn::Function=log) -> Vector{Vector{Float64}} +``` Compute the bipartite entanglement entropy (BEE) of a trained MPS across each bond. Given a single unlabeled MPS the BEE is defined as: ∑ α^2 log(α^2) where α are the eigenvalues obtained from the shmidt decomposition. -``` Compute the bipartite entanglement entropy (BEE) of a trained MPS. """ function bipartite_spectrum(mps::TrainedMPS; logfn::Function=log) @@ -67,12 +68,6 @@ function bipartite_spectrum(mps::TrainedMPS; logfn::Function=log) return bees end -""" -Check whether the reduced density matrix (rho) is positive semidefinite by -eigendecomposition. -\nIf the eigenvalue decomp of ρ yields negative but small (< tol) eigenvalues, -clamp to them to range [threshold, ∞] and reconstruct ρ. -""" function rho_correct(rho::Matrix, eigentol::Float64=sqrt(eps())) eigvals, eigvecs = eigen(rho) # do an eigendecomp on the rdm @@ -118,8 +113,9 @@ function single_site_entropy(mps::MPS) end """ - single_site_spectrum(mps::TrainedMPS) -> Vector{Vector{Float64}} - +```Julia +single_site_spectrum(mps::TrainedMPS) -> Vector{Vector{Float64}} +``` Compute the single-site entanglement entropy (SEE) spectrum of a trained MPS. The single-site entanglement entropy (SEE) quantifies the entanglement at each site of the MPS. It is computed as: