String Comparison on a Quantum Computer Using Hamming Distance

Mushahid Khan, Andriy Miranskyy
6/30/2021
cs.ETcs.DSphysics.bio-ph

Official code: miranska/qc-str (3 stars, Python, Apache-2.0, last commit 2026-10-12).

Abstract

The Hamming distance is ubiquitous in computing. Its computation gets expensive when one needs to compare a string against many strings.

Show full abstract

Quantum computers (QCs) may speed up the comparison. In this paper, we extend an existing algorithm for computing the Hamming distance. The extension can compare strings with symbols drawn from an arbitrary-long alphabet (which the original algorithm could not). We implement our extended algorithm using the QisKit framework to be executed by a programmer without the knowledge of a QC (the code is publicly available). We then provide four pedagogical examples: two from the field of bioinformatics and two from the field of software engineering. We finish by discussing resource requirements and the time horizon of the QCs becoming practical for string comparison.

View on arXivView PDF

Code Implementations(1)

miranska/qc-strOfficial100%
Apache-2.0
32PythonJun 29, 20211 months agoApache-2.0

Similar Papers

Cite this paper

@article{khan2021string,
  title  = {String Comparison on a Quantum Computer Using Hamming Distance},
  author = {Mushahid Khan and Andriy Miranskyy},
  year   = {2021},
  eprint = {2106.16173},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2106.16173}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2106.16173.svg)](https://codeofpaper.com/paper/2106.16173)

Discussion