Pauli Frame

graphqomb.pauli_frame module

Pauli frame for Measurement-based Quantum Computing.

This module provides:

  • PauliFrame: A class to track the Pauli frame of a quantum computation.

Pauli Frame Class

class graphqomb.pauli_frame.PauliFrame[source]

Pauli frame tracker.

graphstate

Set of nodes in the resource graph

Type:

BaseGraphState

xflow

X correction flow for each measurement flip

Type:

dict[int, set[int]

zflow

Z correction flow for each measurement flip

Type:

dict[int, set[int]

x_pauli

Current X Pauli state for each node

Type:

dict[int, bool]

z_pauli

Current Z Pauli state for each node

Type:

dict[int, bool]

parity_check_group

Parity check group for FTQC

Type:

list[set[int]]

inv_xflow

Inverse X correction flow for each measurement flip

Type:

dict[int, set[int]]

inv_zflow

Inverse Z correction flow for each measurement flip

Type:

dict[int, set[int]]

__init__(graphstate, xflow, zflow, parity_check_group=None, logical_observables=None)[source]
x_flip(node)[source]

Flip the X Pauli mask for the given node.

Parameters:

node (int) – The node to flip.

z_flip(node)[source]

Flip the Z Pauli mask for the given node.

Parameters:

node (int) – The node to flip.

meas_flip(node)[source]

Update the Pauli frame for a measurement flip based on the given correction flows.

Parameters:

node (int) – The node to flip.

children(node)[source]

Get the children of a node in the Pauli frame.

Parameters:

node (int) – The node to get children for.

Returns:

The set of child nodes.

Return type:

set[int]

parents(node)[source]

Get the parents of a node in the Pauli frame.

Parameters:

node (int) – The node to get parents for.

Returns:

The set of parent nodes.

Return type:

set[int]

detector_groups()[source]

Get the parity check groups.

Returns:

The parity check groups.

Return type:

list[set[int]]

logical_observables_group(target_nodes)[source]

Get the logical observables group for the given target nodes.

Parameters:

target_nodes (collections.abc.Collection[int]) – The target nodes to get the logical observables group for.

Returns:

The logical observables group for the given target nodes.

Return type:

set[int]