# Qiskit: 'per shot' result

Is there a way to access the results of measurements 'per shot' performed on a backend such as one of the real IBM machines?

I know it can generate a histogram from the cumulative data, but I was wondering if it is possible to see what the measurement outcomes were for a particular shot out of the standard 1024.

There is indeed. You just need to use get_memory() instead of get_counts() (and also use a memory=True flag in the execute function. It works with the local qasm simulator and the 5 qubit device (and not currently with the cloud-based qasm simulator or 14 qubit device).

Here's an example using it to generate a series of random bits.

q = QuantumRegister(1)
c = ClassicalRegister(1)
circ = QuantumCircuit(q, c)

circ.h(q)

circ.measure(q,c)

job = execute(circ, Aer.get_backend('qasm_simulator'), shots=10024, memory=True)
data = job.result().get_memory()

• Thank you, this worked when I changed to BasicAer. Are there plans to extend to the other IBM machines? – Caleb GS Jan 30 '19 at 11:43
• All new machine will have it, I think. But for upgrades, I don’t know what the timescales are. – James Wootton Jan 30 '19 at 11:45