Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion course_info/activities.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,14 @@
3. _Practice_: [Tutorialize continuous variable states](../exercises/tutorialize_continuous_variables.md)
4. _Demo_: Profiling and optimising code

11:45: Visit by Marjan and Ingrid from Skylab who will present their innovation and entrepreneurship opportunities
11:45: Visit by Marjan and Ingrid from Skylab who will present their innovation and entrepreneurship opportunities


## Day 6

1. _Practice_: Finalise the [Tutorialize continuous variable states](../exercises/tutorialize_continuous_variables.md) exercise
2. _Peer review_: Give feedback on each other's notebooks
3. _Practice_: [Profile your code](../exercises/profile-your-code.md)
4. _Demo_: QuTiP
5. _Practice_: [Try out QuTiP](../exercises/try-out-qutip.md)
6. _Practice_: If you any have time left, start or continue the [Random circuit sampling](../exercises/random-circuit-sampling.md) exercise
10 changes: 5 additions & 5 deletions course_info/schedule.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ The schedule is loosely defined and likely to change.
| ----- | ------- | ------------------------------------------------------------ | ----------------------------------------------------- |
| 1 | 3/8 | intro to course and to scientific computing;<br>environments, workflows | |
| 2 | 4/8 | version control<br />NumPy | qubits, quantum circuit simulation |
| 3 | 5/8 | more NumPy | quantum circuit simulation<br>~~random circuit sampling~~ |
| 4 | 6/8 | visualisation | continuous-variable states |
| 5 | 7/8 | QuTiP;<br>profiling code | continuous-variable states<br>cavity QED |
| 6 | 10/8 | data analysis;<br>file I/O | realistic squeezed light |
| 7 | 11/8 | packaging<br>speeding up<br>other relevant packages and tools | teleportation simulation |
| 3 | 5/8 | more NumPy | quantum circuit simulation |
| 4 | 6/8 | visualisation | parametrized circuits |
| 5 | 7/8 | notebook presentation;<br>profiling code | continuous-variable states |
| 6 | 10/8 | QuTiP | continuous-variable states<br>cavity QED |
| 7 | 11/8 | data analysis;<br>file I/O;<br>(packaging?) | realistic squeezed light |
| 8 | 12/8 | guided mini-project:<br />modeling, simulation, analysis, presentation | quantum state generation + tomography |
| 9–13 | 13–19/8 | Project work | your choice! |
| 14–15 | 20–21/8 | Project presentations + feedback | |
Expand Down
1,104 changes: 1,104 additions & 0 deletions demos/QuTiP.ipynb

Large diffs are not rendered by default.

771 changes: 771 additions & 0 deletions exercises/cv_submissions/cv_tutorial_miranda.ipynb

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions exercises/profile-your-code.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Profile your code

_Practice_

Take another look at some of the code, you have built during this course. For example the quantum circuit simulator or some of the continuous-variable state calculations.

Test the run time of your code using some of the tools from the [Profiling and optimising code](../demos/Profiling%20and%20optimising%20code.ipynb) notebook – especially `%timeit`, `%prun` and `%lprun` (and the equivalent for multiline cells, `%%timeit` and `%%prun`). The heatmap `%%heat` mentioned [here](https://www.python4data.science/en/latest/performance/ipython-profiler.html) also looks useful (I haven't tested it yet).

If you have your code as normal `.py` Python files instead of notebooks, there are equivalent command-line commands to run your scripts through these profilers:
[timeit](https://docs.python.org/3/library/timeit.html), [profile/cProfile](https://docs.python.org/3/library/profile.html) and [line_profiler](https://kernprof.readthedocs.io/en/latest/).

See if you can identify bottlenecks. Can you think of ways to speed up your code by rewriting it? You could also try to speed it up using Numba, JAX, numexpr, multiprocessing, or similar (see the [Profiling and optimising code](../demos/Profiling%20and%20optimising%20code.ipynb) notebook for very basic examples of usage).
Loading