qldpc.circuits.memory.alpha_syndrome
Classes to define the AlphaSyndrome syndrome measurement strategies.
Attributes
Classes
AlphaSyndrome strategy for constructing a syndrome measurement circuit. |
|
Node of a tree for Monte Carlo tree search (MCTS). |
|
The state of an MCTS tree, representing a (possibly incomplete) gate schedule. |
Module Contents
- class qldpc.circuits.memory.alpha_syndrome.AlphaSyndrome(noise_model: qldpc.circuits.noise_model.NoiseModel, decoder: sinter.Decoder | str = DEFAULT_SINTER_DECODER, iters_per_step: int = 1000, shots_per_iter: int = 10000, exploration_weight: float = math.sqrt(2), *, verbose: bool = True, seed: int | None = None)[source]
Bases:
qldpc.circuits.memory.syndrome_measurement.SyndromeMeasurementStrategyAlphaSyndrome strategy for constructing a syndrome measurement circuit.
Uses Monte-Carlo tree search (MCTS) to suppress hook errors. Currently only supports CSS codes.
For more information, see the paper at https://arxiv.org/abs/2601.12509.
WARNING: This strategy is extremely SLOW due to unsolved problem with multiprocessing and MCTS.
- get_circuit(code: qldpc.codes.QuditCode, qubit_ids: qldpc.circuits.bookkeeping.QubitIDs | None = None) tuple[stim.Circuit, qldpc.circuits.bookkeeping.MeasurementRecord][source]
Construct a circuit to measure the syndromes of a quantum error-correcting code.
- Parameters:
code – The code whose syndromes we want to measure.
qubit_ids – Integer indices for the data and check (syndrome readout) qubits. Defaults to QubitIDs.from_code(code).
- Returns:
A syndrome measurement circuit. circuits.MeasurementRecord: The record of measurements in the circuit.
- Return type:
stim.Circuit
- exploration_weight
- iters_per_step = 1000
- noise_model
- random
- shots_per_iter = 10000
- sinter_decoding_kwargs: dict[str, str | dict[str, sinter.Decoder]]
- verbose = True
- class qldpc.circuits.memory.alpha_syndrome.TreeNode(state: TreeState, parent: TreeNode | None = None)[source]
Node of a tree for Monte Carlo tree search (MCTS).
TreeNode is agnostic to the problem being solved by MCTS. All problem data is handled by the TreeState.
References: - https://en.wikipedia.org/wiki/Monte_Carlo_tree_search
- best_child(exploration_weight: float) TreeNode[source]
Select a child of this node with the highest UCB score.
- is_terminal() bool[source]
Is this a terminal node of the tree, which specifies a complete schedule?
- simulate(rng: random.Random | None = None) TreeState[source]
Select transitions at random until we reach a terminal node, and return its state.
- parent = None
- state
- unvisited
- value = 0.0
- visits = 0
- class qldpc.circuits.memory.alpha_syndrome.TreeState[source]
The state of an MCTS tree, representing a (possibly incomplete) gate schedule.
- static head(gates: collections.abc.Sequence[tuple[int, int]]) TreeState[source]
A TreeState in which no gates have been scheduled.
- to_schedule() GateSchedule[source]
Convert this TreeState into a gate schedule.
The schedule is provided as a list whose t-th entry is a list of gates to apply at time t. Unscheduled gates are excluded from the returned schedule.
- gate_to_time: list[int | None]
- gates: list[tuple[int, int]]
- target_to_min_time: list[int]
- qldpc.circuits.memory.alpha_syndrome.DEFAULT_SINTER_DECODER
- qldpc.circuits.memory.alpha_syndrome.GateSchedule