Skip to content

Commit

Permalink
Restructure notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
shinaoka committed Sep 22, 2024
1 parent 91c83f5 commit ea0b2fc
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 102 deletions.
112 changes: 13 additions & 99 deletions pluto_notebooks/welcome.jl → pluto_notebooks/pluto.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,103 +28,14 @@ To run this notebook `welcome.jl` locally, copy and paste the following into you
```julia
using Pkg; Pkg.activate(temp=true); Pkg.add("Pluto")
BASE_URL = "https://raw.githubusercontent.com/tensor4all/T4APlutoExamples/refs/heads/main/pluto_notebooks/"
notebook = "welcome.jl"
notebook = "pluto.jl"
url = joinpath(BASE_URL, notebook)
using Pluto; Pluto.run(notebook=download(url))
```
"""

# ╔═╡ 5cf76073-4a83-4d0d-aac0-843dbbafc027
md"""
# T4A Julia Tutorials
This documentation provides a comprehensive tutorials/examples
on quantics and tensor cross interpolation (TCI) and their combinations (QTCI).
These technologies allow us to reveal low-rank tensor network representation (TNR) hidden in data or a function,
and perform computation such as Fourier transform and convolution.
Please refer [xfacpaper](https://arxiv.org/abs/2407.02454) for a more detailed introduction of these concepts.
The T4A group hosts various Julia libraries for performing such operations.
The folowing list is given in the order of low-level to high-level libraries:
- [TensorCrossInterpolation.jl](https://github.com/tensor4all/TensorCrossInterpolation.jl/) provides implementations of TCI.
- [QuanticsGrids.jl](https://github.com/tensor4all/QuanticsGrids.jl/) provides utilities for handling quantics representations, e.g., creating a quantics grid and transformation between the original coordinate system and the quantics representation.
- [QuanticsTCI.jl](https://github.com/tensor4all/QuanticsTCI.jl/) is a thin wrapper around `TensorCrossInterpolation.jl` and `QuanticsGrids.jl`, providing valuable functionalities for non-expert users' performing quantics TCI (QTCI).
- [TCIITensorConversion.jl](https://github.com/tensor4all/TCIITensorConversion.jl/) provides conversions of tensor trains between `TensorCrossInterpolation.jl` and `ITensors.jl`.
- [Quantics.jl](https://github.com/tensor4all/Quantics.jl/) is an experimental library providing a high-level API for performing operations in QTT. This library is under development and its API may be subject to change. The library is not yet registered in the Julia package registry.
Additionally, we provide some topics on Julia packages such as:
- [Plots.jl](plots.ipynb). Basic tutorial for plotting using Plots.jl.
This documentation provides examples of using these libraries to perform QTCI and other operations.
## Preparation - Installing Julia
Install `julia` command using [juliaup](https://github.com/JuliaLang/juliaup).
On Windows Julia and Juliaup can be installed directly from the Windows store. One can also install exactly the same version by executing
"""

# ╔═╡ 3f5633ea-85cd-48dd-a533-9d2d57d54bc2
md"""
```powershell
PS> winget install julia -s msstore
```
"""

# ╔═╡ f6c6d410-bc9a-427e-9085-c966acd1509c
md"""
on a command line.
Juliaup can be installed on Linux or Mac by executing
"""

# ╔═╡ 8972eee5-606d-4d7d-bb41-5f6c768a0fe4
md"""
```sh
$ curl -fsSL https://install.julialang.org | sh -s -- --yes
```
"""
# ╔═╡ c453cd50-2e2d-4402-a017-37a32540dcb2

# ╔═╡ 96a60509-1189-4925-a1d1-69e7a30f6b52
md"""
in a shell.
You can check that `julia` is installed correctly by simply running `julia` in your terminal:
```julia-repl
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.10.5 (2024-08-27)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia>
```
The REPL greets you with a banner and a `julia>` prompt. Let's display \"Hello World\":
```julia-repl
julia> println(\"Hello World\")
```
To see the environment in which Julia is running, you can use `versioninfo()`.
```julia-repl
julia> versioninfo()
```
To exit the interactive session, type `exit()` followed by the return or enter key:
```julia-repl
julia> exit()
```
See the official documentation at [The Julia REPL](https://docs.julialang.org/en/v1/stdlib/REPL/) to learn more."""

# ╔═╡ 19b7809c-5a93-4963-b46a-360a332c476d
begin
Expand All @@ -134,9 +45,12 @@ end

# ╔═╡ 7b83cb86-f08a-41b0-b506-6cbe5393d3a3
md"""
## How to open Pluto notebooks locally
## How to open ALL Pluto notebooks locally
Our tutorials are written in [Pluto.jl](https://plutojl.org/) notebook. To open Pluto notebooks locally, clone our [tutorial repository T4APlutoExamples](https://github.com/tensor4all/T4APlutoExamples) and navigate to directory `T4APlutoExamples`:
The following instructions are for EXPERT users familiar with `Julia` and `git.`
Our tutorials are written in [Pluto.jl](https://plutojl.org/) notebook. To open all the Pluto notebooks locally, clone our [tutorial repository T4APlutoExamples](https://github.com/tensor4all/T4APlutoExamples) and navigate to directory `T4APlutoExamples`:
```sh
$ git clone https://github.com/tensor4all/T4APlutoExamples.git
Expand Down Expand Up @@ -180,6 +94,9 @@ $(img_main_menu)
To open notebooks under `pluto_notebooks` directory, type `pluto_notebooks/welcome.jl` to text area under `Open a notebook` section. Then click `Open` button.
"""

# ╔═╡ 00c93734-a3e0-4c45-a60a-93fafba51dc5


# ╔═╡ ec419a4f-061c-4d67-a1b6-c123eb763132
md"""
## Specifying Pluto notebook URL directly
Expand Down Expand Up @@ -527,14 +444,11 @@ version = "17.4.0+2"

# ╔═╡ Cell order:
# ╟─89ca61fd-6bd0-483f-aad6-e3aa2e35046c
# ╠═c453cd50-2e2d-4402-a017-37a32540dcb2
# ╠═ca3996e3-7a32-41a9-9e3f-f5cb83f3fe5f
# ╟─5cf76073-4a83-4d0d-aac0-843dbbafc027
# ╟─3f5633ea-85cd-48dd-a533-9d2d57d54bc2
# ╟─f6c6d410-bc9a-427e-9085-c966acd1509c
# ╟─8972eee5-606d-4d7d-bb41-5f6c768a0fe4
# ╟─96a60509-1189-4925-a1d1-69e7a30f6b52
# ╟─19b7809c-5a93-4963-b46a-360a332c476d
# ╟─7b83cb86-f08a-41b0-b506-6cbe5393d3a3
# ╠═7b83cb86-f08a-41b0-b506-6cbe5393d3a3
# ╠═00c93734-a3e0-4c45-a60a-93fafba51dc5
# ╟─ec419a4f-061c-4d67-a1b6-c123eb763132
# ╟─07854cf9-da58-4c02-a54f-31a24d1f32b3
# ╟─cf22b220-b5d6-483f-a137-ff56d0216158
Expand Down
4 changes: 2 additions & 2 deletions scripts/common.jl
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
const PLUTO_NOTEBOOKS_DIR = joinpath(dirname(@__DIR__), "pluto_notebooks")

const PLUTO_FILE_NAMES = [
"welcome.jl",
"quantics1d.jl",
"quantics1d_advanced.jl",
"compress.jl",
"interfacingwithitensors.jl",
"quantics2d.jl",
"plots.jl",
"qft.jl",
"pluto.jl",
"plots.jl",
]
3 changes: 2 additions & 1 deletion scripts/generate_index.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ function extract_title(filepath::AbstractString)
end

open(joinpath(PLUTO_NOTEBOOKS_DIR, "index.md"), "w") do io
write(io, "# Notebooks\n")
#write(io, "# Notebooks\n")
write(io, "Please follow the instruction in the top cell of each notebook to run it locally.\n")

for f in PLUTO_FILE_NAMES
title = extract_title(joinpath(PLUTO_NOTEBOOKS_DIR, f))
Expand Down

0 comments on commit ea0b2fc

Please sign in to comment.