supermarq.benchmarks.phase_code
Classes
Creates a circuit for syndrome measurement in a phase-flip error correcting code. |
Module Contents
- class supermarq.benchmarks.phase_code.PhaseCode(num_data_qubits: int, num_rounds: int, phase_state: list[int])
Bases:
supermarq.benchmark.BenchmarkCreates a circuit for syndrome measurement in a phase-flip error correcting code.
- Parameters:
num_data – The number of data qubits.
num_rounds – The number of measurement rounds.
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.
- circuit() cirq.Circuit
Generates phase code circuit.
- Returns:
A cirq.Circuit.
- 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.
- Parameters:
counts – Dictionary containing the measurement counts from running self.circuit().
- Returns:
A float with the computed score.
- num_data_qubits
- num_rounds
- phase_state