diff --git a/pyproject.toml b/pyproject.toml index 439993b2..1cea5ea6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ dependencies = [ "scipy>=1.13.1", "kirin-toolchain~=0.14.0", "rich>=13.9.4", - "pydantic>=1.3.0", + "pydantic>=1.3.0,<2.11.0", "pandas>=2.2.3", ] diff --git a/test/qasm2/passes/test_heuristic_noise.py b/test/qasm2/passes/test_heuristic_noise.py index e2bfd54f..553a2058 100644 --- a/test/qasm2/passes/test_heuristic_noise.py +++ b/test/qasm2/passes/test_heuristic_noise.py @@ -11,7 +11,7 @@ from bloqade.qasm2.rewrite.heuristic_noise import NoiseRewriteRule -class TestNoise(native.MoveNoiseModelABC): +class NoiseTestModel(native.MoveNoiseModelABC): def parallel_cz_errors(cls, ctrls, qargs, rest): return {(0.01, 0.01, 0.01, 0.01): ctrls + qargs + rest} @@ -25,7 +25,7 @@ def test_single_qubit_noise(): noise_params = native.GateNoiseParams( local_px=px, local_py=py, local_pz=pz, local_loss_prob=p_loss ) - model = TestNoise() + model = NoiseTestModel() test_qubit = ir.TestValue(type=qasm2.QubitType) address_analysis = {test_qubit: address.AddressQubit(0)} @@ -60,7 +60,7 @@ def test_parallel_qubit_noise(): noise_params = native.GateNoiseParams( local_px=px, local_py=py, local_pz=pz, local_loss_prob=p_loss ) - model = TestNoise() + model = NoiseTestModel() test_qubit = ir.TestValue(type=qasm2.QubitType) qubit_list = ilist.New(values=[test_qubit]) @@ -120,7 +120,7 @@ def test_cz_gate_noise(): cz_unpaired_loss_prob=p_loss, ) - model = TestNoise() + model = NoiseTestModel() ctrl_qubit = ir.TestValue(type=qasm2.QubitType) qarg_qubit = ir.TestValue(type=qasm2.QubitType) @@ -194,7 +194,7 @@ def test_parallel_cz_gate_noise(): cz_unpaired_loss_prob=p_loss, ) - model = TestNoise() + model = NoiseTestModel() ctrl_qubit = ir.TestValue(type=qasm2.QubitType) qarg_qubit = ir.TestValue(type=qasm2.QubitType) @@ -274,7 +274,7 @@ def test_method(): global_loss_prob=p_loss, global_px=px, global_py=py, global_pz=pz ) - model = TestNoise() + model = NoiseTestModel() test_method.print()