Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [algorithm]

For questions on quantum algorithms. That is, algorithms which in theory can be executed by quantum computers, usually the computers providing 'universal' quantum computation.

3
votes
0answers
15 views

Counting in Q#: number of solutions

I have this program derived from Microsoft Quantum Katas for counting (see here): ...
3
votes
0answers
29 views

Does HHL implementation requires a priori eigendecomposition?

I am interested in HHL algorithm and despite all the problems related to current technologies, I am trying to understand how it has to be implemented. I have seen from these two available circuits (...
3
votes
1answer
45 views

Is the Bernstein-Vazirani algorithm dependent on the specific behavior of the oracle?

My understanding of the Bernstein-Vazirani algorithm is as follows: We have a black box oracle with secret string $s$. The black box does $$f(x) =s\cdot{x}(\sum_1^n s_i\cdot{x_i})$$ We run each qubit ...
1
vote
1answer
41 views

Correct way of expressing a measurement in a different computational basis

Sometimes we find that the result we want from a quantum algorithm is expressed in terms of a basis that is different from the usual computational basis, which I will call $$ B_C = \left\{ \lvert 0 \...
3
votes
1answer
46 views

Reversible crypto systems for use in the Grover's algorithm

I'm working on some papers (here and here) that use the Grover algorithm to crack krypto systems like AES and SHA. I had already asked a first question here. Now, however, a new question has arisen ...
4
votes
1answer
64 views

Controlled unitary from the HHL algorithm – practical implementation using Qiskit

I have a question about the implementation of the controlled unitary $e^{iAt}$, from the paper Demonstration of a Quantum Circuit Design Methodology for Multiple Regression, using the Qiskit framework....
3
votes
0answers
69 views

What can be some bachelor thesis ideas in quantum random walks?

Note: Cross-posted on Theoretical Computer Science Stack Exchange. I am an undergraduate, reading about quantum information and quantum technology. For about some time, I have been interested in the ...
4
votes
1answer
235 views

Understanding this description of teleportation

In the context of quantum teleportation, my lecturer writes the following (note that I assume the reader is familiar with the circuit): If the measurement of the first qubit is 0 and the measurement ...
3
votes
1answer
122 views

Grover's algorithm – DES circuit as oracle?

In the literature before me, the quantum oracle of the Grover algorithm is shown as a function, in which a sign change is made possible $|x\rangle\rightarrow(-1)^{f(x)}|x\rangle$. I have read that it ...
4
votes
1answer
88 views

Prove that the operator $H U_{0^\perp}H$ can be expressed as $2|\psi\rangle\langle\psi|-I$

I'm trying to solve the following problem related to the mathematical explanation of Grover's algorithm. Let $$ \lvert\psi\rangle = \dfrac{1}{\sqrt{N}} \sum_{x=0}^{N-1}{\lvert x \rangle} \,\text{,} $$...
2
votes
1answer
43 views

Calculating entries of unitary transformation

Let $U$ be a unitary $n$-qubit transformation that applies a Hadamard on the $k$-th qubit and the identity on all the others. How would I go about calculating $U_{ij}=\langle i | U | j \rangle$ in ...
3
votes
1answer
71 views

Are there any other published quantum factoring algorithms that are simpler or more efficient than Shor’s?

How many qubits and what is the minimum number of gate operations needed to factor an n-bit integer? Are there any other published algorithms that are simpler or more efficient?
1
vote
1answer
42 views

Quantum transformation equivalent to Discrete Wavelet transform

Suppose we have a matrix $A=\begin{bmatrix} 2 &4 \\ 1 & 4\\ \end{bmatrix}$, when applying the discrete wavelet transform to this matrix we get 4 parts i.e smooth part ($1\times 1$) matrix, 3 ...
3
votes
0answers
43 views

What are applications of HHL's “simple example” to determine similar stable states of different quantum processes?

The HHL paper "Quantum algorithm for linear systems of equations" [link] initially describes a "simple example" to illustrate the potential power of their algorithm. They state: Consider a ...
2
votes
1answer
68 views

Reason for evaluating $a^x \bmod N$ from $x = 0$ to $N^2$

As per the Shor's algorithm, we need to evaluate $a^x \bmod N$ from $x = 0$ to $N^2$. What is the reason for this? Why can't we just evaluate for $N$, $2N$ or something like that?
3
votes
0answers
63 views

Quantum addressing scheme

Nielsen explains how a search algorithm can access a classic database. I have a few questions. I hope you can help me a bit :) I work with a few quotes from the book. The principle of operation is ...
5
votes
2answers
138 views

Hidden shift problem as a benchmarking function

I encountered the hidden shift problem as a benchmarking function to test the quantum algorithm outlined in this paper (the problem also features here). There are two oracle functions $f$, $f'$ : $...
4
votes
0answers
94 views

Is there a BQP algorithm for each level of the polynomial hierarchy PH?

Note: Cross-posted on Theoretical Computer Science SE. This question is inspired by thinking about quantum computing power with respect to games, such as chess/checkers/other toy games. Games fit ...
3
votes
0answers
58 views

Genetic algorithm does not converge to exact solution

I'm trying to evolve quantum circuits using genetic algorithms as they did in this paper Decomposition of unitary matrices for finding quantum circuits: Application to molecular Hamiltonians (Daskin &...
3
votes
1answer
294 views

Grover's algorithm: number of searches

I would like to start my question with a quote: If an encrypted document and its source can be obtained, it is possible to attempt to find the 56-bit key. An exhaustive search by conventional means ...
6
votes
2answers
164 views

Will quantum computers be able to solve the game of chess?

Will it be possible to use quantum computing to one day solve the game of chess? If so, any estimate as to how many qubits it would require? The game of checkers has already been solved through back ...
2
votes
1answer
49 views

Consequences of Grover's algorithm

I want to look more closely at the consequences of the Grovers algorithm. As is well known, the algorithm provides a quadratic improvement compared to classical search algorithms. Specifically, I ...
7
votes
0answers
153 views

Is there a list of accessible open problems in quantum computing from a theoretical computer science perspective?

(Classical) theoretical computer science (TCS) has a number of outstanding open problems that can easily be instantiated in a manner that is accessible to a wider general public. For example, ...
0
votes
1answer
80 views

What can be a mini research project based on Grover's algorithm or the Deutsch Jozsa algorithm?

I need to work out a research project on quantum computing as a part of my curriculum. I was wondering how to implement something theoretically with the basic knowledge I have. I have learned about ...
3
votes
1answer
65 views

How does an oracle function in Grover's algorithm actually work?

I have lately been studying quantum algorithms. I have gone through the Deutsch algorithm and Grover's algorithm. There's always a function in the oracle which somehow 'recognizes' the solution ...
5
votes
0answers
95 views

Proof of the optimality of Grover's algorithm

I am currently working on the proof of Grover's algorithm, which states that the runtime is optimal. In Nielsen they say, the idea is to check whether $D_k$ is restricted and does not grow faster ...
5
votes
2answers
479 views

How to prove that the query oracle is unitary?

The query oracle: $O_{x}|i\rangle|b\rangle = |i\rangle|b \oplus x_{i}\rangle$ used in algorithms like Deutsch Jozsa is unitary. How do I prove it is unitary?
5
votes
1answer
80 views

Phase estimation algorithm: probability bound of obtaining $m$

Note: Cross-posted on Physics SE. Hi, I'm studying the quantum phase estimation algorithm from this book: M.A. Nielsen, I.L. Chuang, "Quantum Computation and Quantum Information", Cambridge Univ. ...
2
votes
1answer
69 views

Deutsch–Jozsa algorithm: why is $f$ constant?

I'm trying to understand how the Deutsch–Jozsa algorithm works with the following circuit: Circuit in Quirk Since we have the top 2 wires measuring $|0\rangle$ with 100% probability, it means $U_f$ ...
5
votes
1answer
68 views

Quantum speedup without entanglement

Is there an instance of a quantum algorithm that is faster than its classical counterpart, but doesn't use entanglement, only superposition?
2
votes
1answer
45 views

Estimation of Z in the quantum Euclidean algorithm

In this paper there is a quantum algorithm that can estimate the distance between a given vector U and a set of vectors V (by taking the mean). In some part of the algorithm, we need to find the sum ...
2
votes
3answers
130 views

Swap Test for vector difference - how are different sized inputs combined?

I'm working on a similar problem of that raised by Aman in Inner product of quantum states Concerning the use of Swap Test for calculating the difference of two vectors. An example of the original ...
5
votes
1answer
71 views

What is the hidden subgroup in Simon's problem?

Given access to an oracle for a function $f:\{0,1\}^n\to\{0,1\}^n$ such that $f(x)=f(y)$ iff $x\oplus y\in\{0,s\}$, Simon's algorithm allows to recover $s$ in $\mathcal O(n)$ queries to the oracle. ...
5
votes
1answer
81 views

Durr and Hoyer's: A Quantum Algorithm for Finding the Minimum

I'm trying to understand this algorithm: arXiv:quant-ph/9607014 and I already have a problem on page 1, when they say that initializing the memory and "marking the elements $j$ such that $T[j]<T[y]$...
4
votes
1answer
61 views

Adapting search algorithm to search the minimum in a database in $O(\sqrt{N}\log(N))$ queries

I need some hint on how to adapt grover's algorithm to search the minimum in a database with $N=2^n$ elements in $O(\sqrt{N}\log(N))$ queries with probability of success $\geq 2/3$. I know I can do it ...
2
votes
1answer
76 views

How do you implement the gates for Grover's algorithm for more than 4 elements?

I am currently working intensively on the Grover algorithm and have understood the individual "building blocks" of the algorithm so far. There are also references in the literature to Nielsen, e.g. an ...
5
votes
3answers
181 views

How is the Grover-Algorithm applied to a database?

Question I want to use the Grover-Algorithm to search an unsorted database for an element $x$. Now the question arises, how do I initialize index and value of the database with the qubits? Example ...
2
votes
0answers
33 views

Grover's algorithm and Battleship solution

I have read that quantum computers are not known to be able to solve NP-complete problems in polynomial time. However, if you consider a game of Battleship with grid size $X, Y$ and represent this by ...
2
votes
2answers
52 views

Computing max of 2, length n bit registries

Define a quantum algorithm that computes the maximum of two n-qubit registers. From Quantum Computing: A Gentle Introduction (Eleanor Rieffle & Wolfgang Polak), exercise 6.4.a (page 121). I ...
0
votes
1answer
36 views

Why do we search for square roots of 1 in Shor's algorithm unlike the qudratic sieve?

In the quadratic sieve algorithm, the idea is to find $a$ and $a$ such that $a^2 \equiv b^2 \bmod n$. We need that $a\not\equiv \pm b \bmod n$. However, there the $c$ is not necessarily $1$. $\gcd(b \...
1
vote
1answer
42 views

Confusion regarding probability of period resulting in factoring

This is a sequel to How does $x^{\frac{r}{2}} \equiv -1 \pmod {p_i^{a_i}}$ follow from "if all these powers of $2$ agree"? Polynomial-Time Algorithms for Prime Factorization and Discrete ...
4
votes
1answer
28 views

How does $x^{\frac{r}{2}} \equiv -1 \pmod {p_i^{a_i}}$ follow from “if all these powers of $2$ agree”?

Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer (Shor, 1995) [p. 15] To find a factor of an odd number $n$, given a method for computing the order $...
3
votes
1answer
78 views

Proof that Grover's operator can be written as $D_N=-H_n R_N H_n$

I am interested in showing the validity of the Grover operator. Now there are several ways to show it. One way is with complete induction. It has to be shown that the following relationship applies: $...
1
vote
3answers
194 views

How to prove teleportation does not violate no-cloning theorem?

For a given teleportation process as depicted in the figure, how one can say that teleporting the qubit state $|q\rangle$ has not cloned at the end of Bob's measurement?
2
votes
0answers
24 views

How to apply unitary coupled cluster to a spin problem?

I understand how to apply UCC to a problem formulated in a second-quantized (fermion) form: you start with some state and then create a unitary operator out of single-body (or double-, triple- and so ...
3
votes
1answer
93 views

Creating an ansatz for variational quantum algorithms?

I was recently reading through the tutorial on the Cirq documentation about creating variational quantum algorithms, and I came to the section on ansatz preparation. The way that the ansatz is ...
5
votes
0answers
119 views

Circuit construction for Hamiltonian simulation

I would like to know how to design a quantum circuit that given a Hermitian matrix $\hat{H}$ and time $t$, maps $|\psi\rangle$ to $e^{i\hat{H}t} |\psi\rangle$. Thank you for your answer.
1
vote
2answers
79 views

Is there a way to reverse the amplitudes of a quantum system?

For example in grover search algorithm, assuming that the amplified amplitude is $\alpha$ , is it possible to perform this operation : $\alpha |0...\rangle + \beta |1...\rangle \longmapsto \beta|0...\...
4
votes
1answer
60 views

Garbage-Free Reversible Binary-To-Unary Decoder Construction

In designing reversible circuits one of the useful circuits is the decoder. The operation of a decoder is naturally reversible, so it makes sense to be able to create one with no garbage outputs. ...
12
votes
0answers
177 views

Quantum machine learning after Ewin Tang

Recently, a series of research papers have been released (this, this and this, also this) that provide classical algorithms with the same runtime as quantum machine learning algorithms for the same ...