supermarq.benchmarks.bit_code ============================= .. py:module:: supermarq.benchmarks.bit_code Classes ------- .. autoapisummary:: supermarq.benchmarks.bit_code.BitCode Module Contents --------------- .. py:class:: BitCode(num_data_qubits: int, num_rounds: int, bit_state: list[int]) Bases: :py:obj:`supermarq.benchmark.Benchmark` Creates a circuit for syndrome measurement in a bit-flip error correcting code. :param num_data: The number of data qubits. :param num_rounds: The number of measurement rounds. :param bit_state: A list denoting the state to initialize each data qubit to. :returns: A `cirq.Circuit` for the bit-flip error correcting code. .. py:method:: circuit() -> cirq.Circuit Generates bit code circuit. :returns: A `cirq.Circuit`. .. py:method:: score(counts: dict[str, float]) -> float Compute benchmark score. Device performance is given by the Hellinger fidelity between the experimental results and the ideal distribution. The ideal is known based on the `bit_state` parameter. :param counts: Dictionary containing the measurement counts from running `self.circuit()`. :returns: A float with the computed score. .. py:attribute:: bit_state .. py:attribute:: num_data_qubits .. py:attribute:: num_rounds