From c504c38e5cc41c3e7f459fd4869ea3385676b286 Mon Sep 17 00:00:00 2001 From: Orion Martin <40585662+95-martin-orion@users.noreply.github.com> Date: Wed, 15 Jun 2022 11:48:45 -0700 Subject: [PATCH] Use new quimb TN string format (#5525) --- .../cirq/contrib/quimb/mps_simulator_test.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/cirq-core/cirq/contrib/quimb/mps_simulator_test.py b/cirq-core/cirq/contrib/quimb/mps_simulator_test.py index ca5cfd63823..8c664880b2e 100644 --- a/cirq-core/cirq/contrib/quimb/mps_simulator_test.py +++ b/cirq-core/cirq/contrib/quimb/mps_simulator_test.py @@ -276,7 +276,7 @@ def test_trial_result_str(): ) == """measurements: m=1 output state: TensorNetwork([ - Tensor(shape=(2,), inds=('i_0',), tags=set()), + Tensor(shape=(2,), inds=('i_0',), tags=oset([])), ])""" ) @@ -297,7 +297,7 @@ def test_trial_result_repr_pretty(): result, """measurements: m=1 output state: TensorNetwork([ - Tensor(shape=(2,), inds=('i_0',), tags=set()), + Tensor(shape=(2,), inds=('i_0',), tags=oset([])), ])""", ) cirq.testing.assert_repr_pretty(result, "cirq.MPSTrialResult(...)", cycle=True) @@ -311,7 +311,7 @@ def test_empty_step_result(): str(step_result) == """q(0)=0 TensorNetwork([ - Tensor(shape=(2,), inds=('i_0',), tags=set()), + Tensor(shape=(2,), inds=('i_0',), tags=oset([])), ])""" ) @@ -324,7 +324,7 @@ def test_step_result_repr_pretty(): step_result, """q(0)=0 TensorNetwork([ - Tensor(shape=(2,), inds=('i_0',), tags=set()), + Tensor(shape=(2,), inds=('i_0',), tags=oset([])), ])""", ) cirq.testing.assert_repr_pretty(step_result, "cirq.MPSSimulatorStepResult(...)", cycle=True) @@ -394,8 +394,8 @@ def test_simulate_moment_steps_sample(): assert ( str(step) == """TensorNetwork([ - Tensor(shape=(2,), inds=('i_0',), tags=set()), - Tensor(shape=(2,), inds=('i_1',), tags=set()), + Tensor(shape=(2,), inds=('i_0',), tags=oset([])), + Tensor(shape=(2,), inds=('i_1',), tags=oset([])), ])""" ) samples = step.sample([q0, q1], repetitions=10) @@ -415,8 +415,8 @@ def test_simulate_moment_steps_sample(): assert ( str(step) == """TensorNetwork([ - Tensor(shape=(2, 2), inds=('i_0', 'mu_0_1'), tags=set()), - Tensor(shape=(2, 2), inds=('mu_0_1', 'i_1'), tags=set()), + Tensor(shape=(2, 2), inds=('i_0', 'mu_0_1'), tags=oset([])), + Tensor(shape=(2, 2), inds=('mu_0_1', 'i_1'), tags=oset([])), ])""" ) samples = step.sample([q0, q1], repetitions=10)