diff --git a/docs/how_tos/1-how-to-create-codes.ipynb b/docs/how_tos/1-how-to-create-codes.ipynb index 73c7ced4..2baddf99 100644 --- a/docs/how_tos/1-how-to-create-codes.ipynb +++ b/docs/how_tos/1-how-to-create-codes.ipynb @@ -240,7 +240,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -290,7 +290,7 @@ "# Load the minifold to be tiled\n", "from qiskit_qec.geometry.plane import Plane\n", "\n", - "# Load the lattive class to tile against\n", + "# Load the lattice class to tile against\n", "from qiskit_qec.geometry.lattice import Lattice\n", "\n", "# Create a code factory\n", diff --git a/docs/tutorials/QEC_Framework_IEEE_2022.ipynb b/docs/tutorials/QEC_Framework_IEEE_2022.ipynb index 0cee3123..63538338 100644 --- a/docs/tutorials/QEC_Framework_IEEE_2022.ipynb +++ b/docs/tutorials/QEC_Framework_IEEE_2022.ipynb @@ -2099,7 +2099,7 @@ "![image13.png](attachment:0e37e976-1396-41e9-9f73-d1be2788bc48.png)\n", "\n", "\n", - "TileFactories use a simplified approach where by the region on the surface is tiled using a choosen tile relative to a lattice on that region. For example the second tiling above used the four square tile bedlow with the regulat lattive $\\mathbb{Z}^2$:" + "TileFactories use a simplified approach where by the region on the surface is tiled using a choosen tile relative to a lattice on that region. For example the second tiling above used the four square tile bedlow with the regulat lattice $\\mathbb{Z}^2$:" ] }, { diff --git a/src/qiskit_qec/analysis/distance.py b/src/qiskit_qec/analysis/distance.py index de1ac006..8f6ccf79 100644 --- a/src/qiskit_qec/analysis/distance.py +++ b/src/qiskit_qec/analysis/distance.py @@ -95,7 +95,7 @@ def _minimum_distance_2_python(stabilizer: np.ndarray, gauge: np.ndarray, max_we stabilizer is a symplectic matrix generating the stabilizer group. gauge is a symplectic matrix generating the gauge group, if any. - Second method based on parititioning errors. + Second method based on partitioning errors. Restrictions: n < 63 to avoid overflows in numpy @@ -194,7 +194,7 @@ def _minimum_distance_2_compiled(stabilizer: np.ndarray, gauge: np.ndarray, max_ stabilizer is a symplectic matrix generating the stabilizer group. gauge is a symplectic matrix generating the gauge group, if any. - Second method based on parititioning errors, using compiled implementation. + Second method based on partitioning errors, using compiled implementation. Returns the minimum distance of the code, or 0 if greater than max_weight. """ diff --git a/src/qiskit_qec/analysis/extensions.py b/src/qiskit_qec/analysis/extensions.py index 31f03a40..c5d3c412 100644 --- a/src/qiskit_qec/analysis/extensions.py +++ b/src/qiskit_qec/analysis/extensions.py @@ -15,7 +15,7 @@ logger = logging.getLogger(__name__) -# Load extensions if available and set appriate indicator flags +# Load extensions if available and set appropriate indicator flags try: from qiskit_qec.analysis._c_analysis import _CErrorPropagator # pylint: disable=unused-import diff --git a/src/qiskit_qec/analysis/faultenumerator.py b/src/qiskit_qec/analysis/faultenumerator.py index 910ace1e..69d348b8 100644 --- a/src/qiskit_qec/analysis/faultenumerator.py +++ b/src/qiskit_qec/analysis/faultenumerator.py @@ -94,7 +94,7 @@ def __init__( else: self.model = model if method not in self.AVAILABLE_METHODS: - raise QiskitQECError("fmethod {method} is not supported.") + raise QiskitQECError(f"method {method} is not supported.") self.method = method self.location_types = self.model.get_operations() self.pauli_error_types = self.model.get_pauli_error_types() diff --git a/src/qiskit_qec/analysis/faultsampler.py b/src/qiskit_qec/analysis/faultsampler.py index 33b9ab87..e1ae02e6 100644 --- a/src/qiskit_qec/analysis/faultsampler.py +++ b/src/qiskit_qec/analysis/faultsampler.py @@ -48,7 +48,7 @@ def __init__( """ self.model = model if method not in self.AVAILABLE_METHODS: - raise QiskitQECError("fmethod {methid} is not supported.") + raise QiskitQECError(f"method {method} is not supported.") self.method = method self.location_types = self.model.get_operations() diff --git a/src/qiskit_qec/circuits/css_code.py b/src/qiskit_qec/circuits/css_code.py index 6a9e69b3..0f772eb3 100644 --- a/src/qiskit_qec/circuits/css_code.py +++ b/src/qiskit_qec/circuits/css_code.py @@ -59,10 +59,10 @@ def __init__( 'n' (number of qubits), T: Number of syndrome measurement rounds basis: basis for encoding ('x' or 'z') - round_schedule: Order in which to measureme gauge operators ('zx' or 'xz') + round_schedule: Order in which to measurement gauge operators ('zx' or 'xz') noise_model: Pauli noise model used in the construction of noisy circuits. - If a tuple, a pnenomological noise model is used with the entries being - probabity of depolarizing noise on code qubits between rounds and + If a tuple, a phenomenological noise model is used with the entries being + probability of depolarizing noise on code qubits between rounds and probability of measurement errors, respectively. Examples: diff --git a/src/qiskit_qec/circuits/extensions.py b/src/qiskit_qec/circuits/extensions.py index b8c2cdc8..3d110119 100644 --- a/src/qiskit_qec/circuits/extensions.py +++ b/src/qiskit_qec/circuits/extensions.py @@ -17,7 +17,7 @@ logger = logging.getLogger(__name__) -# Load extensions if available and set appriate indicator flags +# Load extensions if available and set appropriate indicator flags try: from qiskit_qec.analysis._c_circuits import _c_check_nodes diff --git a/src/qiskit_qec/circuits/intern/arctools.cpp b/src/qiskit_qec/circuits/intern/arctools.cpp index b9372f0a..10a31b94 100644 --- a/src/qiskit_qec/circuits/intern/arctools.cpp +++ b/src/qiskit_qec/circuits/intern/arctools.cpp @@ -27,7 +27,7 @@ std::vector check_nodes( std::vector output; // we convert to flat nodes, which are a std::tuple with (q0, q1, boundary/logical) - // here boundary/logical is 0 if the node is neither boundary or logical, 1 for logical, 2 for bounary and 3 for both + // here boundary/logical is 0 if the node is neither boundary or logical, 1 for logical, 2 for boundary and 3 for both // if we have an even number of corresponding nodes, they cancel std::map, int> node_counts; for (auto & node : nodes) { diff --git a/src/qiskit_qec/codes/codebase/__init__.py b/src/qiskit_qec/codes/codebase/__init__.py index f13e022f..01717efb 100644 --- a/src/qiskit_qec/codes/codebase/__init__.py +++ b/src/qiskit_qec/codes/codebase/__init__.py @@ -252,7 +252,7 @@ def _search( continue return codes else: - raise QiskitError("Only mempory method currently implemented") + raise QiskitError("Only memory method currently implemented") def in_range(self, n, k, index) -> bool: """_summary_ diff --git a/src/qiskit_qec/codes/codebuilders/heavyhex_code_builder.py b/src/qiskit_qec/codes/codebuilders/heavyhex_code_builder.py index 23dc05fb..a61258d9 100644 --- a/src/qiskit_qec/codes/codebuilders/heavyhex_code_builder.py +++ b/src/qiskit_qec/codes/codebuilders/heavyhex_code_builder.py @@ -63,7 +63,7 @@ def __init__( dx = d dz = d elif dx is None or dz is None: - raise QiskitError(f"Both dx:{dx} and dz:{dz} must be speicifed.") + raise QiskitError(f"Both dx:{dx} and dz:{dz} must be specified.") elif not bool(dx % 2) or dx < 3 or not bool(dz % 2) or dz < 3: raise QiskitError(f"dx:{dx} and dz:{dz} must be odd positive integers ≥ 3") diff --git a/src/qiskit_qec/codes/codebuilders/rotated_subsystem_surface_code_builder.py b/src/qiskit_qec/codes/codebuilders/rotated_subsystem_surface_code_builder.py index 8a89ef88..291c4396 100644 --- a/src/qiskit_qec/codes/codebuilders/rotated_subsystem_surface_code_builder.py +++ b/src/qiskit_qec/codes/codebuilders/rotated_subsystem_surface_code_builder.py @@ -64,7 +64,7 @@ def __init__( dx = d dz = d elif dx is None or dz is None: - raise QiskitError(f"Both dx:{dx} and dz:{dz} must be speicifed.") + raise QiskitError(f"Both dx:{dx} and dz:{dz} must be specified.") elif not bool(dx % 2) or dx < 3 or not bool(dz % 2) or dz < 3: raise QiskitError(f"dx:{dx} and dz:{dz} must be odd positive integers ≥ 3") diff --git a/src/qiskit_qec/codes/codebuilders/rotated_surface_code_builer.py b/src/qiskit_qec/codes/codebuilders/rotated_surface_code_builer.py index 9abfa3db..ef10846b 100644 --- a/src/qiskit_qec/codes/codebuilders/rotated_surface_code_builer.py +++ b/src/qiskit_qec/codes/codebuilders/rotated_surface_code_builer.py @@ -47,7 +47,7 @@ def __init__( d: distance of code dx (optional): X distance of code. Default is d. dz (optional): Z distance of code. Default is d. - ul_op (optional): operator type for upper left corder weight + ul_op (optional): operator type for upper left corner weight four stabilizer operator. Examples: @@ -61,7 +61,7 @@ def __init__( dx = d dz = d elif dx is None or dz is None: - raise QiskitError(f"Both dx:{dx} and dz:{dz} must be speicifed.") + raise QiskitError(f"Both dx:{dx} and dz:{dz} must be specified.") elif not bool(dx % 2) or dx < 3 or not bool(dz % 2) or dz < 3: raise QiskitError(f"dx:{dx} and dz:{dz} must be odd positive integers ≥ 3") diff --git a/src/qiskit_qec/codes/codebuilders/subsystem_surface_code_builder.py b/src/qiskit_qec/codes/codebuilders/subsystem_surface_code_builder.py index 7e651b2f..2ccba65a 100644 --- a/src/qiskit_qec/codes/codebuilders/subsystem_surface_code_builder.py +++ b/src/qiskit_qec/codes/codebuilders/subsystem_surface_code_builder.py @@ -65,7 +65,7 @@ def __init__( dx = d dz = d elif dx is None or dz is None: - raise QiskitError(f"Both dx:{dx} and dz:{dz} must be speicifed.") + raise QiskitError(f"Both dx:{dx} and dz:{dz} must be specified.") elif not bool(dx % 2) or dx < 3 or not bool(dz % 2) or dz < 3: raise QiskitError(f"dx:{dx} and dz:{dz} must be odd positive integers ≥ 3") diff --git a/src/qiskit_qec/codes/codebuilders/surface_code_builder.py b/src/qiskit_qec/codes/codebuilders/surface_code_builder.py index 51590f6a..ea6f598f 100644 --- a/src/qiskit_qec/codes/codebuilders/surface_code_builder.py +++ b/src/qiskit_qec/codes/codebuilders/surface_code_builder.py @@ -64,7 +64,7 @@ def __init__( dx = d dz = d elif dx is None or dz is None: - raise QiskitError(f"Both dx:{dx} and dz:{dz} must be speicifed.") + raise QiskitError(f"Both dx:{dx} and dz:{dz} must be specified.") elif not bool(dx % 2) or dx < 3 or not bool(dz % 2) or dz < 3: raise QiskitError(f"dx:{dx} and dz:{dz} must be odd positive integers ≥ 3") diff --git a/src/qiskit_qec/codes/codebuilders/yzx2_code_builder.py b/src/qiskit_qec/codes/codebuilders/yzx2_code_builder.py index d1c7c821..edddf105 100644 --- a/src/qiskit_qec/codes/codebuilders/yzx2_code_builder.py +++ b/src/qiskit_qec/codes/codebuilders/yzx2_code_builder.py @@ -70,7 +70,7 @@ def __init__(self, d: int) -> None: # Exclude method used to select the required boundary # pylint: disable=unused-variable, unused-argument def exclude(vertex_paths, qubit_data: QubitData) -> bool: - """exlude method for Shell class to use for building boundary operators""" + """exclude method for Shell class to use for building boundary operators""" def _weight_len(path) -> int: """Find the weight of the operator from the vertex path listing""" diff --git a/src/qiskit_qec/codes/codefactory/tilecodefactory.py b/src/qiskit_qec/codes/codefactory/tilecodefactory.py index 7a68c684..3deae255 100644 --- a/src/qiskit_qec/codes/codefactory/tilecodefactory.py +++ b/src/qiskit_qec/codes/codefactory/tilecodefactory.py @@ -32,7 +32,7 @@ class TileCodeFactory: - """ "Tile Code Factory""" + """Tile Code Factory""" MANIFOLD_PARAMETERS = ["manifold"] TILE_PARAMETERS = ["tile", "tile_optype"] @@ -341,11 +341,11 @@ def plot( cutter_color (str, optional): _description_. Defaults to "magenta". Raises: - QiskitError: No shell, cutter or lattive provided + QiskitError: No shell, cutter or lattice provided """ if lattice is None and cutter is None and shell is None: - raise QiskitError("No shell, cutter or lattive provided") + raise QiskitError("No shell, cutter or lattice provided") if figsize is None: figsize = (10, 10) diff --git a/src/qiskit_qec/codes/stabsubsystemcodes.py b/src/qiskit_qec/codes/stabsubsystemcodes.py index 151f75cc..53eadc63 100644 --- a/src/qiskit_qec/codes/stabsubsystemcodes.py +++ b/src/qiskit_qec/codes/stabsubsystemcodes.py @@ -42,7 +42,7 @@ def __init__( Args: gauge_group (optional): Gauge group defining the subsystem. Defaults to None. - shell (optional): Shell definging the subsystem. Defaults to None. + shell (optional): Shell defining the subsystem. Defaults to None. qubit_data (optional): Qubit data associated with defining shell. Defaults to None. qubit_count (optional): Qubit count data associated with defining shell. Defaults to None. @@ -103,6 +103,6 @@ def generators(self) -> PauliList: return self.gauge_group.generators def draw(self, **kwargs) -> None: - """Draws the subsytem code if a shell exists""" + """Draws the subsystem code if a shell exists""" if self.shell is not None: self.shell.draw(qubit_data=self.qubit_data, qubit_count=self.qubit_count, **kwargs) diff --git a/src/qiskit_qec/decoders/classic/fibonacci_decoder.py b/src/qiskit_qec/decoders/classic/fibonacci_decoder.py index fcbde9f4..5c9f57ca 100644 --- a/src/qiskit_qec/decoders/classic/fibonacci_decoder.py +++ b/src/qiskit_qec/decoders/classic/fibonacci_decoder.py @@ -9,7 +9,7 @@ # Any modifications or derivative works of this code must retain this # copyright notice, and modified files need to carry a notice indicating # that they have been altered from the originals. -"""Decoder for Spanning Errors on the the ClassicFibonacciCode""" +"""Decoder for Spanning Errors on the ClassicFibonacciCode""" import copy import logging import math @@ -142,7 +142,7 @@ def decode_prob(self, syndrome: np.array): return res[self.fund_hori_probe_indx], res[self.fund_verti_probe_indx], res def bit_to_rc(self, bit: int): - """Maps maps from bit index (0 to (L**2)//2) - 1) to (row, column) indexing + """Maps from bit index (0 to (L**2)//2) - 1) to (row, column) indexing In bit notation we think of all the bits of the codeword as being in a line: So we have bit 0, bit 1, ... all the way until the last bit ((L**2)//2) - 1 @@ -181,7 +181,7 @@ def bit_to_rc(self, bit: int): return (rindx, cindx) def rc_to_bit(self, row: int, col: int): - """Maps maps from (row, column) index to bit index (0 to (L**2)//2) - 1) + """Maps from (row, column) index to bit index (0 to (L**2)//2) - 1) In bit notation we think of all the bits of the codeword as being in a line: So we have bit 0, bit 1, ... all the way until the last bit ((L**2)//2) - 1 diff --git a/src/qiskit_qec/decoders/decoding_graph.py b/src/qiskit_qec/decoders/decoding_graph.py index 31ac0b4b..497de3ff 100644 --- a/src/qiskit_qec/decoders/decoding_graph.py +++ b/src/qiskit_qec/decoders/decoding_graph.py @@ -71,7 +71,7 @@ def __init__(self, code, brute=False, graph=None, hyperedges=None): def update_attributes(self): """ Calculates properties of the graph used by `node_index` and `edge_in_graph`. - If `graph` is updated this method should called to update these properties. + If `graph` is updated this method should be called to update these properties. """ self._edge_set = set(self.graph.edge_list()) self._node_index = {} @@ -82,7 +82,7 @@ def update_attributes(self): def node_index(self, node): """ - Given a node of `graph`, returns the corrsponding index. + Given a node of `graph`, returns the corresponding index. Args: node (DecodingGraphNode): Node of the graph. @@ -188,7 +188,7 @@ def get_error_probs( shots = sum(counts.values()) if method not in self.AVAILABLE_METHODS: - raise QiskitQECError("fmethod {method} is not supported.") + raise QiskitQECError(f"method {method} is not supported.") # method for edges if method == self.METHOD_SPITZ: diff --git a/src/qiskit_qec/decoders/pymatching_decoder.py b/src/qiskit_qec/decoders/pymatching_decoder.py index cf9bd685..f41ed2b2 100644 --- a/src/qiskit_qec/decoders/pymatching_decoder.py +++ b/src/qiskit_qec/decoders/pymatching_decoder.py @@ -51,7 +51,7 @@ def _matching(self) -> Matching: def logical_flips(self, syndrome: Union[List[DecodingGraphNode], List[int]]) -> List[int]: """ Args: - syndrome: Either a list of DecodingGraphNode objects returnes by string2nodes, + syndrome: Either a list of DecodingGraphNode objects returned by string2nodes, or a list of binaries indicating which node is highlighted, e.g., the output of a stim detector sampler Returns: list of binaries indicating which logical is flipped @@ -85,7 +85,7 @@ def matched_edges( ) -> List[DecodingGraphEdge]: """ Args: - syndrome: Either a list of DecodingGraphNode objects returnes by string2nodes, + syndrome: Either a list of DecodingGraphNode objects returned by string2nodes, or a list of binaries indicating which node is highlighted. Returns: list of DecodingGraphEdge-s included in the matching """ diff --git a/src/qiskit_qec/geometry/lattice.py b/src/qiskit_qec/geometry/lattice.py index 65d7b75b..87190b3b 100644 --- a/src/qiskit_qec/geometry/lattice.py +++ b/src/qiskit_qec/geometry/lattice.py @@ -65,7 +65,7 @@ def __str__(self) -> str: if self.points is None: return f"Lattice(u_vec={np.array2string(self.u_vec, separator=', ')},\ v_vec={np.array2string(self.v_vec, separator=', ')})" - outstr = "Lattive[" + outstr = "Lattice[" for point in self.points[:-1]: outstr += np.array2string(point, separator=", ") outstr += ", " diff --git a/src/qiskit_qec/geometry/model/shell.py b/src/qiskit_qec/geometry/model/shell.py index de2df3dd..e441ce10 100644 --- a/src/qiskit_qec/geometry/model/shell.py +++ b/src/qiskit_qec/geometry/model/shell.py @@ -100,11 +100,11 @@ def exclude(vertex_paths: List[List[Vertex]], qubit_data: QubitData) -> bool: pass Will return a True value if the given operator (given by the vertex_paths) - is to be excluded. Deflault always returns False. That is exlude nothing + is to be excluded. Default always returns False. That is exclude nothing extra. boundary_strategy (str, optional): _description_. Defaults to "combine". debug (optional) : With debug set to True a range of intermediate details are printed. Used - for debuging the addition of features to the method. + for debugging the addition of features to the method. Returns: Tuple[Shell, QubitData, QubitCount]: _description_ @@ -157,7 +157,7 @@ def _find_restricted_path(s_vertex: Vertex) -> List[Vertex]: vertex_path.append(n_vertex) if n_vertex == v_start: - # Path is a cycle returing to start + # Path is a cycle returning to start return vertex_path edges_of_n_vertex = n_vertex.parents @@ -173,7 +173,7 @@ def _find_restricted_path(s_vertex: Vertex) -> List[Vertex]: if r_vertex == n_vertex: if is_inside[r_vertex]: - # self loop at end of path (should not really happend but just in case) + # self loop at end of path (should not really happened but just in case) vertex_path.append(r_vertex) return vertex_path diff --git a/src/qiskit_qec/geometry/model/wireframe.py b/src/qiskit_qec/geometry/model/wireframe.py index 92afc0bc..6ce36df7 100644 --- a/src/qiskit_qec/geometry/model/wireframe.py +++ b/src/qiskit_qec/geometry/model/wireframe.py @@ -23,7 +23,7 @@ def __init__(self, edges: List[Edge]) -> None: """Inits WireFrame A wireframe should have only a single connected component (but are not - linited to having a single component) + limited to having a single component) Args: edges (List[Edge]): Edges that comprise the WireFrame diff --git a/src/qiskit_qec/geometry/plane.py b/src/qiskit_qec/geometry/plane.py index 9ec3ed84..01310d91 100644 --- a/src/qiskit_qec/geometry/plane.py +++ b/src/qiskit_qec/geometry/plane.py @@ -27,7 +27,7 @@ def __init__(self): @staticmethod def ison(point): """Check that point is on the plane""" - # Qick check that point is on the + # Quick check that point is on the return point.shape == (2,) and len(point) == 2 @staticmethod diff --git a/src/qiskit_qec/info/properties.py b/src/qiskit_qec/info/properties.py index 1c97f237..bdf48338 100644 --- a/src/qiskit_qec/info/properties.py +++ b/src/qiskit_qec/info/properties.py @@ -27,7 +27,7 @@ class Properties: # that is used by the web server database as well as this class. Here # for now to get things moving. Also these fields are likely to change # as the final taxonomy is developed. Therefore code should not rely - # on the exact naming etc used below. So for example a used should + # on the exact naming etc used below. So for example a user should # not use CodeLibrarian.IS_CSS but instead use the string "is_css". # Boolean Fields diff --git a/src/qiskit_qec/noise/classic/fibonacci_spanning_noise_generator.py b/src/qiskit_qec/noise/classic/fibonacci_spanning_noise_generator.py index 8ef1e82f..b7f74391 100644 --- a/src/qiskit_qec/noise/classic/fibonacci_spanning_noise_generator.py +++ b/src/qiskit_qec/noise/classic/fibonacci_spanning_noise_generator.py @@ -37,10 +37,10 @@ def generate_spanning_error( generate_spanning_error will use as a base for it's error offset (int, optional): Offset for where spanning error begins. Offset will be a horizontal offset from the left if is_vertical=False and, otherwise, - a vertical offsetfrom the top if is_vertical=True). Defaults to 0. + a vertical offset from the top if is_vertical=True). Defaults to 0. probability_of_error (float, optional): Error probability. Defaults to 1e-7. width (int, optional): How wide the error should be. If is_vertical=True, width - willbe how wide the spanning error is across from left to right. Otherwrise, if + will be how wide the spanning error is across from left to right. Otherwise, if is_vertical=False width will be the height of the spanning error from top to bottom. Defaults to None. is_vertical (bool, optional): If true, the error will span top to bottom. Otherwise, diff --git a/src/qiskit_qec/structures/gauge_computations.py b/src/qiskit_qec/structures/gauge_computations.py index 26807a73..cdcd93c1 100644 --- a/src/qiskit_qec/structures/gauge_computations.py +++ b/src/qiskit_qec/structures/gauge_computations.py @@ -1 +1 @@ -"""Guage computations.""" +"""Gauge computations.""" diff --git a/src/qiskit_qec/utils/dag.py b/src/qiskit_qec/utils/dag.py index af5c63f3..7352f4c1 100644 --- a/src/qiskit_qec/utils/dag.py +++ b/src/qiskit_qec/utils/dag.py @@ -10,7 +10,7 @@ # copyright notice, and modified files need to carry a notice indicating # that they have been altered from the originals. -""" Utililities for Qiskit DAGs""" +""" Utilities for Qiskit DAGs""" from qiskit.dagcircuit.dagnode import DAGNode diff --git a/src/qiskit_qec/utils/decoding_graph_attributes.py b/src/qiskit_qec/utils/decoding_graph_attributes.py index 9571b4b2..487daf07 100644 --- a/src/qiskit_qec/utils/decoding_graph_attributes.py +++ b/src/qiskit_qec/utils/decoding_graph_attributes.py @@ -30,7 +30,7 @@ class DecodingGraphNode: Attributes: - is_boundary (bool): whether or not the node is a boundary node. - is_logical (bool): whether or not the node is a logical node. - - time (int): what syndrome node the node corrsponds to. Doesn't + - time (int): what syndrome node the node corresponds to. Doesn't need to be set if it's a boundary node. - qubits (List[int]): List of indices which are stabilized by this ancilla. diff --git a/src/qiskit_qec/utils/decodoku.py b/src/qiskit_qec/utils/decodoku.py index fafcaada..16bfb4b2 100644 --- a/src/qiskit_qec/utils/decodoku.py +++ b/src/qiskit_qec/utils/decodoku.py @@ -35,7 +35,7 @@ def __init__(self, p=0.1, k=2, d=10, process=None, errors=None, nonabelian=False d (int): Code distance. process (Callable): Function cluster and decode syndrome. errors (list): List of tuples of the form `(x0, y0, x1, y1)`, specifying the - coordinates of the plaquttes either side of the error. + coordinates of the plaquettes either side of the error. nonabelian (bool): Whether to present as non-Abelian anyons. """ self.p = p diff --git a/src/qiskit_qec/utils/pauli_rep.py b/src/qiskit_qec/utils/pauli_rep.py index acc8566e..34a3a8ae 100644 --- a/src/qiskit_qec/utils/pauli_rep.py +++ b/src/qiskit_qec/utils/pauli_rep.py @@ -100,13 +100,13 @@ # Different string syntax formats are available. The they are "product" syntax and # "index" syntax. "product" syntax represents a Pauli operator of the form # :math: $p * T_1 \otimes T_2 \otimes ... \otimes T_n$ as :math" $pT1T2T3...Tn$. See the -# following exmaples: +# following examples: # # -iX \otimes Y \otimes Z -> -iXYZ # X \otimes Y \otimes Z \otimes I \otimes I \otimes I -> XYZII # # The index syntax only represents the non identity Paulis. Index syntax specifically -# indiciates the index that the Pauli's are acting on. Following Qiskit's current internal +# indicates the index that the Pauli's are acting on. Following Qiskit's current internal # indexing: # # -iX \otimes Y \otimes Z -> -iZ0Y1X2 diff --git a/src/qiskit_qec/utils/visualizations.py b/src/qiskit_qec/utils/visualizations.py index 6dc9db25..4558c824 100644 --- a/src/qiskit_qec/utils/visualizations.py +++ b/src/qiskit_qec/utils/visualizations.py @@ -26,7 +26,7 @@ class Pixel: def __init__(self, layout, active=False): """ Args: - layout (ipywidgets.Layout): Layout in which which the pixels are embedded. + layout (ipywidgets.Layout): Layout in which the pixels are embedded. active (bool): Whether the pixels should be clickable. """ self.disabled = not active