Solve the Quantum Katas Online with Jupyter Notebooks
Last month we announced Q# integration with Jupyter Notebooks – a web-based environment for creating interactive mixed-media documents. One of the popular applications of Jupyter Notebooks is tutorials. Indeed, the ability to mix text, formulas and images with the code and the results of its execution is just indispensable for explaining an algorithm or teaching a tool and letting the learner experience them first-hand and immediately.
Today, we present the first batch of the Quantum Katas in Notebook format! Those of you who have already tried out the Quantum Katas or attended one of our workshops on quantum computing will recognize the benefits of the new format immediately:
- You don’t need to install anything locally to solve the katas. No more frenzied installations the night before the workshop (or even during the workshop!) – you can run the katas online in any browser using Binder.
- The presentation is a lot smoother and more polished. Even with the Unicode support in Q# comments, there is a dramatic difference in task rendering, since the Notebooks provide full HTML and LaTeX support, and allow images to be incorporated in the task descriptions.
Notebooks also allow hints to be hidden until they are needed, as opposed to just being visible in the code upfront. (For the best experience with the hints, we recommend using Firefox, Chrome or Microsoft Edge Dev build.)
- The solution template given in the Notebook does not have to compile, as long as you don’t attempt to solve the task. The solution template given in a Q# project must compile to tell you that your solution is incorrect, so the tasks frequently return a placeholder value just to make the code valid – and for some of the trickier tasks that value is not trivial and sometimes confusing.
We will eventually convert all the katas to Notebook format, so that you can solve them in your preferred environment. Meanwhile, try the katas that are already converted and let us know what you think!