Skip to content

Commit 4ae0497

Browse files
scaffolded v4 doc
see individual commits/sub-tasks in #576
1 parent 6531616 commit 4ae0497

38 files changed

+4996
-2879
lines changed

README.md

Lines changed: 45 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,14 @@
66
@author Tyson Jones
77
-->
88

9-
<!-- TODO: update all paths to be absolute (rather than relative) as per above ->
9+
10+
11+
<!-- TODO:
12+
update all instances of
13+
/v4/
14+
within this README to
15+
master/main/active branc
16+
-->
1017

1118

1219

@@ -15,7 +22,7 @@
1522

1623
<!-- banner -->
1724
<a href="https://quest.qtechtheory.org">
18-
<img src="utils/docs/banner.png?raw=true" alt="The QuEST logo" width=400>
25+
<img src="https://raw.githubusercontent.com/QuEST-Kit/QuEST/refs/heads/v4/utils/docs/logos/banner.png" alt="The QuEST logo" width=400>
1926
</a>
2027

2128
<!-- TODO: restore CI 'compilation/test pass' badge! -->
@@ -67,12 +74,12 @@ In particular, QuEST `v4` was made possible through the support of the UK Nation
6774

6875
<div align="center">
6976

70-
<img src="utils/docs/logos/nqcc.png" alt="NQCC" height=30> &nbsp;
71-
<img src="utils/docs/logos/amd.png" alt="AMD" height=25> &nbsp;
72-
<img src="utils/docs/logos/nvidia.png" alt="NVIDIA" height=25> &nbsp;
73-
<img src="utils/docs/logos/qmt.png" alt="Quantum Motion" height=25> &nbsp;
74-
<img src="utils/docs/logos/edinburgh.png" alt="University of Edinburgh" height=25> &nbsp;
75-
<img src="utils/docs/logos/oxford.png" alt="University of Oxford" height=28> &nbsp;
77+
<img src="https://raw.githubusercontent.com/QuEST-Kit/QuEST/refs/heads/v4/utils/docs/logos/nqcc.png" alt="NQCC" height=30> &nbsp;
78+
<img src="https://raw.githubusercontent.com/QuEST-Kit/QuEST/refs/heads/v4/utils/docs/logos/amd.png" alt="AMD" height=25> &nbsp;
79+
<img src="https://raw.githubusercontent.com/QuEST-Kit/QuEST/refs/heads/v4/utils/docs/logos/nvidia.png" alt="NVIDIA" height=25> &nbsp;
80+
<img src="https://raw.githubusercontent.com/QuEST-Kit/QuEST/refs/heads/v4/utils/docs/logos/qmt.png" alt="Quantum Motion" height=25> &nbsp;
81+
<img src="https://raw.githubusercontent.com/QuEST-Kit/QuEST/refs/heads/v4/utils/docs/logos/edinburgh.png" alt="University of Edinburgh" height=25> &nbsp;
82+
<img src="https://raw.githubusercontent.com/QuEST-Kit/QuEST/refs/heads/v4/utils/docs/logos/oxford.png" alt="University of Oxford" height=28> &nbsp;
7683

7784
</div>
7885

@@ -92,7 +99,10 @@ To learn more:
9299
---------------------------------
93100

94101

95-
## :tada:&nbsp; Introduction
102+
<!-- BEWARE that we use two non-breaking spaces after each emoji in
103+
a section title, to add spacing between emoji and text -->
104+
105+
## 🎉  Introduction
96106

