Pete Shadbolt преди 8 години
родител
ревизия
b1c4617398
променени са 6 файла, в които са добавени 90 реда и са изтрити 0 реда
  1. +1
    -0
      tests/graphs/.gitignore
  2. +2
    -0
      tests/graphs/graph2.g6
  3. +4
    -0
      tests/graphs/graph3.g6
  4. +11
    -0
      tests/graphs/graph4.g6
  5. +34
    -0
      tests/graphs/graph5.g6
  6. +38
    -0
      tests/test_measurement_deterministic.py

+ 1
- 0
tests/graphs/.gitignore Целия файл

@@ -0,0 +1 @@
graph9.g6

+ 2
- 0
tests/graphs/graph2.g6 Целия файл

@@ -0,0 +1,2 @@
A?
A_

+ 4
- 0
tests/graphs/graph3.g6 Целия файл

@@ -0,0 +1,4 @@
B?
BO
BW
Bw

+ 11
- 0
tests/graphs/graph4.g6 Целия файл

@@ -0,0 +1,11 @@
C?
CC
CE
CF
CQ
CT
CU
CV
C]
C^
C~

+ 34
- 0
tests/graphs/graph5.g6 Целия файл

@@ -0,0 +1,34 @@
D??
D?_
D?o
D?w
D?{
DCO
DCW
DCc
DCo
DCs
DCw
DC{
DEk
DEo
DEs
DEw
DE{
DFw
DF{
DQg
DQo
DQw
DQ{
DTk
DTw
DT{
DUW
DUw
DU{
DV{
D]w
D]{
D^{
D~{

+ 38
- 0
tests/test_measurement_deterministic.py Целия файл

@@ -0,0 +1,38 @@
from abp import GraphState, clifford
from anders_briegel import graphsim
import numpy as np
from tqdm import tqdm
import dummy
import itertools as it

import networkx as nx


def all_simple_graphs(filename="tests/graph5.g6"):
""" Generate all possible simple graphs """
with open(filename) as f:
for line in tqdm(f):
yield nx.parse_graph6(line.strip())
def rotated(simple_graphs):
for g in simple_graphs:
for r in it.product(*[range(24)]*2):
yield g, r


print len(list(rotated(all_simple_graphs())))


#N = 3
#m = {1: graphsim.lco_X, 2: graphsim.lco_Y, 3: graphsim.lco_Z}

#measurements = (3, 2, 1)
#outcomes = (0, 1)
#local_ops = it.combinations_with_replacement(range(24), N)
#edge_patterns =

#print list(local_ops)

#print len(list(local_ops))
#print list(edge_patterns)


Loading…
Отказ
Запис