以下は、このプロジェクトのために IBM でアカウントを作成した jupyter ノートブックで実行したコードです。助けてください !
import qiskit as q
import numpy as np
import matplotlib
%matplotlib inline
circuit = q.QuantumCircuit(2 , 2) # 2 qubit and 2 classical bits
#currently: (0,0)
circuit.x(0)
#now : (1,0)
circuit.cx(0 , 1) #cnot gate , controlled NOT gate , it flips 2nd bit if 1 quibit is 1
# now : (1 , 1)
circuit.measure([0,1],[0,1]) # map quibit to bits
circuit.draw(output="mpl") # ascii of circuit
from qiskit import IBMQ
IBMQ.save_account('MY_TOKEN_NUMBER',overwrite=True) #save your creds
IBMQ.load_account()
#got this as output to prev line of code :
# <AccountProvider for IBMQ(hub='ibm-q', group='open', project='main')>
provider = IBMQ.get_provider(q.providers.baseprovider)