diff --git a/README.md b/README.md index 5d0c84a..049301f 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,6 @@ Python port of Anders and Briegel' s [method](https://arxiv.org/abs/quant-ph/0504117) for fast simulation of Clifford circuits. You can read the full documentation [here](https://peteshadbolt.co.uk/abp/). -![demo](examples/demo.gif) - ## Installation It's easiest to install with `pip`: @@ -48,9 +46,7 @@ Now, in another terminal, use `abp.fancy.GraphState` to run a Clifford circuit: >>> g.update() ``` -And you should see a visualization of the state: - -![demo](examples/viz.png) +And you should see a visualization of the state. ## Testing diff --git a/doc/index.rst b/doc/index.rst index 91a6074..ba2e2af 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -19,8 +19,6 @@ This is the documentation for ``abp``. It's a work in progress. ``abp`` is a Python port of Anders and Briegel' s `method `_ for fast simulation of Clifford circuits. That means that you can make quantum states of thousands of qubits, perform any sequence of Clifford operations, and measure in any of :math:`\{\sigma_x, \sigma_y, \sigma_z\}`. -.. image:: ../examples/demo.gif - Installing ---------------------------- @@ -119,8 +117,6 @@ Now, in another terminal, use ``abp.fancy.GraphState`` to run a Clifford circuit And you should see a 3D visualization of the state. You can call ``update()`` in a loop to see an animation. -.. image:: ../examples/viz.png - Reference ---------------------------- diff --git a/examples/demo.gif b/examples/demo.gif deleted file mode 100644 index b4af52f..0000000 Binary files a/examples/demo.gif and /dev/null differ diff --git a/examples/mercedes_demo.py b/examples/mercedes_demo.py deleted file mode 100644 index 216aafa..0000000 --- a/examples/mercedes_demo.py +++ /dev/null @@ -1,24 +0,0 @@ -from abp.fancy import GraphState as FGS -import abp -from abp.util import xyz - -def linear_cluster(n): - g = FGS(range(n), deterministic=False) - g.act_circuit([(i, "hadamard") for i in range(n)]) - g.act_circuit([((i, i+1), "cz") for i in range(n-1)]) - return g - - -def test_mercedes_example_1(): - """ Run an example provided by mercedes """ - - g = linear_cluster(5) - g.measure(2, "px", 1) - g.measure(3, "px", 1) - g.remove_vop(0, 1) - g.remove_vop(1, 0) - print g.node - - -if __name__ == '__main__': - test_mercedes_example_1() diff --git a/examples/tidying_vops.py b/examples/tidying_vops.py deleted file mode 100644 index 4d7bbb3..0000000 --- a/examples/tidying_vops.py +++ /dev/null @@ -1,8 +0,0 @@ -import abp - -# TODO - -# make a random state - -# try to tidy up such that all VOPs are in (X, Y, Z) - diff --git a/examples/visualization/issues/unpositioned_nodes.py b/examples/visualization/issues/unpositioned_nodes.py new file mode 100644 index 0000000..476fe7a --- /dev/null +++ b/examples/visualization/issues/unpositioned_nodes.py @@ -0,0 +1,18 @@ +from abp.fancy import GraphState +import networkx as nx + +edges = [(0,1),(1,2),(2,3),(3,4)] +nodes = [(i, {'x': i, 'y': 0, 'z':0}) for i in range(5)] +gs = GraphState() + +for node, position in nodes: + gs.add_qubit(node, position=position) + gs.act_hadamard(node) + +for edge in edges: + gs.act_cz(*edge) +gs.update(3) +# a single line of qubits are created along the x axis +gs.add_qubit('start') +gs.update(0) +# a curved 5-qubit cluster and single qubit is depicted diff --git a/examples/viz.png b/examples/viz.png deleted file mode 100644 index 1997da8..0000000 Binary files a/examples/viz.png and /dev/null differ