Spaces:
Runtime error
Runtime error
File size: 336 Bytes
8757ddd |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import qiskit
from qiskit import QuantumCircuit,Aer
def superposition():
ckt=QuantumCircuit(1,1)
ckt.h(0) #HedaMart gate
ckt.measure(0,0)
sim=Aer.get_backend('aer_simulator') # A simulator
result=sim.run(ckt).result().get_counts()
return result
#res=superposition()
print(superposition()) |