Skip to content

Commit

Permalink
Update examples readmes
Browse files Browse the repository at this point in the history
  • Loading branch information
SamDuffield committed Jul 22, 2024
1 parent ccd6b73 commit cf50147
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
8 changes: 6 additions & 2 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Examples

You will find two Jupyter notebooks in this folder:
You will find three Jupyter notebooks in this folder:

- `associative_scan.ipynb` plots the speedup of the associative scan algorithm implemented in `thermox` using a GPU.
- `diffrax_comparison.ipynb` runs a simple OU process using `thermox` and [`diffrax`](https://github.com/patrick-kidger/diffrax) and compares runtimes (showing a large benefit from using `thermox` for long simulation times)
- `thermodynamic_linear_algebra.ipynb` is a small tutorial on how to use functions from the `thermox.linalg` module.
- `thermodynamic_linear_algebra.ipynb` is a small tutorial on how to use functions from the `thermox.linalg` module.

Additionally the `matrix_exponentials` folder contains code for reproducing the simulations
in the [thermodynamic matrix exponentials paper](https://arxiv.org/abs/2311.12759).
17 changes: 17 additions & 0 deletions examples/matrix_exponentials/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Thermodynamic Matrix Exponentials Simulations

This folder contains code to replicate the convergence time simulations in the
[thermodynamic matrix exponentials paper](https://arxiv.org/abs/2311.12759).

The script `run.py` contains the code to run the simulations and can be executed with
e.g. the following command from the root of the repository:
```bash
PYTHONPATH=. python examples/matrix_exponentials/run.py --n_repeats=10 --matrix_type=orthogonal --alpha=1.1
```
where `--matrix_type` represents a function in `matrix_generation.py`.

The script `plot.py` contains the code to plot the results of the simulations and can be executed with e.g. the following command from the root of the repository:
```bash
PYTHONPATH=. python examples/matrix_exponentials/plot.py --save_dir=examples/matrix_exponentials/results_orthogonal.pkl
```

0 comments on commit cf50147

Please sign in to comment.