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