|
@@ -6,22 +6,24 @@ Python port of Anders and Briegel' s [method](https://arxiv.org/abs/quant-ph/050 |
|
|
|
|
|
|
|
|
## Installation |
|
|
## Installation |
|
|
|
|
|
|
|
|
Install with `pip`: |
|
|
|
|
|
|
|
|
It's easiest to install with `pip`: |
|
|
|
|
|
|
|
|
```shell |
|
|
```shell |
|
|
$ pip install --user abp |
|
|
$ pip install --user abp |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
Or clone and install: |
|
|
|
|
|
|
|
|
Or clone and install in `develop` mode: |
|
|
|
|
|
|
|
|
```shell |
|
|
```shell |
|
|
$ git clone https://github.com/peteshadbolt/abp.git |
|
|
$ git clone https://github.com/peteshadbolt/abp.git |
|
|
$ python setup.py install --user |
|
|
|
|
|
|
|
|
$ cd abp |
|
|
|
|
|
$ python setup.py develop --user |
|
|
|
|
|
$ python setup.py develop --user --prefix= # Might be required on OSX |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
## Visualization |
|
|
## Visualization |
|
|
|
|
|
|
|
|
`abp` comes with a tool to visualize graph states in a WebGL compatible web browser (Chrome, Firefox, Safari etc). It uses a client-server architecture. |
|
|
|
|
|
|
|
|
`abp` comes with a tool to visualize graph states in a web browser. It uses a client-server architecture. |
|
|
|
|
|
|
|
|
First, run `abpserver` in a terminal: |
|
|
First, run `abpserver` in a terminal: |
|
|
|
|
|
|
|
@@ -29,7 +31,7 @@ First, run `abpserver` in a terminal: |
|
|
$ abpserver |
|
|
$ abpserver |
|
|
Listening on port 5000 for clients.. |
|
|
Listening on port 5000 for clients.. |
|
|
``` |
|
|
``` |
|
|
Then browse to `http://localhost:5001/` (in some circumstances `abp` will automatically pop a browser window). |
|
|
|
|
|
|
|
|
Then browse to `http://localhost:5001/`. Alternatively, `abpserver -v` will automatically pop a browser window. |
|
|
|
|
|
|
|
|
Now, in another terminal, use `abp.fancy.GraphState` to run a Clifford circuit: |
|
|
Now, in another terminal, use `abp.fancy.GraphState` to run a Clifford circuit: |
|
|
|
|
|
|
|
@@ -59,4 +61,4 @@ $ nosetests |
|
|
53 tests run in 39.5 seconds (53 tests passed) |
|
|
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. |
|
|
|
|
|
|
|
|
Currently I use some reference implementations of `chp` and `graphsim` which you won't have installed, so some tests will be skipped. That's expected. |