Implementation of the Bernstein-Vazirani Quantum Algorithm Using the Qiskit Framework
Publié en ligne: 12 mars 2022
Pages: 31 - 40
Reçu: 29 mars 2021
Accepté: 17 mai 2021
DOI: https://doi.org/10.2478/bipie-2021-0009
Mots clés
© 2021 Alexandru-Gabriel Tudorache et al., published by Sciendo
This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
This paper describes the basics of quantum computing and then focuses on the implementation of the Bernstein-Vazirani algorithm, which can be seen as an extension of the Deutsch-Josza problem (that solves the question on whether a function is balanced or not). The idea behind the B-V algorithm is that someone can find a secret number (sequence of bits) using only one measurement, unlike the classical counter-part, that requires n measurements, where n is the number of bits of the secret number. The implementation of this algorithm, using the Python programming language, along with the Qiskit framework (an open-source library for quantum operations from IBM), illustrates how to create and simulate a circuit for such an algorithm. The circuit is dynamically generated for the required number (which in practice is received from a different source) and is used to measure the probability of each qubit. The algorithm can also be extended for different types of data and can be used for signal or image processing, as well as applications in cryptography.