Skip to content

Commit 786c0bf

Browse files
added (final) v4 repo docs
- added very cute, very essential emojis to markdown titles - added a tutorial - added a main docs/README.md - added a main tests/README.md - made markdown hyperlinks work on both Github and Doxygen - made markdown files appear as Doxygen pages - made macros appear in Doxygen docs via function/const/typedef spoofing - patched code snippet syntax (from C++ to cpp; doxygen didn't recognise the former) - renamed run.md to launch.md See the commit breakdown in PR #585 The macro spoofing was necessary to workaround the Doxygen limitation described here: https://stackoverflow.com/questions/79548865 Note that hyperlinks to sections within the markdown files (e.g. `[x](file.md#section)`) cannot be handled by Doxygen at all. A user clicking such a hyperlink in the generated html will hit a 404. These little user-traps have been marked with comments in the markdown files. Alas!
1 parent e00cb41 commit 786c0bf

24 files changed

+1737
-598
lines changed

README.md

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<!-- intro -->
4141

4242
> [!NOTE]
43-
> QuEST `v4` has been released which re-designed QuEST from the ground up. Read about the exciting new features [here](/docs/v4.md).
43+
> QuEST `v4` has been released which re-designed QuEST from the ground up. Read about the exciting new features [here](docs/v4.md).
4444
4545
The **Quantum Exact Simulation Toolkit** (QuEST) is a high-performance simulator of quantum statevectors and density matrices.
4646
It hybridises **multithreading**, **GPU acceleration** and **distribution** to run lightning fast on laptops, desktops and
@@ -83,19 +83,16 @@ In particular, QuEST `v4` was made possible through the support of the UK Nation
8383

8484
</div>
8585

86-
To learn more:
8786

87+
<!-- <a> used below for doxygen compatibility -->
88+
89+
To learn more:
90+
- view the <a href="#main_documentation">documentation</a>
8891
- visit the [website](https://quest.qtechtheory.org/)
89-
- see some [examples](/examples/)
90-
- view the [documentation](#documentation)
91-
- browse the [API](https://quest-kit.github.io/QuEST/group__api.html)
9292
- read the [whitepaper](https://www.nature.com/articles/s41598-019-47174-9), which featured in Scientific Report's [Top 100 in Physics](https://www.nature.com/collections/ecehgdfcba/) :trophy:
9393

94-
<div align="center">
9594

9695

97-
</div>
98-
9996
---------------------------------
10097

10198

@@ -105,7 +102,7 @@ To learn more:
105102
## 🎉  Introduction
106103

107104
QuEST has a simple interface which is agnostic to whether it's running on CPUs, GPUs or a networked supercomputer.
108-
```C++
105+
```cpp
109106
Qureg qureg = createQureg(30);
110107
initRandomPureState(qureg);
111108

@@ -119,7 +116,7 @@ qreal prob = calcProbOfQubitOutcome(qureg, 0, outcome);
119116
qreal expec = calcExpecPauliStr(qureg, getPauliStr("XYZ"));
120117
```
121118
Yet, it is flexible
122-
```C++
119+
```cpp
123120
mixDepolarising(qureg, targ, prob);
124121
mixKrausMap(qureg, targs, ntargs, krausmap);
125122
@@ -133,7 +130,7 @@ multiplyCompMatr1(qureg, targ, getInlineCompMatr1( {{1,2i},{3i,4}} ));
133130
multiplyDiagMatrPower(qureg, targs, ntargs, diagmatr, exponent);
134131
```
135132
and extremely powerful
136-
```C++
133+
```cpp
137134
setFullStateDiagMatrFromMultiVarFunc(fullmatr, myfunc, ntargsPerVar, nvars);
138135
applyFullStateDiagMatrPower(qureg, fullmatr, exponent);
139136

@@ -181,19 +178,15 @@ QuEST supports:
181178
182179
---------------------------------
183180
181+
<!-- permit doxygen to reference section -->
182+
<a id="main_documentation"></a>
183+
184184
## 📖  Documentation
185185
186186
> [!IMPORTANT]
187187
> QuEST v4's documentation is still under construction!
188188
189-
Visit the [docs](docs/) to:
190-
- [see what's new in v4](docs/v4.md)
191-
- [compile with cmake](docs/compile.md)
192-
- [find compatible compilers](docs/compilers.md)
193-
- [launch your simulations](docs/run.md)
194-
- [view some examples](examples/)
195-
196-
The [API](https://quest-kit.github.io/QuEST/group__api.html) documentation is divided into the following groups:
189+
Visit the [docs](docs/README.md) for guides and tutorials, or the [API](https://quest-kit.github.io/QuEST/group__api.html) which is divided into:
197190
- [calculations](https://quest-kit.github.io/QuEST/group__calculations.html)
198191
- [channels](https://quest-kit.github.io/QuEST/group__channels.html)
199192
- [debug](https://quest-kit.github.io/QuEST/group__debug.html)
@@ -241,10 +234,6 @@ You can also browse QuEST's extensive [tests](https://quest-kit.github.io/QuEST/
241234
- [deprecated test utilities](https://quest-kit.github.io/QuEST/group__deprecatedutils.html)
242235
-->
243236
244-
Contributers to QuEST should also check out the:
245-
- [software architecture](docs/architecture.md)
246-
- [style guide](docs/styleguide.md)
247-
248237
---------------------------------
249238
250239
## 🚀  Getting started
@@ -270,7 +259,7 @@ then run it with
270259
./min_example
271260
```
272261

273-
See the [docs](docs/) for enabling acceleration and running the unit tests.
262+
See the [docs](docs/README.md) for enabling acceleration and running the unit tests.
274263

275264
---------------------------------
276265

docs/README.md

Lines changed: 47 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,53 @@
1-
> TODO
1+
# 📖  Documentation
22

3-
> not sure where to put below (snippet from DiRAC)
3+
<!--
4+
Doc overview
5+
(this comment must be under the title for valid doxygen rendering)
46
5-
gpu_launch.sh wrapper script
6-
The gpu_launch.sh wrapper script is required to set the correct binding of GPU to MPI processes and the correct binding of interconnect interfaces to MPI process and GPU. We provide this centrally for convenience but its contents are simple:
7+
@author Tyson Jones
8+
-->
79

8-
```
9-
#!/bin/bash
10+
<!-- @todo remove this when doc done -->
11+
> [!IMPORTANT]
12+
> QuEST's `v4` documentation is still under construction.
13+
14+
QuEST has been overhauled! See
15+
16+
- 🎉  [`v4.md`](v4.md) for the exciting new features.
17+
18+
To get started with QuEST, check out
19+
20+
- 🔧  [`compilers.md`](compilers.md) for a list of compatible compilers.
21+
- 🔗  [`qtechtheory.org`](https://quest.qtechtheory.org/download/) for some help downloading compilers.
22+
- 🛠️  [`compile.md`](compile.md) for instructions on compiling.
23+
- ⚙️  [`cmake.md`](cmake.md) for a list of compiler variables.
24+
- 🚀  [`launch.md`](launch.md) to learn how to run QuEST on laptops to supercomputers.
25+
- 🎓  [`tutorial.md`](tutorial.md) for an introductory tutorial.
26+
- 📋  [API](https://quest-kit.github.io/QuEST/group__api.html) for the documentation of each function.
1027

11-
# Compute the raw process ID for binding to GPU and NIC
12-
lrank=$((SLURM_PROCID % SLURM_NTASKS_PER_NODE))
28+
Interested in contributing? Then check out:
1329

14-
# Bind the process to the correct GPU and NIC
15-
export CUDA_VISIBLE_DEVICES=${lrank}
16-
export UCX_NET_DEVICES=mlx5_${lrank}:1
30+
- ❤️  [`contributing.md`](contributing.md) to learn how to make a pull request.
31+
- 🏗️  [`architecture.md`](architecture.md) to understand the code structure.
32+
- 🎨  [`styleguide.md`](styleguide.md) for some tips on writing neat code.
33+
34+
Want to learn how what's under the hood? Read the
35+
- 🏆  [whitepaper](https://www.nature.com/articles/s41598-019-47174-9) which featured in Scientific Report's [Top 100 in Physics](https://www.nature.com/collections/ecehgdfcba/)
36+
- 📝  [preprint](https://arxiv.org/abs/2311.01512) which derives `v4`'s optimised algorithms.
37+
- 🧪  [tests](/tests) which compare QuEST's outputs to non-optimised calculations.
38+
- 📈  [benchmarks](https://www.youtube.com/watch?v=dQw4w9WgXcQ) which are coming soon!
39+
40+
41+
If QuEST is useful to you, feel free to cite
42+
```
43+
@article{jones2019quest,
44+
title={QuEST and high performance simulation of quantum computers},
45+
author={Jones, Tyson and Brown, Anna and Bush, Ian and Benjamin, Simon C},
46+
journal={Scientific reports},
47+
volume={9},
48+
number={1},
49+
pages={10736},
50+
year={2019},
51+
publisher={Nature Publishing Group UK London}
52+
}
1753
```

docs/architecture.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
# 🏗️  Architecture
2+
13
<!--
24
Explanation of QuEST's software architecture
5+
(this comment must be under the title for valid doxygen rendering)
36
47
@author Tyson Jones
58
-->
69

7-
# Architecture
8-
910
All user-visible API signatures are contained in `include/`, divided into semantic submodules (like `calculations.h` and `qureg.h`), but all exposed by `quest.h`. They are all strictly `C` _and_ `C++` compatible, hence their `.h` file extension.
1011

1112
The source code within `src/` is divided between five subdirectories, listed below in order of increasing control flow depth. All code is parsed strictly by `C++`, hence all files have `.cpp` and `.hpp` extensions.

docs/cmake.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1+
# ⚙️  CMake
2+
13
<!--
24
Instructions for compiling QuEST with CMake
5+
(this comment must be under the title for valid doxygen rendering)
36
47
@author Oliver Thomson Brown
58
@author Tyson Jones (test variables)
69
-->
710

8-
9-
# CMake Configuration Options in QuEST
10-
1111
Version 4 of QuEST includes reworked CMake to support library builds, CMake export, and installation. Here we detail useful variables to configure the compilation of QuEST. If using a Unix-like operating system any of these variables can be set using the `-D` flag when invoking CMake, for example:
1212

1313
```

0 commit comments

Comments
 (0)