Skip to content

Commit

Permalink
update notebooks guide
Browse files Browse the repository at this point in the history
  • Loading branch information
GiggleLiu committed Nov 16, 2023
1 parent 6a0152b commit 740955d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
18 changes: 8 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,17 @@ Please check the following notebooks:

![](https://user-images.githubusercontent.com/6257240/198861111-4499c17d-9938-406b-8253-943b01f4633c.png)

To run the notebook locally, you will need the [Pluto](https://github.com/fonsp/Pluto.jl) and [GenericTensorNetworks](https://github.com/QuEraComputing/GenericTensorNetworks.jl) Julia packages installed. You can run the following after entering the Package mode:

```
pkg> add Pluto
pkg> add GenericTensorNetworks
To run the notebook locally, you will need to activate and instantiate the local environment that specified in the [`notebooks`](notebooks) directory:
```bash
$ cd notebooks
$ julia --project -e 'using Pkg; Pkg.instantiate()'
```

and returning to the Julia REPL (you can do this by hitting Backspace in the Package mode) to run:

```
julia> import Pluto; Pluto.run()
To run the notebook, just type in the same terminal:
```bash
julia --project -e "import Pluto; Pluto.run()"
```
in the `notebooks` directory of this project. At this point, your browser should automatically launch and display a list of available notebooks you can run. You should just see `tutorial.jl` listed.
At this point, your browser should automatically launch and display a list of available notebooks you can run. You should just see the notebooks listed.


## Supporting and Citing
Expand Down
9 changes: 9 additions & 0 deletions notebooks/unweighted.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ using Markdown
using InteractiveUtils

# ╔═╡ f55dbf80-8425-11ee-2e7d-4d1ad4f693af
# ╠═╡ show_logs = false
begin
using Pkg; Pkg.activate(".")
using Revise
Expand Down Expand Up @@ -75,6 +76,9 @@ end
# ╔═╡ a3a86c62-ee6e-4a3b-99b3-c484de3b5220
g5 = demograph()

# ╔═╡ e6170e72-0804-401e-b9e5-65b8ee7d7edb
show_graph(g5)

# ╔═╡ 625bdcf4-e37e-4bb8-bd1a-907cdcc5fe24
md"""
#### Step 2: Map the source graph to an unweighted King's subgraph (KSG)
Expand Down Expand Up @@ -161,6 +165,9 @@ We just quickly go through a second example, the Petersen graph.
# ╔═╡ ea379863-95dd-46dd-a0a3-0a564904476a
petersen = smallgraph(:petersen)

# ╔═╡ d405e7ec-50e3-446c-8d19-18f1a66c1e3b
show_graph(petersen)

# ╔═╡ 409b03d1-384b-48d3-9010-8079cbf66dbf
md"We first map it to a grid graph (unweighted)."

Expand Down Expand Up @@ -216,6 +223,7 @@ md"The number printed should be consistent with the MIS size of petersen graph."
# ╟─956a5c3a-b8c6-4040-9553-3b4e2337b163
# ╠═d858f57e-1706-4b73-bc23-53f7af073b0c
# ╠═a3a86c62-ee6e-4a3b-99b3-c484de3b5220
# ╠═e6170e72-0804-401e-b9e5-65b8ee7d7edb
# ╟─625bdcf4-e37e-4bb8-bd1a-907cdcc5fe24
# ╠═f9e57a6b-1186-407e-a8b1-cb8f31a17bd2
# ╟─e64e7ca4-b297-4c74-8699-bec4b4fbb843
Expand All @@ -241,6 +249,7 @@ md"The number printed should be consistent with the MIS size of petersen graph."
# ╠═5621bb2a-b1c6-4f0d-921e-980b2ce849d5
# ╟─1fe6c679-2962-4c1b-8b12-4ceb77ed9e0f
# ╠═ea379863-95dd-46dd-a0a3-0a564904476a
# ╠═d405e7ec-50e3-446c-8d19-18f1a66c1e3b
# ╟─409b03d1-384b-48d3-9010-8079cbf66dbf
# ╠═a0e7da6b-3b71-43d4-a1da-f1bd953e4b50
# ╟─4f1f0ca0-dd2a-4768-9b4e-80813c9bb544
Expand Down

0 comments on commit 740955d

Please sign in to comment.