18 lines
542 B
Python
18 lines
542 B
Python
|
from collections import deque
|
||
|
import matplotlib.pyplot as plt
|
||
|
import numpy as np
|
||
|
import json
|
||
|
|
||
|
from pyqcs import State, H, X, S, CZ, CX, list_to_circuit
|
||
|
from pyqcs.graph.state import GraphState
|
||
|
from pyqcs.util.to_diagram import circuit_to_diagram
|
||
|
|
||
|
circuit = (H(0)
|
||
|
| list_to_circuit([CX(i, 0) for i in range(1, 5)]))
|
||
|
|
||
|
#circuit = (list_to_circuit([H(i) for i in range(0, 5)])
|
||
|
# | list_to_circuit([CZ(i, 0) for i in range(1, 5)])
|
||
|
# | list_to_circuit([H(i) for i in range(1, 5)]))
|
||
|
|
||
|
print(circuit_to_diagram(circuit))
|