The Amplifier Function
Learn about the amplifier function.
We'll cover the following
The amplifier function
The next gate we create is the amplifier. So far, we learned the amplifier to consist of a controlled -gate encapsulated into Hadamard and -gates. Our amplifier is almost alike. However, we do not use Hadamard gates, but we use a part of the actual implementation of our quantum Bayesian network instead. We use the function apply_ischild_sex
we created in the lesson Estimating a Variable. Basically, this function applies -gates on the qubits at the positions QPOS_SEX
and QPOS_ISCHILD by
the angle representing the corresponding marginal probabilities.
The rest of the amplifier remains the standard amplifier we already know. Again, we apply a controlled -gate inside -gates. However, this time, we must apply the controlled -gate only on the two qubits whose state we want to amplify. These are the qubits at the positions QPOS_SEX
and QPOS_ISCHILD
in line 8.
Get hands-on with 1400+ tech skills courses.