Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Log inSign up
Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Blog
Job Board
Q3AS

© 2026 Aqora Quantum S.A.S.

TermsPrivacyLegal Notice

Practical Experience with IBM Q Quantum Computer: Bernstein–Vazirani Algorithm

Mikhail Pavlov

Published Mar 4, 2026• 0 citations
Publisher

Abstract

Abstract This study presents practical experience implementing the Bernstein–Vazirani algorithm on the IBM Q quantum computing platform, focusing on energy-efficient and reversible computation guided by Landauer’s principle. The work highlights the role of fundamental quantum logic gates—including CNOT, NOT, CCNOT, OR, and XOR—in constructing scalable, reversible circuits. By applying these principles, the Bernstein–Vazirani algorithm demonstrates an efficient solution to the problem of determining a hidden binary vector with a minimal number of queries, showcasing the potential for quantum computational speedup and optimization of information processing. The research emphasizes the importance of reversible quantum operations in improving computational efficiency and expanding the capabilities of modern quantum systems.

DOI
10.5281/zenodo.18865681

Related papers

Practical Guide to Quantum Computing: Quantum Logic Gates (Based on IBM Q Platform)

Mikhail Pavlov

Abstract This practical guide provides a detailed introduction to quantum logic gates and unitary operators as implemented on the IBM Q platform. It focuses on the fundamental gate structures used in quantum programming, particularly within the Composer interface, and provides screenshots and detailed descriptions of each operator’s functionality. The guide emphasizes the operational role of gates in controlling qubit states and constructing quantum circuits. To enhance understanding, the behavior of gates is visualized on the Bloch sphere, demonstrating how single-qubit operations rotate qubit states around the XXX, YYY, and ZZZ axes, as well as how phase shifts and amplitude adjustments modify the qubit. These operations are essential for measurement, state preparation, and precise manipulation of quantum systems. The relevance of this study is underscored by the rapid development of quantum technologies and the increasing accessibility of quantum computing platforms like IBM Q. A thorough understanding of quantum gates and their implementations is critical for advancing quantum algorithm design and for training specialists capable of deploying quantum computational solutions in fields ranging from cryptography to complex physical system simulations. This guide provides both theoretical insights and practical exercises, bridging the gap between abstract quantum mechanics and applied quantum programming, thereby equipping readers with foundational skills for effective circuit construction and quantum computation.

•Mar 3, 2026•0 citations

Implementation of the Bernstein–Vazirani Quantum Algorithm on the IBM Q Computers

Sydney Wang, Athena Zheng

The complexity of certain classical computer algorithms can be reduced by a quantum algorithm completing the same task. We examine the implementation of the Bernstein–Vazirani algorithm. It finds the hidden n-bit string s from the function fs(x)=sx that takes an n-bit input string x and outputs one bit, the dot product. This algorithm reduces the complexity from n queries for the best classical algorithm to just one. Though the quantum algorithm theoretically always gives the correct string, in practice, factors such as decoherence of the physical qubits due to external noise reduce the algorithm’s accuracy. By implementing the algorithm on the IBM 5-qubit and 14-qubit quantum computers, we are able to analyze correlations between the accuracy of the results and the properties of the physical qubits used. Not all qubits are pairwise connected, nor do they have the same coherence times. Using Python to build the quantum circuits, we create several implementations of the circuit with different qubits. We establish that 1/T1, 1/T2, and gate errors are positively correlated with calculation errors. Consequently, we observe that the 14-qubit quantum computer, on average, is more prone to errors than the 5-qubit quantum computer.

•Jan 1, 2019•0 citations

Implementation of the Bernstein-Vazirani Quantum Algorithm Using the Qiskit Framework

Alexandru-Gabriel Tudorache, Vasile Manta, Simona Caraiman

Abstract 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.

Buletinul Institutului Politehnic din Iaşi. Secţia Electrotehnică. Energetică. Electronică•Jun 1, 2021•2 citations

Implementation of Grover’s Algorithm & Bernstein-Vazirani Algorithm with IBM Qiskit

Yang-Che Liu, Meifeng Liu

Quantum logic gates differ from classical logic gates as the former involves quantum operators. The conventional gates such as AND, OR, NOT etc., are generally classified as classical gates, however, some of the quantum gates are known as Pauli gates, Toffoli gates and Hadamard gates, respectively. Normally classical states only involve 0 and 1, whereas quantum states involve the superpositions of 0 and 1. Hence, underlying principles of algorithm implementation for classical logic gate and quantum logic gate are indeed different. In this paper, we introduce significant concepts of quantum computations, analyse the discrepancy between classical and quantum gates, compare quantum algorithms using Qiskit against equivalent classical algorithms and analyse their performance in terms of runtime.

Journal of Informatics and Web Engineering•Feb 14, 2024•5 citations

A Generalization of Bernstein-Vazirani Algorithm to Qudit Systems

R Narayanan Krishna, Vishesh Makwana, Ananda Padhmanabhan Suresh

A quantum algorithm to solve the parity problem is better than its most efficient classical counter- part with a separation that is polynomial in the number of queries. This was shown by E. Bernstein and U. Vazirani and was one of the earliest indications that the quantum information processing can outperform the classical one by a significant margin. The problem and its solution both is usually stated for a 2-level system since we generally work with bits/qubits. However, many works have been done generalizing known quantum computing techniques to higher level systems. Following this, we look at a generalization of the Bernstein-Vazirani algorithm implemented on a general qudit system.

arXiv:1609.03185•Sep 11, 2016•5 citations

Demonstration of Algorithmic Quantum Speedup

Bibek Pokharel, Daniel A. Lidar

Despite the development of increasingly capable quantum computers, an experimental demonstration of a provable algorithmic quantum speedup employing today's non-fault-tolerant devices has remained elusive. Here, we unequivocally demonstrate such a speedup within the oracular model, quantified in terms of the scaling with the problem size of the time-to-solution metric. We implement the single-shot Bernstein-Vazirani algorithm, which solves the problem of identifying a hidden bitstring that changes after every oracle query, using two different 27-qubit IBM Quantum superconducting processors. The speedup is observed on only one of the two processors when the quantum computation is protected by dynamical decoupling but not without it. The quantum speedup reported here does not rely on any additional assumptions or complexity-theoretic conjectures and solves a bona fide computational problem in the setting of a game with an oracle and a verifier.

arXiv:2207.07647•Physical Review Letters•May 26, 2023•55 citations
Abstract This study presents practical experience implementing the Bernstein–Vazirani algorithm on the IBM Q quantum computing platform, focusing on energy-efficient and reversible computation guided by Landauer’s principle. The work highlights the role of fundamental quantum logic gates—including CNOT, NOT, CCNOT, OR, and XOR—in constructing scalable, reversible circuits. By applying these principles, the Bernstein–Vazirani algorithm demonstrates an efficient solution to the problem of determining a hidden binary vector with a minimal number of queries, showcasing the potential for quantum computational speedup and optimization of information processing. The research emphasizes the importance of reversible quantum operations in improving computational efficiency and expanding the capabilities of modern quantum systems.
Abstract This practical guide provides a detailed introduction to quantum logic gates and unitary operators as implemented on the IBM Q platform. It focuses on the fundamental gate structures used in quantum programming, particularly within the Composer interface, and provides screenshots and detailed descriptions of each operator’s functionality. The guide emphasizes the operational role of gates in controlling qubit states and constructing quantum circuits. To enhance understanding, the behavior of gates is visualized on the Bloch sphere, demonstrating how single-qubit operations rotate qubit states around the XXX, YYY, and ZZZ axes, as well as how phase shifts and amplitude adjustments modify the qubit. These operations are essential for measurement, state preparation, and precise manipulation of quantum systems. The relevance of this study is underscored by the rapid development of quantum technologies and the increasing accessibility of quantum computing platforms like IBM Q. A thorough understanding of quantum gates and their implementations is critical for advancing quantum algorithm design and for training specialists capable of deploying quantum computational solutions in fields ranging from cryptography to complex physical system simulations. This guide provides both theoretical insights and practical exercises, bridging the gap between abstract quantum mechanics and applied quantum programming, thereby equipping readers with foundational skills for effective circuit construction and quantum computation.
The complexity of certain classical computer algorithms can be reduced by a quantum algorithm completing the same task. We examine the implementation of the Bernstein–Vazirani algorithm. It finds the hidden n-bit string s from the function fs(x)=sx that takes an n-bit input string x and outputs one bit, the dot product. This algorithm reduces the complexity from n queries for the best classical algorithm to just one. Though the quantum algorithm theoretically always gives the correct string, in practice, factors such as decoherence of the physical qubits due to external noise reduce the algorithm’s accuracy. By implementing the algorithm on the IBM 5-qubit and 14-qubit quantum computers, we are able to analyze correlations between the accuracy of the results and the properties of the physical qubits used. Not all qubits are pairwise connected, nor do they have the same coherence times. Using Python to build the quantum circuits, we create several implementations of the circuit with different qubits. We establish that 1/T1, 1/T2, and gate errors are positively correlated with calculation errors. Consequently, we observe that the 14-qubit quantum computer, on average, is more prone to errors than the 5-qubit quantum computer.
Abstract 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.
Quantum logic gates differ from classical logic gates as the former involves quantum operators. The conventional gates such as AND, OR, NOT etc., are generally classified as classical gates, however, some of the quantum gates are known as Pauli gates, Toffoli gates and Hadamard gates, respectively. Normally classical states only involve 0 and 1, whereas quantum states involve the superpositions of 0 and 1. Hence, underlying principles of algorithm implementation for classical logic gate and quantum logic gate are indeed different. In this paper, we introduce significant concepts of quantum computations, analyse the discrepancy between classical and quantum gates, compare quantum algorithms using Qiskit against equivalent classical algorithms and analyse their performance in terms of runtime.
A quantum algorithm to solve the parity problem is better than its most efficient classical counter- part with a separation that is polynomial in the number of queries. This was shown by E. Bernstein and U. Vazirani and was one of the earliest indications that the quantum information processing can outperform the classical one by a significant margin. The problem and its solution both is usually stated for a 2-level system since we generally work with bits/qubits. However, many works have been done generalizing known quantum computing techniques to higher level systems. Following this, we look at a generalization of the Bernstein-Vazirani algorithm implemented on a general qudit system.
Despite the development of increasingly capable quantum computers, an experimental demonstration of a provable algorithmic quantum speedup employing today's non-fault-tolerant devices has remained elusive. Here, we unequivocally demonstrate such a speedup within the oracular model, quantified in terms of the scaling with the problem size of the time-to-solution metric. We implement the single-shot Bernstein-Vazirani algorithm, which solves the problem of identifying a hidden bitstring that changes after every oracle query, using two different 27-qubit IBM Quantum superconducting processors. The speedup is observed on only one of the two processors when the quantum computation is protected by dynamical decoupling but not without it. The quantum speedup reported here does not rely on any additional assumptions or complexity-theoretic conjectures and solves a bona fide computational problem in the setting of a game with an oracle and a verifier.