supermarq.benchmarks.phase_code =============================== .. py:module:: supermarq.benchmarks.phase_code Classes ------- .. autoapisummary:: supermarq.benchmarks.phase_code.PhaseCode Module Contents --------------- .. py:class:: PhaseCode(num_data_qubits: int, num_rounds: int, phase_state: list[int]) Bases: :py:obj:`supermarq.benchmark.Benchmark` Creates a circuit for syndrome measurement in a phase-flip error correcting code. :param num_data: The number of data qubits. :param num_rounds: The number of measurement rounds. :param phase_state: A list of zeros and ones denoting the state to initialize each data qubit to. Currently just + or - states. 0 -> +, 1 -> -. :returns: A `cirq.Circuit` for the phase-flip error correcting code. .. py:method:: circuit() -> cirq.Circuit Generates phase 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 `phase_state` parameter. :param counts: Dictionary containing the measurement counts from running `self.circuit()`. :returns: A float with the computed score. .. py:attribute:: num_data_qubits .. py:attribute:: num_rounds .. py:attribute:: phase_state