Presentation module¶
This module presents all the necessary computations for the Grover’s Algorithm and Quantum Fourier Transform.
-
Presentation.
Ber_Vaz
(s)¶ Creates an example of the Bernstein-Vazirani algorithm.
- Parameters
s – (str) String representation of the state that the algorithm should work for.
-
Presentation.
Grover_Circuit
(n_qubits, measured_bits, plot_results=True)¶ Constructs a circuit representing Grover’s algorithm for a given number of qubits and bits that we are interested in. Plots measurements after each iteration of the algorithm.
- Parameters
n_qubits – (int) Number of qubits in the circuit.
measured_bits – (list) list of bits that we are interested in and want to increase the amplitude of.
-
Presentation.
LazyGroverDemo
(n_qubits, measured_bits, plot_results=True)¶
-
Presentation.
QFT
(circuit)¶ Applies quantum fourier transform to a circuit.
- Parameters
circuit – (QuantumCircuit) The quantum circuit to apply the QFT to.
- Returns
(QuantumCircuit) The same quantum circuit with the QFT applied to it.
-
Presentation.
diffuser
(circuit)¶ Creates the diffuser for a given circuit for a Grover’s algorithm.
- Parameters
circuit – (QuantumCircuit) The quantum circuit that Grover’s algorithm should be applied to.
-
Presentation.
qft_dagger
(circuit)¶ Applies an inverse quantum fourier transform to a given circuit.
- Parameters
circuit – (QuantumCircuit) A quantum circuit that the inverse qft should be applied to.
- Return circuit
(QuantumCircuit) The same circuit, but with an inverse qft applied to it.
-
Presentation.
qft_example
()¶ Create an example demonstrating quantum fourier transform.