Anders and Briegel in Python
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 1011B

8 years ago
5 years ago
5 years ago
5 years ago
5 years ago
8 years ago
8 years ago
5 years ago
8 years ago
5 years ago
8 years ago
5 years ago
5 years ago
8 years ago
5 years ago
12345678910111213141516171819202122232425262728293031323334353637
  1. # abp 0.6.2
  2. Python port of Anders and Briegel' s [method](https://arxiv.org/abs/quant-ph/0504117) for fast simulation of Clifford circuits.
  3. ## Usage
  4. ```python
  5. import abp
  6. from abp.util import xyz
  7. g = abp.GraphState()
  8. g.add_qubit("alice", position=xyz(0, 0, 0))
  9. g.add_qubit("bob", position=xyz(0, 0, 0))
  10. g.act_hadamard("alice")
  11. g.act_hadamard("bob")
  12. g.act_cz("alice", "bob")
  13. g.push() # Sends for visualization
  14. ```
  15. ## Demo
  16. ![Demo video](doc/abp.mp4)
  17. ## Installation
  18. Install from source
  19. ```shell
  20. $ git clone http://gitlab.psiquantum.lan/pete/abp
  21. $ cd abp
  22. $ virtualenv env
  23. $ source env/bin/activate
  24. $ python setup.py develop
  25. ```
  26. ## Documentation
  27. You can read the full documentation [here](https://peteshadbolt.co.uk/static/abp/). You can also build it locally using Sphinx with `make doc`.
  28. To install Sphinx on OSX, use `pip install sphinx`. If after doing so `make doc` still does not work, some OSX users may also need to install `sphinxcontrib-napoleon` by running `pip install sphinxcontrib-napoleon`.