Optimize a Quantum Circuit Using PennyLane

Optimize a Quantum Circuit Using PennyLane

Quantum entanglement, one of the fundamental properties of quantum computing, is when the state of one particle is dependent on the state of another, no matter how far they are in space. For instance, if Alice is in the Milky Way galaxy with a qubit qAq_A and Bob is in the Andromeda galaxy with a qubit qBq_B entangled with qAq_A. In that case, the results of Alice’s measurement affect the state of Bob’s qubit. This is what Einstein called “Spukhafte Fernwirkung” or “spooky action at a distance.”

In this project, we’ll implement and optimize the following two-qubit quantum circuit:

With the right values of θ1\theta_1 and θ2\theta_2, this circuit can be used to achieve the entangled quantum state of 00+112\cfrac{\vert00\rangle + \vert11\rangle}{\sqrt 2}. We’ll use machine learning to find the optimal values of the parameters, which can be used to entangle the qubits.