SpinCircuitSolver.draw_shots¶
- SpinCircuitSolver.draw_shots(measurement_distribution)[source]¶
A helper function to draw counts from a given distribution of measurement outcomes.
- Parameters:
measurement_distribution (
List
[float
]) – List of probabilities of the individual measurement outcomes.- Returns:
A list of individual measurement results, e.g. [“12 3 4”, “0 4 9”, …] The outcome of each shot is denoted by a space-delimited string “a1 a2 a3 …” where \(a_i\) is the measured level of the spin with possible values ranging from 0 to 2S The \(a_i\) are in reverse order of the spins of the register to comply with qiskit’s little endian convention.
- Return type:
outcome_memory
- Raises:
If the length of the given probabilities does not math the expected Hilbert space dimension. - If the dimension is not a power of the spin length of the solver. - If the number of shots self.shots has not been specified.