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

284 questions
0answers
31 views

### Phase estimation error analysis

This question is about Lemma $7.1.2$ in Kaye, Laflamme, and Mosca's textbook: Let $\omega = \frac{x}{2^n} = 0.x_1x_2\ldots x_n$ be some fixed number. The phase estimation algorithm applied to the ...
2answers
60 views

### IBM QISKit: creating a variational algorithm from zero

I would like to implement a variational algorithm (similar to VQE but with another cost function, no expectation of a Hamiltonian involved) from zero. Is there any tutorial explaining how to implement ...
0answers
45 views

### What exactly makes quantum computers faster than classical computers?

What feature of a quantum algorithm makes it better than its classical counterpart? Are quantum computers faster than classical ones in all respects?
1answer
74 views

### Circuit construction for execution of conditional statements using least significant bit

Suppose I have integers and encode them as binary strings for example: $$|0\rangle=|00\rangle,|1\rangle= |01\rangle,|2\rangle=|10\rangle,|3\rangle=|11\rangle.$$ Now an $n$ bit integer, say $x$, is ...
0answers
65 views

### Grover search with single query to $f(x)$ and multiple queries to $f(x) = a$

Assume $f(x)$ is an $n$ bits to $m$ bits function and we want to use Grover's search algorithm to find $x$ such that $f(x) = a$, where $a$ is some $m$-bit predetermined value. When using the ...
1answer
722 views

### Understanding the oracle in Deutsch's algorithm

I am reading John Watrous' notes from his course CPSC 519 on quantum computing. In a pre-discussion before presenting Deutsch's algorithm to determine whether a function is constant or not, the author ...
0answers
41 views

### Is HHL executed in a single run? If yes, how do they carry out controlled rotation without knowing eigenvalues?

Even after reading several papers and almost all HHL related questions and answers here on Quantum Computing Stack Exchange, one thing is yet not clear. In several papers, for illustrating HHL they ...
1answer
26 views

### How to pick number of simulation qubits for finding eigenvalue of fermionic Hamiltonian?

I am having some trouble understanding how the number of simulation qubits are chosen when finding the eigenvalue of a fermionic Hamiltonian. For the phase-estimation algorithm, is the number of ...
1answer
109 views

### Large size of matrices for little outcome [closed]

I am stuck in a dilemma about how to proceed with a quantum computing algorithm that changes the original state of a system to another. Say I have a superposition of all $8$ bit integer values that ...
1answer
70 views

### Grover's algorithm and RSA from Nielsen

Nilsen states that one can define a function for the oracle in the Grover algorithm, which is constructed as follows. So there is a number $m$ that consists of $p$ and $q$ (both primes) $m = pq$. Now ...
2answers
79 views

### Calculating the expectation value of a unitary operator on a quantum computer

What is the smartest way of calculating the expectation value of some unitary $U$ in some state $|\psi\rangle$? There are two ways I know: quantum phase estimation algorithm; Hadamard test. Are ...
1answer
42 views

### Amplitude Estimation Algorithm — Lambda (Q) Operator

I'm working on an implementation of the algorithms described Brassard et al. in the following paper: arXiv:quant-ph/0005055v1. I managed to make the amplitude amplification cases working but I'm ...
0answers
48 views

### Counting in Q#: number of solutions

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

### Does HHL implementation require 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 (...
1answer
69 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 ...
1answer
48 views

1answer
54 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 ...
1answer
88 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?
1answer
46 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 ...
0answers
50 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 ...
1answer
71 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?
0answers
64 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 ...
2answers
150 views