Skip to content

Instantly share code, notes, and snippets.

@Israel-Miles
Created February 21, 2022 00:08
Show Gist options
  • Save Israel-Miles/96bf72fa98fe3f7f951b3a19b8bec791 to your computer and use it in GitHub Desktop.
Save Israel-Miles/96bf72fa98fe3f7f951b3a19b8bec791 to your computer and use it in GitHub Desktop.
# Build a quantum circuit
circuit = QuantumCircuit(3, 3)
circuit.x(1)
circuit.h(range(3))
circuit.cx(0, 1)
circuit.measure(range(3), range(3));
# Print the circuit
circuit.draw()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment