瀏覽代碼

CHP

master
Pete Shadbolt 8 年之前
父節點
當前提交
4296e9d224
共有 3 個檔案被更改,包括 7 行新增17 行删除
  1. +1
    -0
      .gitignore
  2. +5
    -6
      setup.py
  3. +1
    -11
      tests/test_against_anders_and_briegel.py

+ 1
- 0
.gitignore 查看文件

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


+ 5
- 6
setup.py 查看文件

@@ -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 查看文件

@@ -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…
取消
儲存