mqt.qecc.cc_decoder.decoder¶
LightsOut MaxSAT-based decoder for the hexagonal color code.
Classes¶
Lights out problem representation. |
Functions¶
|
Simulate the logical error rate for a given distance and error rate. |
|
Run the decoding simulation for a given distance and error rate. |
Module Contents¶
- class LightsOut[source]¶
Lights out problem representation.
- preconstruct_parity_constraint(light: int, indices: list[int]) None[source]¶
Preconstruct the parity constraints for a light.
Adds all constraint to the optimizer that are independent of the value of the light.
- complete_parity_constraint(light: int, indices: list[int], val: bool) None[source]¶
Completes the parity constraints for a light.
Adds the constraint that is dependent on the value of the light.
- preconstruct_z3_instance(weights: numpy.typing.NDArray[numpy.float64] | None = None) None[source]¶
Preconstruct the z3 instance for the lights-out problem.
Creates all necessary variables, adds the known parts of the parity constraints. Soft constraints are added to the optimizer with default weights.