Two-qubit Amplification
Learn about two-qubit amplification.
We'll cover the following...
Let’s continue with the circuit with two qubits and four possible states.
Again, we start with an equal superposition of all states. With four states, each state has an amplitude of and a resulting measurement probability of .
Equal superposition of four states
Press + to interact
from qiskit import QuantumCircuit, Aer, executefrom qiskit.visualization import plot_histogram, plot_bloch_multivector, plot_state_qsphereqc = QuantumCircuit(2)qc.h(0)qc.h(1)# execute the qcresults = execute(qc,Aer.get_backend('statevector_simulator')).result()plot_histogram(results.get_counts())
In the next step, we need to implement the oracle. Its purpose is to flip the amplitude of the favorable state. For example, let’s say it is in state . Remember thatwe read the qubits from the right (qubit at position 0) to the left (qubit at position 1).
The controlled -gate ( ...