Skip to content

Commit 5f6a1c3

Browse files
committed
Rename TestNoise class to NoiseTestModel to make pytest happy
1 parent 8820d5b commit 5f6a1c3

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

test/qasm2/passes/test_heuristic_noise.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
from kirin import ir, types
2+
from kirin.dialects import func, ilist
3+
from kirin.dialects.py import constant
4+
25
from bloqade import qasm2
36
from bloqade.noise import native
4-
from kirin.dialects import func, ilist
57
from bloqade.analysis import address
6-
from kirin.dialects.py import constant
78
from bloqade.test_utils import assert_nodes
89
from bloqade.qasm2.dialects import uop, core, glob, parallel
910
from bloqade.qasm2.passes.noise import NoisePass
1011
from bloqade.qasm2.rewrite.heuristic_noise import NoiseRewriteRule
1112

1213

13-
class TestNoise(native.MoveNoiseModelABC):
14+
class NoiseTestModel(native.MoveNoiseModelABC):
1415
def parallel_cz_errors(cls, ctrls, qargs, rest):
1516
return {(0.01, 0.01, 0.01, 0.01): ctrls + qargs + rest}
1617

@@ -24,7 +25,7 @@ def test_single_qubit_noise():
2425
noise_params = native.GateNoiseParams(
2526
local_px=px, local_py=py, local_pz=pz, local_loss_prob=p_loss
2627
)
27-
model = TestNoise()
28+
model = NoiseTestModel()
2829

2930
test_qubit = ir.TestValue(type=qasm2.QubitType)
3031
address_analysis = {test_qubit: address.AddressQubit(0)}
@@ -59,7 +60,7 @@ def test_parallel_qubit_noise():
5960
noise_params = native.GateNoiseParams(
6061
local_px=px, local_py=py, local_pz=pz, local_loss_prob=p_loss
6162
)
62-
model = TestNoise()
63+
model = NoiseTestModel()
6364

6465
test_qubit = ir.TestValue(type=qasm2.QubitType)
6566
qubit_list = ilist.New(values=[test_qubit])
@@ -119,7 +120,7 @@ def test_cz_gate_noise():
119120
cz_unpaired_loss_prob=p_loss,
120121
)
121122

122-
model = TestNoise()
123+
model = NoiseTestModel()
123124

124125
ctrl_qubit = ir.TestValue(type=qasm2.QubitType)
125126
qarg_qubit = ir.TestValue(type=qasm2.QubitType)
@@ -193,7 +194,7 @@ def test_parallel_cz_gate_noise():
193194
cz_unpaired_loss_prob=p_loss,
194195
)
195196

196-
model = TestNoise()
197+
model = NoiseTestModel()
197198

198199
ctrl_qubit = ir.TestValue(type=qasm2.QubitType)
199200
qarg_qubit = ir.TestValue(type=qasm2.QubitType)
@@ -273,7 +274,7 @@ def test_method():
273274
global_loss_prob=p_loss, global_px=px, global_py=py, global_pz=pz
274275
)
275276

276-
model = TestNoise()
277+
model = NoiseTestModel()
277278

278279
test_method.print()
279280

0 commit comments

Comments
 (0)