Skip to content

Instantly share code, notes, and snippets.

@rish-16
Last active June 5, 2019 04:11
Show Gist options
  • Select an option

  • Save rish-16/05d1201ff79084af693cb25ecadde562 to your computer and use it in GitHub Desktop.

Select an option

Save rish-16/05d1201ff79084af693cb25ecadde562 to your computer and use it in GitHub Desktop.
'''
`n` is the number of Qubits needed to
generate a a random number between
0 and 2^n - 1
'''
n = 3
'''
Creating a Quantum Register with `n` Qubits and
`n` Classical Bits where n=3
'''
q = qk.QuantumRegister(n)
c = qk.ClassicalRegister(n)
circ = qk.QuantumCircuit(q, c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment