I'm trying to run some simulations of my quantum circuits using qasm simulator. I first tried to import the noise data from a quantum device and then use that information on qasm. Here's part of my code:
provider = IBMQ.load_account() backend = provider.get_backend('ibmq_casablanca') noise_model = NoiseModel.from_backend(backend) coupling_map = backend.configuration().coupling_map basis_gates = noise_model.basis_gates result = execute(circ, Aer.get_backend('qasm_simulator'), coupling_map = coupling_map, basis_gates = basis_gates, noise_model = noise_model).result()
When I return
type(result), it seems like the code is working, but I could not get any counts from here. It returns me
QiskitError: 'No counts for experiment "0"' as I attempted
counts = result.get_counts(0). I wonder am I really running the simulation? How can I get the counts? Thanks for the help!