Browse Source

CHP

master
Pete Shadbolt 8 years ago
parent
commit
4296e9d224
3 changed files with 7 additions and 17 deletions
  1. +1
    -0
      .gitignore
  2. +5
    -6
      setup.py
  3. +1
    -11
      tests/test_against_anders_and_briegel.py

+ 1
- 0
.gitignore View File

@@ -1,3 +1,4 @@
chp/
.agignore
venv/
fresh_venv/


+ 5
- 6
setup.py View File

@@ -1,14 +1,13 @@
from setuptools import setup, find_packages

setup(
name = "abp",
name = "chp",
version = "0.1",
packages = find_packages(),
test_suite = 'tests',
author = "Pete Shadbolt",
author_email = "hello@peteshadbolt.co.uk",
description = "Implements Anders and Briegel in Python",
license = "MIT",
author = "Scott Aaronson & Daniel Gottesman (Ported by Pete Shadbolt)",
description = "CNOT Hadamard Phase",
license = "Copyright Scott & others",
keywords = "quantum",
url = "https://github.com/peteshadbolt/abp/"
url = "http://www.scottaaronson.com/chp/"
)

+ 1
- 11
tests/test_against_anders_and_briegel.py View File

@@ -123,7 +123,6 @@ def test_all(N=3):

clifford.use_old_cz()


a = graphsim.GraphRegister(N)
b = GraphState(range(N))
previous_state, previous_cz = None, None
@@ -136,15 +135,6 @@ def test_all(N=3):
q = random.randint(0, N-2)
a.cphase(q, q+1)
b.act_cz(q, q+1)
previous_state = deepcopy(b)
previous_cz = q, q+1

print "Initial state:"
print previous_state.node
print previous_state.adj
print "CZ:", previous_cz
print "Pete state:\n", a.get_adj_list()
print "Anders state:\n", b.adj_list()

compare(a, b)



Loading…
Cancel
Save