SamplerRandomBitstrings#
- class iqm.qaoa.backends.SamplerRandomBitstrings[source]#
Bases:
SamplerBackendA sampler that ignores the QAOA and just produces random bitstrings of the correct length.
Methods
sample(qaoa_object, shots)Produce random bitstrings to act as samples from the QAOA.
- sample(qaoa_object, shots)[source]#
Produce random bitstrings to act as samples from the QAOA.
The
qaoa_objectis used only to get the number of qubits (which corresponds to the length of the bitstrings). The number of uniformly random bitstrings produced isshotsand they are arranged in a dictionary just like counts from aqiskitmeasurement.