Skip to content

Instantly share code, notes, and snippets.

@SaraM92
Created February 13, 2023 07:08
Show Gist options
  • Save SaraM92/c5ad21fdb4cc3005af01f708ce90f2f4 to your computer and use it in GitHub Desktop.
Save SaraM92/c5ad21fdb4cc3005af01f708ce90f2f4 to your computer and use it in GitHub Desktop.
#Import needed libraries
import strangeworks
import strangeworks.cirq
import cirq
#Define needed qubits
q0 = cirq.NamedQubit('q0')
q1 = cirq.NamedQubit('q1')
#Create circuit
circuit = cirq.Circuit()
#Add gates to the circuit
circuit.append(cirq.H(q0))
circuit.append(cirq.CNOT(q0, q1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment