show the measure of dense coding

This commit is contained in:
Daniel Tsvetkov 2019-12-04 22:11:23 +01:00
parent 5aa2d30abd
commit de00aaac47

View File

@ -33,21 +33,22 @@ def quantum_dense_coding():
print()
print("Bob measures...")
print("00")
m00 = H.on(CNOT.on(_00)[0])
print(m00.measure())
print(m00)
print()
print("01")
m01 = H.on(CNOT.on(_01)[0])
print(m01.measure())
print(m01)
print()
print("10")
m10 = H.on(CNOT.on(_10)[0])
print(m10.measure())
print(m10)
print()
print("11")
m11 = H.on(CNOT.on(_11)[0])
print(m11.measure())
print(m11)
print()
if __name__ == "__main__":