97107
QuEST has a simple interface which is agnostic to whether it's running on CPUs, GPUs or a networked supercomputer.
98108
```C++
@@ -145,26 +155,33 @@ qreal expec2 = calcExpecFullStateDiagMatr(qureg, fullmatr);
145155
146156
---------------------------------
147157
148-
## :white_check_mark:&nbsp; Features
158+
## ✅  Features
159+
160+
<!-- BEWARE that a bug in Doxygen v1.13.2 (github.com/doxygen/doxygen/issues/11515)
161+
means we cannot immediately follow a non-breaking space (inserted below after
162+
each emoji to effect spacing) with markdown syntax like **. Instead, we insert
163+
one final regular/non-breaking space before ** which isn't rendered, and which
164+
works around the bug -->
165+
149166
QuEST supports:
150-
- :ballot_box_with_check: &nbsp; **density matrices** for precise simulation of noisy quantum computers
151-
- :ballot_box_with_check: &nbsp; **general unitaries** with any number of control, control-states, and target qubits
152-
- :ballot_box_with_check: &nbsp; **general decoherence channels** of any dimension
153-
- :ballot_box_with_check: &nbsp; **general observables** in the Pauli or diagonal-Z bases
154-
- :ballot_box_with_check: &nbsp; **many *many* operators**, including Pauli gadgets, trotterised time evolutions, and projectors
155-
- :ballot_box_with_check: &nbsp; **many tools to analyse** quantum states, such as calculations of probability, fidelity, expectation value, distances and partial traces
156-
- :ballot_box_with_check: &nbsp; **variable precision** through `qreal` and `qcomp` numerical types which can use single, double or quad precision
157-
- :ballot_box_with_check: &nbsp; **direct access to amplitudes** for rapid custom modification of the quantum state
158-
- :ballot_box_with_check: &nbsp; **native compilation** on MacOS, Linux and Windows, through Clang, GNU, Intel, and MSVC compilers
159-
- :ballot_box_with_check: &nbsp; **hybridisation** of multithreading, GPU-acceleration, distribution and GPU-distribution
160-
- :ballot_box_with_check: &nbsp; **optimisation** using NVLink'd GPUs, cuQuantum, and CUDA-aware MPI
161-
- :ballot_box_with_check: &nbsp; **automatic deployment** of a `Qureg` to the optimal hardware at runtime
162-
- :ballot_box_with_check: &nbsp; **hardware probing** to determine how many qubits can be simulated at runtime
163-
- :ballot_box_with_check: &nbsp; **bespoke algorithms** to optimally simulate a wide variety of esoteric operations
167+
- ☑️   **density matrices** for precise simulation of noisy quantum computers
168+
- ☑️   **general unitaries** with any number of control, control-states, and target qubits
169+
- ☑️   **general decoherence channels** of any dimension
170+
- ☑️   **general observables** in the Pauli or diagonal-Z bases
171+
- ☑️   **many *many* operators**, including Pauli gadgets, trotterised time evolutions, and projectors
172+
- ☑️   **many tools to analyse** quantum states, such as calculations of probability, fidelity, expectation value, distances and partial traces
173+
- ☑️   **variable precision** through `qreal` and `qcomp` numerical types which can use single, double or quad precision
174+
- ☑️   **direct access to amplitudes** for rapid custom modification of the quantum state
175+
- ☑️   **native compilation** on MacOS, Linux and Windows, through Clang, GNU, Intel, and MSVC compilers
176+
- ☑️   **hybridisation** of multithreading, GPU-acceleration, distribution and GPU-distribution
177+
- ☑️   **optimisation** using NVLink'd GPUs, cuQuantum, and CUDA-aware MPI
178+
- ☑️   **automatic deployment** of a `Qureg` to the optimal hardware at runtime
179+
- ☑️   **hardware probing** to determine how many qubits can be simulated at runtime
180+
- ☑️   **bespoke algorithms** to optimally simulate a wide variety of esoteric operations
164181
165182
---------------------------------
166183
167-
## :book:&nbsp; Documentation
184+
## 📖  Documentation
168185
169186
> [!IMPORTANT]
170187
> QuEST v4's documentation is still under construction!
@@ -229,7 +246,7 @@ Contributers to QuEST should also check out the:
229246
230247
---------------------------------
231248
232-
## :rocket:&nbsp; Getting started
249+
## 🚀  Getting started
233250
234251
To rocket right in, download QuEST with [git](https://git-scm.com/) at the terminal
235252
```bash
@@ -256,7 +273,7 @@ See the [docs](docs/) for enabling acceleration and running the unit tests.
256273

257274
---------------------------------
258275

259-
## :heart:&nbsp; Acknowledgements
276+
## ❤  Acknowledgements
260277

261278
We sincerely thank the following external contributors to QuEST.
262279

@@ -275,7 +292,7 @@ We sincerely thank the following external contributors to QuEST.
275292

276293
---------------------------------
277294

278-
## :newspaper:&nbsp; Related projects
295+
## 📰  Related projects
279296

