Sam Morley-Short 8 years ago
parent
commit
f10d8694bc
1 changed files with 14 additions and 0 deletions
  1. +14
    -0
      examples/visualization/grid_2d.py

+ 14
- 0
examples/visualization/grid_2d.py View File

@@ -0,0 +1,14 @@
from abp.fancy import GraphState
from abp.util import xyz
import itertools

psi = GraphState()
grid = itertools.product(range(10), range(10))
for i, (x, y) in enumerate(grid):
psi.add_qubit(i, position=xyz(x, y, 0), vop=0)

for i in range(50):
psi.act_cz(i, i+1)

psi.update()


Loading…
Cancel
Save