cirq.google.pack_results¶
-
cirq.google.pack_results(measurements: Sequence[Tuple[str, numpy.ndarray]]) → bytes[source]¶ Pack measurement results into a byte string.
Parameters: measurements – A sequence of tuples, one for each measurement, consisting of a string key and an array of boolean data. The data should be a 2-D array indexed by (repetition, qubit_index). All data for all measurements must have the same number of repetitions. Returns: Packed bytes, as described in the unpack_results docstring below. Raises: ValueError if the measurement data do not have the compatible shapes.