Browse Source

Update README and docs

master
Pete Shadbolt 7 years ago
parent
commit
eb65808525
3 changed files with 13 additions and 15 deletions
  1. +3
    -4
      README.md
  2. +1
    -1
      abp/clifford.py
  3. +9
    -10
      doc/index.rst

+ 3
- 4
README.md View File

@@ -2,6 +2,8 @@

Python port of Anders and Briegel' s [method](https://arxiv.org/abs/quant-ph/0504117) for fast simulation of Clifford circuits. Should do thousands of qubits without much trouble.

**You can read the full documentation [here](https://peteshadbolt.co.uk/abp/)**.

![demo](examples/demo.gif)

## Installation
@@ -19,9 +21,6 @@ $ git clone https://github.com/peteshadbolt/abp.git
$ python setup.py install --user
```

# Documentation

You can read the documentation [here](https://peteshadbolt.co.uk/abp/).


## Visualization
@@ -65,4 +64,4 @@ $ nosetests
53 tests run in 39.5 seconds (53 tests passed)
```

Currently I use some reference implementations of `CHP` and `graphsim` which you won't have installed, hence some tests will fail with `ImportErrors`. You can ignore those :feelsgood:.
Currently I use some reference implementations of `CHP` and `graphsim` which you won't have installed, hence some tests will fail with `ImportErrors`. You can ignore those.

+ 1
- 1
abp/clifford.py View File

@@ -47,7 +47,7 @@ def conjugate(operator, unitary):
return measurement_table[operator, unitary]

def use_old_cz():
""" Use the CZ table from A&B's code """
""" Use the CZ lookup table from A&B's code, rather than our own. Useful for testing. """
global cz_table
from anders_cz import cz_table



+ 9
- 10
doc/index.rst View File

@@ -104,6 +104,13 @@ The Clifford group

.. automodule:: abp.clifford

|

The ``clifford`` module provides a few useful functions:

.. autofunction:: abp.clifford.use_old_cz
:noindex:

Visualization
----------------------

@@ -121,17 +128,9 @@ Then browse to ``http://localhost:5001/`` (in some circumstances ``abp`` will au
Now, in another terminal, use ``abp.fancy.GraphState`` to run a Clifford circuit::

>>> from abp.fancy import GraphState
>>> g = GraphState(10)
>>> g = GraphState(range(10))
>>> for i in range(10):
... g.act_hadamard(i)
...
>>> g.update()
>>> for i in range(9):
... g.act_cz(i, i+1)
...
>>> g.update()
```
>>> g.act_circuit([(i, "hadamard") for i in range(10)])
>>> g.act_circuit([((i, i+1), "cz") for i in range(9)])

And you should see a 3D visualization of the state.



Loading…
Cancel
Save