some work 4 presentation

This commit is contained in:
Daniel Knüttel 2020-04-01 13:13:35 +02:00
parent 5e05190bc5
commit 7c1050b32d
4 changed files with 1446 additions and 686 deletions

View File

@ -0,0 +1,34 @@
from collections import deque
import matplotlib.pyplot as plt
import numpy as np
import json
from pyqcs import State, H, X, S, CZ
from pyqcs.graph.state import GraphState
from pyqcs.util.random_circuits import random_circuit
def S_with_extra_arg(act, i):
return S(act)
np.random.seed(0xdeadbeef)
circuit = random_circuit(50, 700, X, H, S_with_extra_arg, CZ)
state = circuit * GraphState.new_plus_state(50)
vops, edges = state._g_state.to_lists()
handled_edges = set()
dot_edges = deque()
for i, ngbhd in enumerate(edges):
for j in ngbhd:
if((i,j) not in handled_edges):
dot_edges.append(f"{i} -- {j}")
handled_edges |= {(i,j), (j,i)}
dot_edges_str = "\n".join(dot_edges)
dot_str = "graph graphical_state{\n" + dot_edges_str + "\n}"
print(dot_str)

View File

@ -12,7 +12,13 @@ graph_pngs= graphs/valid_graph.png \
all: main.pdf
all: main_long.pdf main.pdf
main_long.pdf: main_long.tex $(graph_pngs)
$(latex) main_long
#$(bibtex) main_long
$(latex) main_long
$(pdflatex) main_long
main.pdf: main.tex $(graph_pngs)
$(latex) main
@ -20,11 +26,19 @@ main.pdf: main.tex $(graph_pngs)
$(latex) main
$(pdflatex) main
graphs/%.png: graphs/%.dot
dot $< -Tpng -o $@
clean:
-rm main_long.aux
-rm main_long.blg
-rm main_long.dvi
-rm main_long.log
-rm main_long.out
-rm main_long.pdf
-rm main_long.toc
-rm main_long.bbl
-rm $(graph_pngs)
-rm main.aux
-rm main.blg
-rm main.dvi
@ -33,4 +47,3 @@ clean:
-rm main.pdf
-rm main.toc
-rm main.bbl
-rm $(graph_pngs)

File diff suppressed because it is too large Load Diff

1042
presentation/main_long.tex Normal file

File diff suppressed because it is too large Load Diff