show the measure of dense coding
This commit is contained in:
parent
5aa2d30abd
commit
de00aaac47
@ -33,21 +33,22 @@ def quantum_dense_coding():
|
|||||||
print()
|
print()
|
||||||
|
|
||||||
print("Bob measures...")
|
print("Bob measures...")
|
||||||
print("00")
|
|
||||||
m00 = H.on(CNOT.on(_00)[0])
|
m00 = H.on(CNOT.on(_00)[0])
|
||||||
|
print(m00.measure())
|
||||||
print(m00)
|
print(m00)
|
||||||
print()
|
print()
|
||||||
print("01")
|
|
||||||
m01 = H.on(CNOT.on(_01)[0])
|
m01 = H.on(CNOT.on(_01)[0])
|
||||||
|
print(m01.measure())
|
||||||
print(m01)
|
print(m01)
|
||||||
print()
|
print()
|
||||||
print("10")
|
|
||||||
m10 = H.on(CNOT.on(_10)[0])
|
m10 = H.on(CNOT.on(_10)[0])
|
||||||
|
print(m10.measure())
|
||||||
print(m10)
|
print(m10)
|
||||||
print()
|
print()
|
||||||
print("11")
|
|
||||||
m11 = H.on(CNOT.on(_11)[0])
|
m11 = H.on(CNOT.on(_11)[0])
|
||||||
|
print(m11.measure())
|
||||||
print(m11)
|
print(m11)
|
||||||
|
print()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
Loading…
Reference in New Issue
Block a user