The Two‐qubit Grover Searching |10>
Get familiarized with the concept of the two‐qubit Grover searching |10>.
qc = QuantumCircuit(2)qc.h(0)qc.h(1)qc.barrier()qc.x(0)qc.cz(0, 1)qc.x(0)qc.barrier()qc.h(0)qc.h(1)qc.x(0)qc.x(1)qc.cz(0,1)qc.x(0)qc.x(1)qc.barrier()qc.h(0)qc.h(1)# execute the qcresults = execute(qc,Aer.get_backend('statevector_simulator')).result()plot_histogram(results.get_counts())
Get hands-on with 1400+ tech skills courses.