Result.get_memory¶
- Result.get_memory(experiment=None)[source]¶
Get the sequence of memory states (readouts) for each shot The data from the experiment is a list of format [‘00000’, ‘01000’, ‘10100’, ‘10100’, ‘11101’, ‘11100’, ‘00101’, …, ‘01010’]
- Parameters
experiment (str or QuantumCircuit or Schedule or int or None) – the index of the experiment, as specified by
data()
.- Returns
- Either the list of each outcome, formatted according to
registers in circuit or a complex numpy np.darray with shape:
meas_level
meas_return
shape
0
single
np.ndarray[shots, memory_slots, memory_slot_size]
0
avg
np.ndarray[memory_slots, memory_slot_size]
1
single
np.ndarray[shots, memory_slots]
1
avg
np.ndarray[memory_slots]
2
memory=True
list
- Return type
List[str] or np.ndarray
- Raises
QiskitError – if there is no memory data for the circuit.