Skip to content

Commit c504c38

Browse files
Use new quimb TN string format (#5525)
1 parent 40c33d3 commit c504c38

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

cirq-core/cirq/contrib/quimb/mps_simulator_test.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ def test_trial_result_str():
276276
)
277277
== """measurements: m=1
278278
output state: TensorNetwork([
279-
Tensor(shape=(2,), inds=('i_0',), tags=set()),
279+
Tensor(shape=(2,), inds=('i_0',), tags=oset([])),
280280
])"""
281281
)
282282

@@ -297,7 +297,7 @@ def test_trial_result_repr_pretty():
297297
result,
298298
"""measurements: m=1
299299
output state: TensorNetwork([
300-
Tensor(shape=(2,), inds=('i_0',), tags=set()),
300+
Tensor(shape=(2,), inds=('i_0',), tags=oset([])),
301301
])""",
302302
)
303303
cirq.testing.assert_repr_pretty(result, "cirq.MPSTrialResult(...)", cycle=True)
@@ -311,7 +311,7 @@ def test_empty_step_result():
311311
str(step_result)
312312
== """q(0)=0
313313
TensorNetwork([
314-
Tensor(shape=(2,), inds=('i_0',), tags=set()),
314+
Tensor(shape=(2,), inds=('i_0',), tags=oset([])),
315315
])"""
316316
)
317317

@@ -324,7 +324,7 @@ def test_step_result_repr_pretty():
324324
step_result,
325325
"""q(0)=0
326326
TensorNetwork([
327-
Tensor(shape=(2,), inds=('i_0',), tags=set()),
327+
Tensor(shape=(2,), inds=('i_0',), tags=oset([])),
328328
])""",
329329
)
330330
cirq.testing.assert_repr_pretty(step_result, "cirq.MPSSimulatorStepResult(...)", cycle=True)
@@ -394,8 +394,8 @@ def test_simulate_moment_steps_sample():
394394
assert (
395395
str(step)
396396
== """TensorNetwork([
397-
Tensor(shape=(2,), inds=('i_0',), tags=set()),
398-
Tensor(shape=(2,), inds=('i_1',), tags=set()),
397+
Tensor(shape=(2,), inds=('i_0',), tags=oset([])),
398+
Tensor(shape=(2,), inds=('i_1',), tags=oset([])),
399399
])"""
400400
)
401401
samples = step.sample([q0, q1], repetitions=10)
@@ -415,8 +415,8 @@ def test_simulate_moment_steps_sample():
415415
assert (
416416
str(step)
417417
== """TensorNetwork([
418-
Tensor(shape=(2, 2), inds=('i_0', 'mu_0_1'), tags=set()),
419-
Tensor(shape=(2, 2), inds=('mu_0_1', 'i_1'), tags=set()),
418+
Tensor(shape=(2, 2), inds=('i_0', 'mu_0_1'), tags=oset([])),
419+
Tensor(shape=(2, 2), inds=('mu_0_1', 'i_1'), tags=oset([])),
420420
])"""
421421
)
422422
samples = step.sample([q0, q1], repetitions=10)

0 commit comments

Comments
 (0)