| 
				
				
					
				
				
				 | 
			
			 | 
			@@ -4,6 +4,8 @@ import numpy as np | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			import time | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			import itertools | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			square_unit_cell = ( | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    ((0, 0), (0, 1)), ((0, 0), (1, 0)), ((1, 0), (1, 1)), ((0, 1), (1, 1))) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			funny_unit_cell = (((0, 0), (0, 1)), ((0, 0), (1, 0)), | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                   ((1, 0), (1, 1)), ((0, 1), (1, 1)), ((0, 0), (.5, .5))) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
	
		
			
				| 
				
				
				
					
				
				 | 
			
			 | 
			@@ -27,14 +29,18 @@ def lattice(unit_cell, size): | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    nodes = set(itertools.chain(*edges)) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    return nodes, edges | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			# s = VisibleGraphState() | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			nodes, edges = lattice(funny_unit_cell, (10, 10)) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			nodes, edges = lattice(funny_unit_cell, (4, 4)) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			psi = GraphState() | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			for node in nodes: | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    psi.add_node(str(node), position=xyz(node[0], node[1])) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    psi.act_hadamard(str(node)) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			for j in range(100): | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    psi = GraphState() | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    for node in nodes: | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        psi.add_node(str(node), position=xyz(node[0], node[1], 0)) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        psi.act_hadamard(str(node)) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        psi.update(0) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			for edge in edges: | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    psi.act_cz(str(edge[0]), str(edge[1])) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    for edge in edges: | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        psi.act_cz(str(edge[0]), str(edge[1])) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        psi.update(0) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    psi.shutdown() | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  |