I'm trying to run X gates on 2 qubits and then return the chance of the qubit in either state as a decimal. I've searched for answers but I haven't gotten anywhere.
##THE CODE##
import math
import numpy as np
from qiskit import *
from qiskit.providers.aer.extensions.snapshot_probabilities import *
#call for qubits
q = QuantumRegister(2)
c = ClassicalRegister(2)
#creates qubits and classical bits
qc = QuantumCircuit(q, c)
#applys a half not ad
for i in range(2):
qc.u3(0.5 * math.pi,0,0, q[i])
# Map the quantum measurement to the classical bits
for i in range(2):
qc.measure(q[i], c[i])
# Execute the circuit on the qasm simulator
simulator = Aer.get_backend('qasm_simulator')
job = execute(qc, simulator, shots=1000)
result = job.result()
counts = result.get_counts(qc)
## END OF CODE##