| @@ -1,4 +1,4 @@ | |||||
| , "Stabilizer representation VS A&B"""" | |||||
| """ | |||||
| This module implements Anders and Briegel's method for fast simulation of Clifford circuits. | This module implements Anders and Briegel's method for fast simulation of Clifford circuits. | ||||
| """ | """ | ||||
| @@ -400,7 +400,8 @@ class GraphState(object): | |||||
| return state | return state | ||||
| def to_stabilizer(self): | def to_stabilizer(self): | ||||
| """ Get the stabilizer representation of the state:: | |||||
| """ | |||||
| Get the stabilizer representation of the state:: | |||||
| >>> print g.to_stabilizer() | >>> print g.to_stabilizer() | ||||
| - X I I I I | - X I I I I | ||||
| @@ -409,7 +410,7 @@ class GraphState(object): | |||||
| I I I Z I | I I I Z I | ||||
| I I I I Z | I I I I Z | ||||
| """ | |||||
| """ | |||||
| return Stabilizer(self) | return Stabilizer(self) | ||||
| def __eq__(self, other): | def __eq__(self, other): | ||||
| @@ -424,10 +425,3 @@ class GraphState(object): | |||||
| g.deterministic = self.deterministic | g.deterministic = self.deterministic | ||||
| return g | return g | ||||
| if __name__ == '__main__': | |||||
| g = GraphState() | |||||
| g.add_nodes(range(10)) | |||||
| g._add_edge(0, 5) | |||||
| g.act_local_rotation(6, 10) | |||||
| print g | |||||
| print g.to_state_vector() | |||||
| @@ -3,15 +3,19 @@ | |||||
| You can adapt this file completely to your liking, but it should at least | You can adapt this file completely to your liking, but it should at least | ||||
| contain the root `toctree` directive. | contain the root `toctree` directive. | ||||
| .. toctree:: | |||||
| :maxdepth: 2 | |||||
| ``abp`` | ``abp`` | ||||
| =============================== | =============================== | ||||
| This is the documentation for ``abp``. It's a work in progress. | This is the documentation for ``abp``. It's a work in progress. | ||||
| .. toctree:: | |||||
| :hidden: | |||||
| :maxdepth: 2 | |||||
| modules | |||||
| ``abp`` is a Python port of Anders and Briegel' s `method <https://arxiv.org/abs/quant-ph/0504117>`_ for fast simulation of Clifford circuits. | ``abp`` is a Python port of Anders and Briegel' s `method <https://arxiv.org/abs/quant-ph/0504117>`_ 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\}`. | 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\}`. | ||||