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 1002B

8 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
1234567891011121314151617181920212223242526272829303132333435
  1. # abp 0.6.1
  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. ![Video demo](doc/abp.mp4)
  16. ## Installation
  17. Install from source
  18. ```shell
  19. $ git clone http://gitlab.psiquantum.lan/pete/abp
  20. $ cd abp
  21. $ virtualenv env
  22. $ source env/bin/activate
  23. $ python setup.py develop
  24. ```
  25. ## Documentation
  26. You can read the full documentation [here](https://peteshadbolt.co.uk/static/abp/). You can also build it locally using Sphinx with `make doc`.
  27. 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`.