From 6dfd43955bb531bed6f6b4543cc9f97ef6483bbc Mon Sep 17 00:00:00 2001 From: Pete Shadbolt Date: Sat, 23 Jul 2016 20:26:57 +0100 Subject: [PATCH] Still not quite there --- ..._measurement_against_anders_and_briegel.py | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/tests/test_measurement_against_anders_and_briegel.py b/tests/test_measurement_against_anders_and_briegel.py index 04363e3..9701e84 100644 --- a/tests/test_measurement_against_anders_and_briegel.py +++ b/tests/test_measurement_against_anders_and_briegel.py @@ -33,12 +33,20 @@ def test_multiqubit2(): for measurement in (3,): for i in tqdm(range(REPEATS), "Testing {} measurement".format(measurement)): for outcome in (0, 1): - a, b = dummy.messy_random_state(3) - assert a == b - oa = a.measure(0, str(measurement), outcome) - ob = b.measure(0, m[measurement], None, outcome) - assert oa == ob, (oa, ob) - print a.to_json() - print b.to_json() - assert a == b, (measurement, outcome) + for rotation in range(24): + a, b = dummy.clean_random_state(3) + assert a == b + a.act_local_rotation(0, str(rotation)) + b.local_op(0, graphsim.LocCliffOp(rotation)) + + print "{} ------------------".format(rotation) + print "pjs b4:", a.to_json() + print "a&b b4:", b.to_json() + oa = a.measure(0, str(measurement), outcome) + ob = b.measure(0, m[measurement], None, outcome) + assert oa == ob, (oa, ob) + print "pjs af:", a.to_json() + print "a&b af:", b.to_json() + assert a == b, (measurement, outcome) + print