Skip to content

Commit

Permalink
Update the example to a single swap gate
Browse files Browse the repository at this point in the history
It works
  • Loading branch information
jond01 committed Oct 28, 2021
1 parent dae8d28 commit 36e9c13
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion quantum-viz/quantum_viz/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ def display(circuit: QuantumCircuit) -> str:
if __name__ == "__main__":
from qiskit.circuit.random import random_circuit

qc = random_circuit(1, 5, measure=True)
# qc = random_circuit(2, 1, measure=True)
qc = QuantumCircuit(2)
qc.swap(0, 1)
print(qc.draw())
display(qc)

0 comments on commit 36e9c13

Please sign in to comment.