Pete Shadbolt před 8 roky
rodič
revize
4296e9d224
3 změnil soubory, kde provedl 7 přidání a 17 odebrání
  1. +1
    -0
      .gitignore
  2. +5
    -6
      setup.py
  3. +1
    -11
      tests/test_against_anders_and_briegel.py

+ 1
- 0
.gitignore Zobrazit soubor

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


+ 5
- 6
setup.py Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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)



Načítá se…
Zrušit
Uložit