SamplerRandomBitstrings#
- class iqm.qaoa.backends.SamplerRandomBitstrings[source]#
Bases:
SamplerBackend
A 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_object
is used only to get the number of qubits (which corresponds to the length of the bitstrings). The number of uniformly random bitstrings produced isshots
and they are arranged in a dictionary just like counts from aqiskit
measurement.