Skip to content

Commit fdde109

Browse files
authored
Switch to pyzx-param dependency (#52)
Use pyzx-param published on pypi
1 parent 6d735cc commit fdde109

17 files changed

Lines changed: 43 additions & 38 deletions

File tree

.github/workflows/doc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,5 @@ jobs:
4343
- name: Deploy preview
4444
uses: rossjrw/pr-preview-action@v1
4545
with:
46-
pages-base-url: studious-adventure-r67917v.pages.github.io
46+
pages-base-url: queracomputing.github.io/tsim
4747
source-dir: ./site

docs/demos/draft/decoding_demo.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@
178178
"metadata": {},
179179
"outputs": [],
180180
"source": [
181-
"import pyzx as zx\n",
181+
"import pyzx_param as zx\n",
182182
"from tsim.graph_util import transform_error_basis, squash_graph\n",
183183
"\n",
184184
"g = c.get_sampling_graph(sample_detectors=True)\n",

docs/demos/tutorial.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
"import sinter\n",
1414
"import matplotlib.pyplot as plt\n",
1515
"import numpy as np\n",
16-
"import pyzx as zx\n",
16+
"import pyzx_param as zx\n",
1717
"from fractions import Fraction\n",
18-
"from pyzx.graph.scalar import cexp\n",
18+
"from pyzx_param.graph.scalar import cexp\n",
1919
"import math"
2020
]
2121
},

docs/stylesheets/extra.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
:root {
22
--md-primary-fg-color: #00ba7c;
33
--md-accent-fg-color: #ff8208;
4+
}
45

6+
/* Hide the header and sidebar logo/icon */
7+
.md-header__button.md-logo,
8+
.md-nav__button.md-logo {
9+
display: none;
510
}
611

712

pyproject.toml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ dependencies = [
1616
"lxml>=6.0.2",
1717
"numpy>=2.2.6",
1818
"pyperclip>=1.11.0",
19-
"pyzx",
19+
"pyzx-param>=0.9.0",
2020
"stim>=1.15.0",
2121
"sympy>=1.14.0",
2222
"tqdm>=4.67.1",
@@ -136,11 +136,7 @@ omit = ["src/tsim/external/*"]
136136

137137
[tool.pytest.ini_options]
138138
testpaths = "test/"
139-
norecursedirs = ["pyzx"]
140139

141140
[tool.pyright]
142141
include = ["src", "test"]
143142
exclude = ["src/tsim/external"]
144-
145-
[tool.uv.sources]
146-
pyzx = { git = "https://github.com/rafaelha/pyzx.git", rev = "paramzx" }

src/tsim/circuit.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
from typing import Any, Iterable, Literal, cast, overload
66

7-
import pyzx as zx
7+
import pyzx_param as zx
88
import stim
9-
from pyzx.graph.base import BaseGraph
9+
from pyzx_param.graph.base import BaseGraph
1010

1111
from tsim.core.graph import build_sampling_graph
1212
from tsim.core.parse import parse_parametric_tag, parse_stim_circuit

src/tsim/compile/compile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
import jax.numpy as jnp
88
import numpy as np
99
from jax import Array
10-
from pyzx.graph.base import BaseGraph
11-
from pyzx.graph.scalar import DyadicNumber
10+
from pyzx_param.graph.base import BaseGraph
11+
from pyzx_param.graph.scalar import DyadicNumber
1212

1313

1414
class CompiledScalarGraphs(eqx.Module):

src/tsim/compile/pipeline.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
from typing import Literal
66

77
import jax.numpy as jnp
8-
import pyzx as zx
9-
from pyzx.graph.base import BaseGraph
8+
import pyzx_param as zx
9+
from pyzx_param.graph.base import BaseGraph
1010

1111
from tsim.compile.compile import CompiledScalarGraphs, compile_scalar_graphs
1212
from tsim.compile.stabrank import find_stab

src/tsim/compile/stabrank.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
from typing import Iterable, Sequence
44

5-
import pyzx as zx
6-
from pyzx.graph.base import BaseGraph
5+
import pyzx_param as zx
6+
from pyzx_param.graph.base import BaseGraph
77

88

99
def _decompose(

src/tsim/core/graph.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
from typing import TYPE_CHECKING, Any, Sequence
99

1010
import numpy as np
11-
import pyzx as zx
12-
from pyzx.graph.base import BaseGraph
13-
from pyzx.graph.graph import Graph
14-
from pyzx.graph.graph_s import GraphS
15-
from pyzx.graph.scalar import Scalar
16-
from pyzx.utils import VertexType
11+
import pyzx_param as zx
12+
from pyzx_param.graph.base import BaseGraph
13+
from pyzx_param.graph.graph import Graph
14+
from pyzx_param.graph.graph_s import GraphS
15+
from pyzx_param.graph.scalar import Scalar
16+
from pyzx_param.utils import VertexType
1717

1818
from tsim.core.instructions import GraphRepresentation
1919
from tsim.core.parse import parse_stim_circuit

0 commit comments

Comments
 (0)