280297
- [QuESTlink](https://questlink.qtechtheory.org) <br>
281298
a Mathematica package enabling symbolic circuit manipulation, analytic simulation, visualisation and high performance simulation with remote accelerated hardware.

quest/include/calculations.h

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,35 +25,63 @@ extern "C" {
2525
#endif
2626

2727

28+
/// @notdoced
29+
/// @notvalidated
2830
qreal calcExpecPauliStr(Qureg qureg, PauliStr str);
2931

32+
/// @notdoced
33+
/// @notvalidated
3034
qreal calcExpecPauliStrSum(Qureg qureg, PauliStrSum sum);
3135

36+
/// @notdoced
37+
/// @notvalidated
3238
qreal calcExpecFullStateDiagMatr(Qureg qureg, FullStateDiagMatr matr);
3339

40+
/// @notdoced
41+
/// @notvalidated
3442
qreal calcExpecFullStateDiagMatrPower(Qureg qureg, FullStateDiagMatr matr, qreal exponent);
3543

3644

45+
/// @notdoced
46+
/// @notvalidated
3747
qreal calcTotalProb(Qureg qureg);
3848

49+
/// @notdoced
50+
/// @notvalidated
3951
qreal calcProbOfBasisState(Qureg qureg, qindex index);
4052

53+
/// @notdoced
54+
/// @notvalidated
4155
qreal calcProbOfQubitOutcome(Qureg qureg, int qubit, int outcome);
4256

57+
/// @notdoced
58+
/// @notvalidated
4359
qreal calcProbOfMultiQubitOutcome(Qureg qureg, int* qubits, int* outcomes, int numQubits);
4460

61+
/// @notdoced
62+
/// @notvalidated
4563
void calcProbsOfAllMultiQubitOutcomes(qreal* outcomeProbs, Qureg qureg, int* qubits, int numQubits);
4664

4765

66+
/// @notdoced
67+
/// @notvalidated
4868
qreal calcPurity(Qureg qureg);
4969

70+
/// @notdoced
71+
/// @notvalidated
5072
qreal calcFidelity(Qureg qureg, Qureg other);
5173

74+
/// @notdoced
75+
/// @notvalidated
5276
qreal calcDistance(Qureg qureg1, Qureg qureg2);
5377

5478

79+
/// @notdoced
80+
/// @notvalidated
5581
Qureg calcPartialTrace(Qureg qureg, int* traceOutQubits, int numTraceQubits);
5682

83+
/// @notdoced
84+
/// @notvalidated
5785
Qureg calcReducedDensityMatrix(Qureg qureg, int* retainQubits, int numRetainQubits);
5886

5987

@@ -75,21 +103,25 @@ Qureg calcReducedDensityMatrix(Qureg qureg, int* retainQubits, int numRetainQubi
75103
* below functions have a C-compatible wrapper defined in
76104
* wrappers.h which passes/receives the primitives by pointer;
77105
* a qcomp ptr can be safely passed from the C++ source binary
78-
* the user's C binary.
106+
* the user's C binary.
79107
*/
80108

81-
#ifdef __cplusplus
82-
109+
/// @notdoced
110+
/// @notvalidated
83111
qcomp calcInnerProduct(Qureg qureg1, Qureg qureg2);
84112

113+
/// @notdoced
114+
/// @notvalidated
85115
qcomp calcExpecNonHermitianPauliStrSum(Qureg qureg, PauliStrSum sum);
86116

117+
/// @notdoced
118+
/// @notvalidated
87119
qcomp calcExpecNonHermitianFullStateDiagMatr(Qureg qureg, FullStateDiagMatr matr);
88120

121+
/// @notdoced
122+
/// @notvalidated
89123
qcomp calcExpecNonHermitianFullStateDiagMatrPower(Qureg qureg, FullStateDiagMatr matrix, qcomp exponent);
90124

91-
#endif
92-
93125

94126
#endif // CALCULATIONS_H
95127

quest/include/channels.h

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
*/
6262

6363

64+
/// @notdoced
6465
typedef struct {
6566

6667
int numQubits;
@@ -87,6 +88,7 @@ typedef struct {
8788
} SuperOp;
8889

8990

91+
/// @notdoced
9092
typedef struct {
9193

9294
int numQubits;
@@ -131,21 +133,31 @@ typedef struct {
131133
extern "C" {
132134
#endif
133135

136+
/// @notdoced
134137
KrausMap createKrausMap(int numQubits, int numOperators);
135138

139+
/// @notdoced
136140
void syncKrausMap(KrausMap map);
137141

142+
/// @notdoced
138143
void destroyKrausMap(KrausMap map);
139144

145+
/// @notdoced
146+
/// @nottested
140147
void reportKrausMap(KrausMap map);
141148

142149

150+
/// @notdoced
143151
SuperOp createSuperOp(int numQubits);
144152

153+
/// @notdoced
145154
void syncSuperOp(SuperOp op);
146155

156+
/// @notdoced
147157
void destroySuperOp(SuperOp op);
148158

159+
/// @notdoced
160+
/// @nottested
149161
void reportSuperOp(SuperOp op);
150162

151163
#ifdef __cplusplus
@@ -169,8 +181,10 @@ extern "C" {
169181
extern "C" {
170182
#endif
171183

184+
/// @notdoced
172185
void setKrausMap(KrausMap map, qcomp*** matrices);
173186

187+
/// @notdoced
174188
void setSuperOp(SuperOp op, qcomp** matrix);
175189

176190
#ifdef __cplusplus
@@ -200,8 +214,10 @@ extern "C" {
200214

201215
// C++ overloads to accept vectors, which also enables vector initialiser literals
202216

217+
/// @notdoced
203218
void setKrausMap(KrausMap map, std::vector<std::vector<std::vector<qcomp>>> matrices);
204219

220+
/// @notdoced
205221
void setSuperOp(SuperOp op, std::vector<std::vector<qcomp>> matrix);
206222

207223

@@ -257,12 +273,14 @@ extern "C" {
257273
// C then overloads setKrausMap() to call the above VLA when given arrays, using C11 Generics.
258274
// See the doc of getCompMatr1() in matrices.h for an explanation of Generic, and its nuances.
259275

276+
/// @notdoced
260277
#define setKrausMap(map, ...) \
261278
_Generic((__VA_ARGS__), \
262279
qcomp*** : setKrausMap, \
263280
default : _setKrausMapFromArr \
264281
)((map), (__VA_ARGS__))
265282

283+
/// @notdoced
266284
#define setSuperOp(op, ...) \
267285
_Generic((__VA_ARGS__), \
268286
qcomp** : setSuperOp, \
@@ -298,8 +316,10 @@ extern "C" {
298316
// and 'numOps' are superfluous, but needed for consistency with the C API, so we additionally
299317
// validate that they match the struct dimensions (which requires validating the structs).
300318

319+
/// @notdoced
301320
void setInlineKrausMap(KrausMap map, int numQb, int numOps, std::vector<std::vector<std::vector<qcomp>>> matrices);
302321

322+
/// @notdoced
303323
void setInlineSuperOp(SuperOp op, int numQb, std::vector<std::vector<qcomp>> matrix);
304324

305325
#elif !defined(_MSC_VER)
@@ -333,9 +353,11 @@ extern "C" {
333353
}
334354

335355

356+
/// @notdoced
336357
#define setInlineKrausMap(map, numQb, numOps, ...) \
337358
_setInlineKrausMap((map), (numQb), (numOps), (qcomp[(numOps)][1<<(numQb)][1<<(numQb)]) __VA_ARGS__)
338359

360+
/// @notdoced
339361
#define setInlineSuperOp(matr, numQb, ...) \
340362
_setInlineSuperOp((matr), (numQb), (qcomp[1<<(2*(numQb))][1<<(2*(numQb))]) __VA_ARGS__)
341363

@@ -361,8 +383,10 @@ extern "C" {
361383

362384
// C++ accepts vector initialiser lists
363385

386+
/// @notdoced
364387
KrausMap createInlineKrausMap(int numQubits, int numOperators, std::vector<std::vector<std::vector<qcomp>>> matrices);
365388

389+
/// @notdoced
366390
SuperOp createInlineSuperOp(int numQubits, std::vector<std::vector<qcomp>> matrix);
367391

368392
#elif !defined(_MSC_VER)
@@ -398,9 +422,11 @@ extern "C" {
398422
}
399423

400424

425+
/// @notdoced
401426
#define createInlineKrausMap(numQb, numOps, ...) \
402427
_createInlineKrausMap((numQb), (numOps), (qcomp[(numOps)][1<<(numQb)][1<<(numQb)]) __VA_ARGS__)
403428

429+
/// @notdoced
404430
#define createInlineSuperOp(numQb, ...) \
405431
_createInlineSuperOp((numQb), (qcomp[1<<(2*(numQb))][1<<(2*(numQb))]) __VA_ARGS__)
406432

0 commit comments

Comments
 (0)