Skip to content

Commit a0989e7

Browse files
committed
pre-commit update
1 parent cbccecf commit a0989e7

File tree

5 files changed

+40
-40
lines changed

5 files changed

+40
-40
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ repos:
1515
- id: debug-statements
1616

1717
- repo: https://github.com/crate-ci/typos
18-
rev: v1.27.0
18+
rev: v1.28.1
1919
hooks:
2020
- id: typos
2121
args: []
@@ -25,7 +25,7 @@ repos:
2525
)$
2626
2727
- repo: https://github.com/astral-sh/ruff-pre-commit
28-
rev: v0.7.2
28+
rev: v0.8.0
2929
hooks:
3030
- id: ruff
3131
args: [--fix, --exit-non-zero-on-fix]

python/pecos/__init__.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,18 @@
3333
from pecos.engines.hybrid_engine_old import HybridEngine
3434

3535
__all__ = [
36+
"BinArray",
37+
"HybridEngine",
38+
"QuantumCircuit",
3639
"__version__",
37-
"circuits",
38-
"qeccs",
39-
"simulators",
40-
"error_models",
40+
"circuit_converters",
4141
"circuit_runners",
42-
"engines",
42+
"circuits",
4343
"decoders",
44-
"circuit_converters",
44+
"engines",
45+
"error_models",
4546
"misc",
47+
"qeccs",
48+
"simulators",
4649
"tools",
47-
"QuantumCircuit",
48-
"BinArray",
49-
"HybridEngine",
5050
]

python/pecos/qeclib/qubit/__init__.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,36 +21,36 @@
2121
from pecos.qeclib.qubit.tq_noncliffords import CH
2222

2323
__all__ = [
24-
"Measure",
25-
"Prep",
24+
"CH",
25+
"CX",
26+
"CY",
27+
"CZ",
28+
"F4",
2629
"RX",
2730
"RY",
2831
"RZ",
2932
"RZZ",
30-
"X",
31-
"Y",
32-
"Z",
3333
"SX",
34+
"SXX",
3435
"SY",
36+
"SYY",
3537
"SZ",
36-
"SXdg",
37-
"SYdg",
38-
"SZdg",
38+
"SZZ",
3939
"F",
40-
"Fdg",
41-
"F4",
4240
"F4dg",
41+
"Fdg",
4342
"H",
44-
"CX",
45-
"CY",
46-
"CZ",
47-
"SXX",
48-
"SYY",
49-
"SZZ",
43+
"Measure",
44+
"Prep",
5045
"SXXdg",
46+
"SXdg",
5147
"SYYdg",
48+
"SYdg",
5249
"SZZdg",
53-
"CH",
50+
"SZdg",
5451
"T",
5552
"Tdg",
53+
"X",
54+
"Y",
55+
"Z",
5656
]

python/pecos/slr/__init__.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@
1717
from pecos.slr.vars import Bit, CReg, QReg, Qubit, Vars
1818

1919
__all__ = [
20-
"Main",
2120
"SLR",
22-
"Block",
23-
"If",
24-
"Repeat",
2521
"Barrier",
26-
"Comment",
27-
"Permute",
28-
"Vars",
2922
"Bit",
30-
"Qubit",
23+
"Block",
3124
"CReg",
25+
"Comment",
26+
"If",
27+
"Main",
28+
"Permute",
3229
"QReg",
30+
"Qubit",
31+
"Repeat",
32+
"Vars",
3333
]

python/pecos/typed_list.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def __init__(self, _type: type, data: Iterable[T] | None = None) -> None:
3737
else:
3838
super().__init__()
3939

40-
def _check_type(self, __object: T) -> None:
40+
def _check_type(self, /, __object: T) -> None:
4141
"""Checks if an item is of the specified type.
4242
4343
Args:
@@ -50,7 +50,7 @@ def _check_type(self, __object: T) -> None:
5050
msg = f"Item must be of type {self.type.__name__}, got type {type(__object).__name__} instead"
5151
raise TypeError(msg)
5252

53-
def append(self, __object: T):
53+
def append(self, /, __object: T):
5454
"""Appends an item to the end of the list, checking its type.
5555
5656
Args:
@@ -62,7 +62,7 @@ def append(self, __object: T):
6262
self._check_type(__object)
6363
super().append(__object)
6464

65-
def extend(self, __iterable: Iterable[T]) -> None:
65+
def extend(self, /, __iterable: Iterable[T]) -> None:
6666
"""Extends the list by appending elements from the iterable, checking their type.
6767
6868
Args:
@@ -76,7 +76,7 @@ def extend(self, __iterable: Iterable[T]) -> None:
7676
self._check_type(i)
7777
super().extend(__iterable)
7878

79-
def insert(self, __index: int, __object: T) -> None:
79+
def insert(self, /, __index: int, __object: T) -> None:
8080
"""Inserts an item en position, checking its type.
8181
8282
Args:

0 commit comments

Comments
 (0)