hardware-starter

1import strangeworks.qiskit
2import qiskit
3
4qc = qiskit.QuantumCircuit(2, 2)
5qc.h(0)
6qc.cx(0, 1)
7qc.measure([0, 1], [0, 1])
8
9# uncomment the next line if you have more than one account
10# backend = strangeworks.qiskit.get_backend("ibmqx2", account_id="ibm")
11backend = strangeworks.qiskit.get_backend("ibmqx2")
12
13job = qiskit.execute(qc, backend, shots=50)
14result = job.result()
15print("result:", result)
16counts = result.get_counts()
17print("counts:", counts)