Skip to content

Commit 86d5da0

Browse files
david-plweinbe58
andauthored
Fix CI by pinning pydantic version (#1)
* Fix CI by pinning pydantic version * Rename TestNoise class to NoiseTestModel to make pytest happy * Fix CI by pinning pydantic version --------- Co-authored-by: Phillip Weinberg <[email protected]>
1 parent bc4888f commit 86d5da0

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ dependencies = [
1515
"scipy>=1.13.1",
1616
"kirin-toolchain~=0.14.0",
1717
"rich>=13.9.4",
18-
"pydantic>=1.3.0",
18+
"pydantic>=1.3.0,<2.11.0",
1919
"pandas>=2.2.3",
2020
]
2121

test/qasm2/passes/test_heuristic_noise.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from bloqade.qasm2.rewrite.heuristic_noise import NoiseRewriteRule
1212

1313

14-
class TestNoise(native.MoveNoiseModelABC):
14+
class NoiseTestModel(native.MoveNoiseModelABC):
1515
def parallel_cz_errors(cls, ctrls, qargs, rest):
1616
return {(0.01, 0.01, 0.01, 0.01): ctrls + qargs + rest}
1717

@@ -25,7 +25,7 @@ def test_single_qubit_noise():
2525
noise_params = native.GateNoiseParams(
2626
local_px=px, local_py=py, local_pz=pz, local_loss_prob=p_loss
2727
)
28-
model = TestNoise()
28+
model = NoiseTestModel()
2929

3030
test_qubit = ir.TestValue(type=qasm2.QubitType)
3131
address_analysis = {test_qubit: address.AddressQubit(0)}
@@ -60,7 +60,7 @@ def test_parallel_qubit_noise():
6060
noise_params = native.GateNoiseParams(
6161
local_px=px, local_py=py, local_pz=pz, local_loss_prob=p_loss
6262
)
63-
model = TestNoise()
63+
model = NoiseTestModel()
6464

6565
test_qubit = ir.TestValue(type=qasm2.QubitType)
6666
qubit_list = ilist.New(values=[test_qubit])
@@ -120,7 +120,7 @@ def test_cz_gate_noise():
120120
cz_unpaired_loss_prob=p_loss,
121121
)
122122

123-
model = TestNoise()
123+
model = NoiseTestModel()
124124

125125
ctrl_qubit = ir.TestValue(type=qasm2.QubitType)
126126
qarg_qubit = ir.TestValue(type=qasm2.QubitType)
@@ -194,7 +194,7 @@ def test_parallel_cz_gate_noise():
194194
cz_unpaired_loss_prob=p_loss,
195195
)
196196

197-
model = TestNoise()
197+
model = NoiseTestModel()
198198

199199
ctrl_qubit = ir.TestValue(type=qasm2.QubitType)
200200
qarg_qubit = ir.TestValue(type=qasm2.QubitType)
@@ -274,7 +274,7 @@ def test_method():
274274
global_loss_prob=p_loss, global_px=px, global_py=py, global_pz=pz
275275
)
276276

277-
model = TestNoise()
277+
model = NoiseTestModel()
278278

279279
test_method.print()
280280

0 commit comments

Comments
 (0)