Skip to content

Solutions for the bible of quantum computation and quantum information

License

Notifications You must be signed in to change notification settings

rainij/solutions-qcqi-nielsen-chuang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Solutions for the bible of Quantum Computation and Quantum Information

This repository contains solutions to most exercises of the Book `Quantum Computation and Quantum Information` by Michael A. Nielsen & Isaac L. Chuang (Mike and Ike). The easiest way to view the solutions is to head over to the website which is generated from this repo via GitHub pages.

NOTE: I do not actively make changes to this repository anymore.

How to use the sources

NOTE: The code is rather old by now and most certainly does not work anymore. I do not intend to fix that. So you should treat the code blocks as just a bit more information.

The sources of the website are (mostly) under ./src/. The entry point is the org-mode file ./src/index.org. The sources contain more information than what is displayed on the website. In particular they contain the qiskit code to generate the numerous drawings of circuits.

Most reasonable text editors have at least an addon to display org files (e.g. vscode). But you probably need Emacs for more sophisticated things like execution or tangling of the embedded python or sage code.

To use the embedded code without modifying the org files you can do the following as an Emacs and IPython or Sagemath user:

  • open one of the org files (e.g. ./src/utils.org),
  • execute M-x org-babel-tangle, which produces sage or python files,
  • open your ipython or sage shell and run the generated file using e.g. %run utils.py (ipython) or attach("utils.sage") (sage).

I can’t guarantee that the code does not contain bugs. For some functionality I implemented unit tests (pytest) which are run by github actions right before every deploy. But I do not try to be as rigorous as in a serious industry relevant software project - I have no time for this and it is not really needed for such a small educational project.

Contributing

If you find mistakes or want to add an exercise let me know (e.g. by opening an issue) or open a pull request.

In any case, contributors must be fine dedicating their work to the public domain (see the section on unlicense). To keep things simple, any contribution is implicitly assumed to agree to this.

Unlicense

This work has been dedicated to the public domain. See the UNLICENSE file and have a look into https://unlicense.org/. Attribution is appreciated, but not required.

Small parts of this work are under a different free license. E.g. pictures I didn’t produce myself. If necessary by the respective license I indicate this at an appropriate place.

About

Solutions for the bible of quantum computation and quantum information

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published