chapter five

5 Entanglement

 

This chapter covers:

  • the analogy between flipping a coin and getting a random number
  • how flipping a number of coins comes is related to the mathematical concept of a probability vector
  • the physical concept of "quantum entanglement"
  • quantum entanglement to create random numbers that are connected with each other
  • a game that allows you to learn more about how the concepts of superposition and entanglement can be leveraged in Java applications.

In the previous chapter, we introduced and explained the concept of superposition. This concept does not exist in classical computing, and it is one of the reasons why quantum computing is fundamentally different from classical computing. Nevertheless, we managed to describe superposition in such a way that a Java programmer can leverage it in his own code. In this chapter, we will introduce quantum entanglement, a concept that is also not encountered in classical computing and that makes quantum computing really powerful. Again, we will show how you can simulate quantum entanglement and deal with it using Java code.

5.1  Predicting heads or tails

Have you ever been at a magician show where the magician is able to predict a property that seems to be random? A spectator can choose a card from a deck, and the magician tells which card it is without seeing it. Or the spectator can toss a coin, hides the result, and the magician is capable of telling whether the coin landed heads or tails.

5.2  Independent probabilities, the classic way

5.3  Independent probabilities, the Quantum way

5.4  The physical concept of entanglement

5.5  A Gate representation for Quantum Entanglement

5.5.1  Converting to probabiliy vectors

5.5.2  CNot gate

5.6  Creating a Bell state: dependent probabilities

5.7  Mary had a little qubit

5.8  Summary