From 0aaa0ace5f32ba3aa19eb3c706524f20894e7f95 Mon Sep 17 00:00:00 2001 From: Ogah Jackreece Ejini Date: Mon, 20 Mar 2023 13:11:39 -0400 Subject: [PATCH] Update superdense-coding-cirq.py Reversed the output of bitstring(bits) because after running the circuit the teleported values are reversed at bob's end --- chapter07/cirq/superdense-coding-cirq.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter07/cirq/superdense-coding-cirq.py b/chapter07/cirq/superdense-coding-cirq.py index 7dc2f0d..bbe5251 100644 --- a/chapter07/cirq/superdense-coding-cirq.py +++ b/chapter07/cirq/superdense-coding-cirq.py @@ -5,7 +5,7 @@ # Helper function for visualizing output def bitstring(bits): - return ''.join('1' if e else '0' for e in bits) + return (''.join('1' if e else '0' for e in bits))[::-1] #reversed the output # Create two quantum and classical registers qreg = [cirq.LineQubit(x) for x in range(2)]