Skip to content

Commit cb682b2

Browse files
added calculation doc
1 parent 2655690 commit cb682b2

File tree

7 files changed

+1385
-60
lines changed

7 files changed

+1385
-60
lines changed

docs/tutorial.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ Qureg:
356356
globalTotal.......16 MiB
357357
```
358358
359-
> The spacing between the outputs of those two consecutive QuEST functions was determined by our earlier call to [`setMaxNumReportedSigFigs()`](https://quest-kit.github.io/QuEST/group__debug__reporting.html#ga29413703d609254244d6b13c663e6e06).
359+
> The spacing between the outputs of those two consecutive QuEST functions was determined by our earlier call to [`setNumReportedNewlines()`](https://quest-kit.github.io/QuEST/group__debug__reporting.html#ga29413703d609254244d6b13c663e6e06).
360360
361361
362362
A density matrix `Qureg` can model classical uncertainty as results from [decoherence](https://quest-kit.github.io/QuEST/group__decoherence.html), and proves useful when simulating quantum operations on a noisy quantum computer.
@@ -437,7 +437,7 @@ int targets[] = {4,5,6};
437437
applyPhaseGadget(qureg, targets, 3, angle);
438438
```
439439
440-
> [!IMPORTANT]
440+
> [!NOTE]
441441
> Notice the type of `angle` is [`qreal`](https://quest-kit.github.io/QuEST/group__types.html#ga2d479c159621c76ca6f96abe66f2e69e) rather than the expected `double`. This is a precision agnostic alias for a floating-point, real scalar which allows you to recompile QuEST with a varying [precision](/docs/compile.md#precision) with no modifications to your code.
442442
<!-- @todo the above link fails in Doxygen; it's too stupid to recognise the section ref -->
443443
@@ -514,7 +514,7 @@ applyCompMatr1(qureg, target, matrix);
514514
> The type [`qcomp`](https://quest-kit.github.io/QuEST/group__types.html#ga4971f489e74bb185b9b2672c14301983) above is a precision agnostic complex scalar, and has beautiful arithmetic overloads!
515515
> ```cpp
516516
> qcomp x = 1.5 + 3.14i;
517-
> qcomp *= 1E3i - 1E-5i;
517+
> x *= 1E3i - 1E-5i;
518518
> ```
519519
> Beware that in `C++`, `1i` is a _double precision_ literal, so `C++` users should instead
520520
> use the custom precision-agnostic literal `1_i`.
@@ -574,7 +574,7 @@ PauliStrSum sum = createInlinePauliStrSum(R"(
574574
setFullStateDiagMatrFromPauliStrSum(fullmatrix, sum);
575575
```
576576
> [!IMPORTANT]
577-
> The argument to `createInlinePauliStrSum` is a multiline string for which the syntax differs between `C` and `C++`; we used the latter above. See examples [`initialisation.c`](/examples/paulis/initialisation.c) and [`initialisation.cpp`](/paulis/matrices/initialisation.cpp) for clarity.
577+
> The argument to `createInlinePauliStrSum` is a multiline string for which the syntax differs between `C` and `C++`; we used the latter above. See examples [`initialising_paulis.c`](/examples/isolated/initialising_paulis.c) and [`initialising_paulis.cpp`](/examples/isolated/initialising_paulis.cpp) for clarity.
578578
579579
> [!CAUTION]
580580
> Beware that in distributed settings, because `fullmatrix` _may_ be distributed, we should must exercise extreme caution when modifying its `fullmatrix.cpuElems` directly.
@@ -863,6 +863,6 @@ This is important because it ensures:
863863
- our GPU processes are killed quickly, freeing resources for other processes.
864864
865865
> [!CAUTION]
866-
> After calling `finalizeQuESTEnv()`, MPI will close and each if being accessed directly by the user, will enter an undefined state. Subsequent calls to MPI routines may return gibberish, and distributed machines will have lost their ability to communicate. It is recommended to call `finalizeQuESTEnv()` immediately before exiting.
866+
> After calling `finalizeQuESTEnv()`, MPI will close and if being accessed directly by the user, will enter an undefined state. Subsequent calls to MPI routines may return gibberish, and distributed machines will lose their ability to communicate. It is recommended to call `finalizeQuESTEnv()` immediately before exiting.
867867
868868
You are now a QuEST expert 🎉 though there are _many_ more functions in the [API](https://quest-kit.github.io/QuEST/group__api.html) not covered here. Go forth and simulate!

0 commit comments

Comments
 (0)