Skip to content

Instantly share code, notes, and snippets.

@hathawsh
Last active February 25, 2020 22:55
Show Gist options
  • Save hathawsh/6d1234c1abe6eeec785d7997fe4f666f to your computer and use it in GitHub Desktop.
Save hathawsh/6d1234c1abe6eeec785d7997fe4f666f to your computer and use it in GitHub Desktop.
Experiment with quantum entanglement
import random
earth_total = 0
ship_total = 0
for particle in range(1000):
earth_result = random.random() >= 0.5
if earth_result:
ship_result = random.random() >= 0.6
else:
ship_result = random.random() >= 0.4
earth_total += earth_result
ship_total += ship_result
print("Earth: {}, Ship: {}".format(earth_total, ship_total))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment