Measuring Hamming Distance between Boolean Functions via Entanglement Measure
Khaled El-Wazan

TL;DR
This paper introduces a quantum algorithm that efficiently measures the Hamming distance between Boolean functions by translating the problem into entanglement measurement using concurrence, enabling faster analysis of Boolean functions.
Contribution
The paper presents a novel quantum algorithm that converts Hamming distance measurement into entanglement measurement, providing a new approach for analyzing Boolean functions.
Findings
The algorithm efficiently computes Hamming distances using entanglement measures.
It constructs a special black-box to facilitate the measurement process.
The method demonstrates a quantum advantage in Boolean function analysis.
Abstract
In this paper, we present a fast quantum algorithm to measure the Hamming distance between two or more Boolean functions provided as black-boxes. The proposed algorithm constructs a new black-box with a certain property which is utilized to solve this problem. The introduced algorithm converts measuring the Hamming distance between Boolean functions to measuring entanglement between qubits, using concurrence entanglement measure.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsQuantum Computing Algorithms and Architecture · Quantum Information and Cryptography · Quantum Mechanics and Applications
Measuring Hamming Distance between Boolean Functions via Entanglement Measure
Khaled El-Wazan khaled_ [email protected] Department of Mathematics and Computer Science, Faculty of Science, Alexandria University, Egypt
Abstract
In this paper, we present a fast quantum algorithm to measure the Hamming distance between two or more Boolean functions provided as black-boxes. The proposed algorithm constructs a new black-box with a certain property which is utilized to solve this problem. The introduced algorithm converts measuring the Hamming distance between Boolean functions to measuring entanglement between qubits, using concurrence entanglement measure.
1 Introduction
Given two Boolean functions and both with inputs, the Hamming distance between and is defined as the number of input vectors that outputs different results for both and [1, 2]. To solve this problem classically with exact solution, one will iterate over all possible inputs for both Boolean functions and count when the output of and differs when the input is the same. This procedure will require . When generalizing the problem of measuring the Hamming distance of Boolean functions, the problem will require .
Quantum computers [3, 4] are promising probabilistic devices that guarantee to solve some problems faster than classical computers. For example, Deutsch and Jozsa introduced a quantum algorithm [5] to decide whether a given black-box with inputs represents a constant or balanced Boolean function. L. Grover provided an optimal quantum algorithm [6, 7] to find a single item in an unstructured list of items, only using oracle calls, which was later generalized by Boyer et al. [8] to search for items using oracle calls.
Having a fast quantum subroutine to decide the Hamming distance between Boolean functions is useful. For example, it can be used as a preliminary test before attempting to solve a system of binary multivariate equations via Grover algorithm [9], or to find common matches between databases using quantum search algorithm with partial diffusion [10, 11].
In 2018, Xie et al. proposed a quantum algorithm [12] based on Bernstein-Vazirani algorithm [13] to measure the Hamming distance between two Boolean functions with inputs that requires in some cases with success probability at least . As well, Xie *et al. * proposed a quantum algorithm [12], based on quantum amplitude amplification and estimation algorithm [14, 8], that measures the Hamming distance between two Boolean functions given that the Hamming distance is , and requires \mathcal{\theta}\big{(}\sqrt{\frac{N}{\lfloor\epsilon t\rfloor+1}}+\sqrt{\frac{t(N-1)}{\lfloor\epsilon t\rfloor+1}}\big{)} queries with accuracy .
Quantum entanglement [15, 16, 17, 18] is one of the quantum phenomena that established itself as a crucial and useful resource for processing quantum information and quantum communication [19, 20]. For example, it is utilized in quantum search algorithm with reliable behavior [11], quantum junta testing and learning of Boolean functions [21] and quantum key distribution [22]. Many entanglement-based applications [23] require detection of such phenomenon and quantifying it. Several methods of entanglement detection have been proposed [24] such as entanglement witness operator [25, 26], quantum state tomography [27, 28] and concurrence entanglement measure [29, 30].
In this paper, we propose a fast quantum algorithm to measure the Hamming distance between two Boolean functions provided as black-boxes. The proposed algorithm utilizes quantum superposition to mark the common inputs that satisfy both the black-boxes with entanglement. The suggested algorithm converts the problem of measuring the Hamming distance between Boolean functions to measuring entanglement between qubits. The proposed algorithm is later generalized to measure the Hamming distance of Boolean functions provided as black-boxes. The introduced algorithm works even if the Hamming distance is equal to zero.
This paper is organized as follows: Section 2 introduces the basics and concepts of quantum entanglement and concurrence entanglement measure. Section 3 depicts the construction of the new black-box. Section 4 introduces the proposed quantum algorithm. Section 5 provides analysis of the proposed algorithm, followed by a conclusion in Section 6.
2 Preliminaries
2.1 Notations and Definitions
Definition 2.1**.**
Given a set of Boolean functions each with inputs, we say that the Hamming distance between the given Boolean functions is defined as the number of entries that maps those Boolean functions to different outputs, i.e.
[TABLE]
Definition 2.2**.**
We say that the pure state in Hilbert space is separable, if we can decompose the state to the states and such that:
[TABLE]
otherwise, the state is called entangled [24].
Definition 2.3**.**
Toffoli gate [31] is a gate with three qubits, taking three qubits as input and producing the result by flipping the third qubit, which is considered the target qubit, if and only if the first two qubits are equal to . Figure 1 illustrates Toffoli gate.
Definition 2.4**.**
For a given Boolean function , we define unitary gate such that:
[TABLE]
where .
Definition 2.5**.**
Given a black-box representing a Boolean function , we state that the black-box is a unitary operator working on qubits, taking the control from the first qubits, , and its target is the qubit indexed [10]. The stated configuration is denoted as . Figure 2 illustrates the defined black-box.
2.2 Black-Box Categorization Algorithm
In [21], we introduced a quantum algorithm that uses concurrence entanglement measurement operator to categorize any given Black-box representing a Boolean function to either a constant, a balanced or a Boolean function of other form. The proposed quantum entanglement measurement operator [21] acts on a given qubit with index and an extra qubit initialized with the state , and creates a measurable entanglement between the qubit indexed and the extra qubit using CNOT gate. Figure 3 represents the proposed operator,
where is an entanglement measure device that measures the entanglement between the designated qubits and the extra qubit .
The entanglement will happen if and only if the qubit indexed is in superposition, and for a quantum system that exhibits entanglement,
[TABLE]
the concurrence is defined as follows [29]:
[TABLE]
The algorithm starts with the initial state and proceeds as follows:
[TABLE]
where and are
[TABLE]
By applying the concurrence measurement operator on the last two qubits, the measured concurrence can be expressed as follows [21, 32]:
[TABLE]
where is the number of solutions that satisfies the black-box such that . Depending on the measured concurrence, the Boolean function is categorized as follows:
[TABLE]
3 Constructing the Black-box
In this section, given black-boxes representing Boolean functions with inputs, we will construct a new black-box which will be utilized to measure the Hamming distance between those Boolean functions. For illustrative purposes, we will construct for black-boxes, and after this, we will broaden the constructed black-box for .
3.1 Constructing for two Boolean Functions
In this section, we construct a new black-box from two black-boxes and representing Boolean functions and , respectively. Figure 4 illustrates the proposed black-box.
We can represent the constructed black-box for as a quantum circuit defined as follows:
[TABLE]
where is the toffoli gate with two control qubits indexed and , and target qubit indexed .
Let’s study the constructed black-box in the presence of uniform superposition.
Register Preparation. Prepare a quantum register of qubits in the state :
[TABLE] 2. 2.
Register Initialization. Apply Hadamard gate on the first qubits to get a uniform superposition of all the possible states:
[TABLE] 3. 3.
Applying the Oracle . Apply the oracle on the register to mark all possible solutions of the function using the qubit indexed :
[TABLE] 4. 4.
Applying the Oracle . Apply the oracle on the register to mark all possible solutions of the function using the qubit indexed :
[TABLE] 5. 5.
Applying the Toffloi gate. Apply the toffloi gate on the qubits indexed and to mark all possible common solutions between the functions and using the qubit indexed as the target qubit, where non-common solutions will be marked with and the common solutions will be marked with :
[TABLE]
such that is the AND logic operation.
It is clear that after applying the black-box , we will have all the joint states that satisfy both the Boolean function and marked using the qubit indexed .
3.2 Constructing for Boolean Functions
Given black-boxes all of inputs and axillary qubits, we generalize the constructed black-box to measure the Hamming distance between the given black-boxes. Figure 5 illustrates the proposed black-box.
We can represent the constructed black-box for as a quantum circuit defined as follows:
[TABLE]
where is the toffoli gate with controls.
The general system in a uniform superposition for can be generally described as follows:
[TABLE]
where and is the AND logic operation.
4 The Proposed Algorithm
In this section, we propose a quantum algorithm to measure the Hamming distance of Boolean functions provided as black-boxes. The proposed algorithm utilizes the new constructed black-box in Section 3 to measure the Hamming distance using concurrence entanglement measurement operator. Figure 6 illustrates the proposed algorithm.
The algorithm is carried quantum mechanically as follows:
5 Analysis of the Proposed Algorithm
In this section, we will elaborate the behavior of the proposed algorithm with the proposed concurrence entanglement measurement operator, with respect to all possible scenarios, for any given black-boxes.
Let’s assume the state of the quantum system in the proposed quantum algorithm before applying and focusing on the last two qubits, indexed and , is as follows:
[TABLE]
Applying the CNOT gate on :
[TABLE]
and after applying the quantum entanglement measurement operator on the quantum system , Equation 2.12 can be reformulated as follows:
[TABLE]
where is the number of common solutions between the given Boolean functions.
5.1 In Case Concurrence is Detected
In such case, the quantum system can be described as follows:
[TABLE]
then after applying the operator , there will be a measurable entanglement. Solving Equation 5.3 for unknown , the Hamming distance between the Boolean functions can be defined as follows:
[TABLE]
5.2 In Case No Concurrence is Detected
In this case, there are two reasons that will produce no entanglement:
When , which means that all given Boolean functions produce different output when they are given the same input. In such case, the quantum system can be described as follows:
[TABLE] 2. 2.
When , which means that all given Boolean functions agree on the output when the input is the same. In such case, the quantum system can be described as follows:
[TABLE]
To be able to distinguish between those cases, we measure the qubit indexed as in Step 9 of the proposed algorithm, assuming the output is . If then,
[TABLE]
but if then,
[TABLE]
6 Conclusion
In this paper, we introduced a fast quantum algorithm to measure the Hamming distance between Boolean functions provided as black-boxes. Using the provides black-boxes, we constructed a new black-box that exhibits the behavior of finding the common solutions of the provided black-boxes. We transformed the problem of determining the Hamming distance between Boolean functions to measuring entanglement between qubits. The proposed quantum algorithm requires a single oracle call to all Boolean functions to determine the Hamming distance, and works even when the Hamming distance is equal to zero, opposite to relevant work.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] A. Galatenko and V. Galatenko, “On the hamming distance between almost all boolean functions,” Journal of Mathematical Sciences , vol. 172, no. 5, pp. 650–653, 2011.
- 2[2] C.-K. Wu, D. Feng et al. , Boolean functions and their applications in cryptography . Springer, 2016.
- 3[3] R. P. Feynman and I. Meeting, “Quantum mechanical computers 1,” Optics News , vol. 16, no. 6, pp. 507–531, 1986.
- 4[4] S. Lloyd, “A potentially realizable quantum computer.” Science , vol. 261, no. 5128, pp. 1569–1571, 1993.
- 5[5] D. Deutsch and R. Jozsa, “Rapid solution of problems by quantum computation,” Proceedings of the Royal Society A , vol. 439, no. 1907, pp. 553–558, 1992.
- 6[6] L. K. Grover, “Quantum mechanics helps in searching for a needle in a haystack,” Physical Review Letters , vol. 79, p. 325, 1997.
- 7[7] C. Zalka, “Grover’s quantum searching algorithm is optimal,” Physical Review A , vol. 60, no. 4, pp. 2746–2751, 1999.
- 8[8] M. Boyer, G. Brassard, P. Høyer, and A. Tapp, “Tight bounds on quantum searching,” Fortschritte der Physik: Progress of Physics , vol. 46, no. 4-5, pp. 493–505, 1998.
