Skip to content

Commit

Permalink
Merge branch 'main' into update-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
drewvandeth authored Aug 30, 2024
2 parents 12852b5 + 3b62430 commit 6a2f23a
Show file tree
Hide file tree
Showing 19 changed files with 456 additions and 544 deletions.
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"sphinx.ext.mathjax",
"sphinx.ext.viewcode",
"sphinx.ext.extlinks",
"sphinx.ext.napoleon",
"sphinx_autodoc_typehints",
"nbsphinx",
"matplotlib.sphinxext.plot_directive",
Expand Down
128 changes: 67 additions & 61 deletions docs/how_tos/1-how-to-create-codes.ipynb

Large diffs are not rendered by default.

12 changes: 5 additions & 7 deletions docs/how_tos/2-how-to-work-with-shape-objects.ipynb

Large diffs are not rendered by default.

69 changes: 0 additions & 69 deletions docs/tutorials/1-tutorial-example.ipynb

This file was deleted.

208 changes: 104 additions & 104 deletions docs/tutorials/QEC_Framework_IEEE_2022.ipynb

Large diffs are not rendered by default.

199 changes: 0 additions & 199 deletions docs/tutorials/how-to-use-union-find.ipynb

This file was deleted.

2 changes: 2 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ nbsphinx
ddt~=1.4.2
matplotlib>=3.3.0
black[jupyter]
pandoc
pylatexenc
2 changes: 1 addition & 1 deletion src/qiskit_qec/codes/codebuilders/surface_code_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __init__(
dz: Optional[int] = None,
ul_op: Optional[Pauli] = Pauli("Z"),
) -> None:
"""Initializes a surface code builder
r"""Initializes a surface code builder
If d is specified then dx and dz are ignored.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class TriangularColorCodeBuilder(Builder):

# pylint: disable=anomalous-backslash-in-string
def __init__(self, d: int) -> None:
"""Initializes a triangular color code builder
r"""Initializes a triangular color code builder
Example:d=3
o
Expand Down
4 changes: 2 additions & 2 deletions src/qiskit_qec/geometry/tiles/checkerboardtile.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

# pylint: disable=anomalous-backslash-in-string)
class CheckerBoardTile(Tile):
"""Checker Board Tile
r"""Checker Board Tile
The diagram is as follows::
Expand Down Expand Up @@ -127,7 +127,7 @@ def __new__(
operators=None,
optype="pXZXZ",
) -> Shell:
"""Creates a Checker Board Tile (Shell)
r"""Creates a Checker Board Tile (Shell)
::
Expand Down
4 changes: 2 additions & 2 deletions src/qiskit_qec/geometry/tiles/diagonalbartile.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

# pylint: disable=anomalous-backslash-in-string)
class DiagonalBarTile(Tile):
"""Diagonal Bar Tile
r"""Diagonal Bar Tile
The diagram is as follows::
q0 q1 q1 q2
Expand Down Expand Up @@ -112,7 +112,7 @@ def __new__(
operators=None,
optype="pXXZZXX",
) -> Shell:
"""Diagonal Hour Glass Tile
r"""Diagonal Hour Glass Tile
The diagram is as follows::
Expand Down
4 changes: 2 additions & 2 deletions src/qiskit_qec/geometry/tiles/hexagontile.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

# pylint: disable=anomalous-backslash-in-string)
class HexagonTile(Tile):
"""Hexagon Tile
r"""Hexagon Tile
Weight 6 operators (0,1,2)::
Expand Down Expand Up @@ -273,7 +273,7 @@ def __new__(
operators=None,
optype="cZ-aXX",
) -> Shell:
"""Hexagon Tile
r"""Hexagon Tile
Tile::
Expand Down
2 changes: 1 addition & 1 deletion src/qiskit_qec/geometry/tiles/octasquaretile.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

# pylint: disable=anomalous-backslash-in-string)
class OctaSquareTile(Tile):
"""Octa-Square Tile
r"""Octa-Square Tile
The tile has the following structure::
Expand Down
4 changes: 2 additions & 2 deletions src/qiskit_qec/geometry/tiles/squarediamondtile.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

# pylint: disable=anomalous-backslash-in-string)
class SquareDiamondTile(Tile):
"""Square Diamond Tile (Square or non-Rotated orientation)
r"""Square Diamond Tile (Square or non-Rotated orientation)
The follow labelling is used::
Expand Down Expand Up @@ -104,7 +104,7 @@ def __new__(
operators=None,
optype="pXZXZ",
) -> Shell:
"""Square Diamond Tile
r"""Square Diamond Tile
The following labels are used::
Expand Down
7 changes: 7 additions & 0 deletions src/qiskit_qec/linear/symplectic.py
Original file line number Diff line number Diff line change
Expand Up @@ -2178,3 +2178,10 @@ def _normailzer_group(matrix):
center_, hyper1, hyper2 = _symplectic_gram_schmidt(matrix, [], [])

return _normalizer_group_preserve(center_, hyper1, hyper2)


def _extend_symplectic(matrix: np.array, extend: int):
n = matrix.shape[1] // 2
ext_part = np.zeros(shape=(matrix.shape[0], extend), dtype=matrix.dtype)
ext_matrix = np.hstack((matrix[:, 0:n], ext_part, matrix[:, n:], ext_part))
return ext_matrix
Loading

0 comments on commit 6a2f23a

Please sign in to comment.