Questions tagged [quantum-algorithms]

For questions about quantum algorithms, that is, sequences of quantum gates, operations, and measurements, whose purpose which achieve some goal. Standard examples are Shor's and Grover's algorithms.

Filter by
Sorted by
Tagged with
3 votes
1 answer
99 views

Grover's Algorithm: Why is the amplitude of $\left|a_{0}\right>$ after the second iteration $\frac{1}{\sqrt{N}}(5-\frac{20}{N}+\frac{16}{N^{2}})$?

Grover's Algorithm: Why is the amplitude of $\left|a\right>$ after the second iteration $\frac{1}{\sqrt{N}}(5-\frac{20}{N}+\frac{16}{N^{2}})$? If I apply the Grover operator twice to the initial ...
The Thin Whistler's user avatar
2 votes
2 answers
108 views

What is a universal quantum algorithm?

Nobody seems to define the term anywhere. It's in the abstract of "Factoring integers with sublinear resources on a superconducting quantum processor" by Bao Yan, Ziqi Tan, Shijie Wei et ...
user851954's user avatar
2 votes
1 answer
136 views

Is a diagonal matrix with one non-zero element a measurable observable?

The HHL algorithm prepares the output state $|x\rangle$. However, we cannot efficiently measure the state directly to get its components. Instead, we can construct an operator $M$ to find $\langle x|M|...
Dominik Vereno's user avatar
1 vote
2 answers
127 views

Problem adding two numbers in a quantum computer with Drapper's algorithm

I would like to add numbers. In this simple example a = 1 and b = 1. The circuit I created looks like this: We have two registers a and b. Both have a size of 3 qubits. I'm using Big Endian notation, ...
Oli's user avatar
  • 57
2 votes
1 answer
230 views

How many gates can I put on a 27 qubit quantum computer

Recently I've been wondering how many gates I can put on a 27 qubit quantum computer, for example can I put like a million gates? And also will that increase the time for the result to be calculated?
yaseen's user avatar
  • 29
0 votes
1 answer
249 views

How to install qiskit-research in IBM quantum lab?

When I study ‘Dynamic decoupling’, one method is add_dynamical_decoupling. Firstly I should install qiskit_research in my ...
Qingyuan Wang's user avatar
2 votes
1 answer
82 views

traveling salesman output from qiskit docs

In this tutorial https://qiskit.org/textbook/ch-paper-implementations/tsp.html I understood most of the steps of how to build it, but not the result. In the code, I see they don't get to the part of ...
Sfp's user avatar
  • 135
2 votes
1 answer
289 views

How is the fractional binary notation used in the QFT?

I am studying the Quantum Fourier Transform and my question regards section 4 from this link. Specifically, I do not understand the step where they rewrite in fractional binary notation- could someone ...
random person's user avatar
1 vote
1 answer
93 views

CNOT gate in Bernstein-Vazirani Algorithm explanation

I am studying the Bernstein-Vazirani Algorithm from the Qiskit Textbook and I don't understand why specifically the CNOT gate is applied when s[q]=1 (see the code at the end of the linked page). I ...
random person's user avatar
3 votes
1 answer
610 views

Trying to construct modular exponentiation gate in Qiskit

https://qiskit.org/textbook/ch-algorithms/shor.html in this tutorial I don't understand especially in how they define for the modular exponentiation gate with only swap gate (inside c_amod15 function)....
Taufiq Datau's user avatar
5 votes
1 answer
302 views

Applications of Quantum Principal Component Analysis

I have been reading Seth Lloyd's paper on Quantum Principal Component Analysis and while there is a short discussion that points to possible applications, I am having a hard time seeing the advantage ...
Song of Physics's user avatar
7 votes
2 answers
210 views

How to increase the probability of successful measurement to find out the largest amplitude?

I have built a state $$A|0\rangle = |\Psi \rangle = \sum _n c_n |n\rangle$$ Where $A$ is a circuit. And I need to known, where is the largest $|c_n|$. I find out that, I can simply do many ...
Alexis's user avatar
  • 203
1 vote
0 answers
283 views

qiskit.algorithms.optimizers callback function for all optimizers

I am aware that VQE and VQC factory supports callback functions which can allow us to store intermediate values during optimization through callbacks in its arguments. However my loss function is ...
Manas Sajjan's user avatar
2 votes
1 answer
207 views

What are QML algorithms using less than 8 qubits and provide a quantum advantage?

So this is more of a soft question. I've been trying to find some quantum machine learning algorithms can both be run with less than 8 qubits and provide a quantum advantage to classical machine ...
MeltedStatementRecognizing's user avatar
1 vote
0 answers
64 views

Algorithms in Continuous Variable Quantum Computing

I have recently been exploring Continuous Variable Quantum Computing. I would like to know if there are any resources or literature I can read to get a general understanding of how one can extend ...
Song of Physics's user avatar
1 vote
0 answers
203 views

getting error while simulating LiH using VQE

I wrote code again using updated qiskit nature libraries but I am facing error , I need help to finding solution so that we can run this code on latest version of qiskit. I am attaching code below........
Piyush Saklani's user avatar
2 votes
1 answer
207 views

Implementing a Gaussian elimination solver for Simon's algorithm's outcome of linear equations

I'm trying to implement a gaussian elimination solver for the linear equations that are the outcome from simon's algorithm. I implemented two solutions, first: https://stackoverflow.com/a/45527097 ...
Oli's user avatar
  • 57
5 votes
0 answers
120 views

Quantum Representation of the Brouwer problem

Brouwer’s fixpoint theorem guarantees a point, $x_0$, such that $f(x_0)=x_0$ for any continuous $f$ that maps a simplex (N dimensional triangle) to itself. In his presentation of the PPAD complexity ...
Steven's user avatar
  • 51
3 votes
1 answer
144 views

Entangling two non-physically adjacent qubits

Entanglement can be performed just between two ** adjacent qubits** (e.g. 1 and 2) or even non-physically adjacent qubits on the processor architecture can be entangled (e.g. 2 and 6). How entangled ...
rabah hacene benaissa's user avatar
1 vote
0 answers
135 views

Circuit construction for Destructive Swap and DIP test from the VQSD paper

The paper VQSD The Destructive Swap Test computes Tr(στ ). The Diagonalized Inner Product (DIP) Test computes Tr(Z(σ)Z(τ )) via a depth-one circuit. Can you demonstrate how this work?
xu shan's user avatar
  • 31
1 vote
1 answer
59 views

Why $|0\rangle \langle 0|=\frac {1}{n} \sum_{j=1}^{n}|0_j\rangle \langle 0_j|\bigotimes \mathbb {I}_{\overline j}$ in VQLS

I am having some trouble to derive equation In paper Variational Quantum Linear Solver $|0\rangle \langle 0|=\frac {1}{n} \sum_{j=1}^{n}|0_j\rangle \langle 0_j|\bigotimes \mathbb {I}_{\overline j}$ $|...
xu shan's user avatar
  • 31
0 votes
1 answer
223 views

Implementation of QAOA to solve version of knapsack problem

Say I want to fill a knapsack with as many things as possible. I don't care about what they are, simply the number. But I don't want the total weight to exceed a set limit. [https://qiskit.org/...
MeltedStatementRecognizing's user avatar
1 vote
1 answer
89 views

Why can Pauli channels be simulated efficiently?

Why can Pauli channels be simulated efficiently on a classical computer (for the purpose of noise simulation)? Could you please help me get an intuitive understanding and also point me to some ...
Sam's user avatar
  • 187
0 votes
1 answer
130 views

Is Shor demonstration wrong?

in Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer by Peter W. Shor (also in Algorithms for quantum computation: discrete logarithms and factoring). In ...
Philip.q.c's user avatar
1 vote
1 answer
118 views

Confusing notation in Block-Encoding

I'm reading the lecture notes from Ronald de Wolf and got confused at the part where it introduces Block encoding, specifically by this notation at page 76: More generally we can define an $a$-qubit ...
dnnagy's user avatar
  • 141
2 votes
2 answers
229 views

How to factor $N=14$ with Shor's algorithm?

As a practice exercise, I am trying to factor $N=14$ using Shor's algorithm. My initial guess is $a = 5$, and I need a quantum circuit $U$ for: $U\vert y \rangle = \vert 5 \cdot y ~{\rm mod}~ 14 \...
Robert Singleton's user avatar
1 vote
1 answer
83 views

How can I conceptualize virtual indices used in the time evolving block decimation (TEBD) algorithm?

I am trying to work with the Heisenberg $XX$ model which the Hamiltonien is given by $\hat{H} = -J \sum_i \left(\hat{X}_i\hat{X}_{i+1} + \hat{Y}_i\hat{Y}_{i+1}\right), \quad J > 0.$ Using $s^+ = |{...
Jean-Gabriel Chenard's user avatar
0 votes
1 answer
477 views

Implementing Grover's algorithm on 4 qubits

I have the below Oracle function. Below are the marked states for this Oracle function. I wanted to implement Grover's algorithm on 4 qubits. I've been following the below Qiskit notebook: https://...
Amey Meher's user avatar
3 votes
1 answer
258 views

Ancilla intuition, when to use them, how to recognize when I'd want to use them?

Sorry if this is too open ended. I've spent some time studying some various quantum algorithms that involve ancillary qubits. Some examples that come to mind are phase estimation, linear combination ...
Cuhrazatee's user avatar
1 vote
2 answers
129 views

How to check if a mapping is unitary?

In the case of the No-cloning theorem, it is argued that a unitary $U$ that is capable of performing coping does not exist. Specifically, for any two unknown states $|\psi_1\rangle$ and $|\psi_2\...
MonteNero's user avatar
  • 2,481
4 votes
1 answer
438 views

Can numbers be factored by using a reverse multiplication circuit on a quantum computer?

We know that it is possible to factor large numbers on a quantum computer using Shor's algorithm. But how about simply using a multiplication circuit in reverse? The idea is to build a multiplication ...
njoyeux's user avatar
  • 49
2 votes
1 answer
716 views

Pennylane: take qml.state of one function and use it as the initialization for another

In Pennylane, I created a function to set the initial parameters of my qubit, and then called qml.state() to return the output. I now want to feed this initialization into another circuit, but I'm not ...
TuktukTaxi's user avatar
4 votes
1 answer
255 views

Shortest depth on Clifford+T to decompose a Toffoli

I am looking for a reference providing a circuit that has the smallest possible depth, without ancilla, once the Toffoli has been decomposed on Clifford+T gateset, where Clifford is generate by cNOT, ...
Marco Fellous-Asiani's user avatar
3 votes
1 answer
150 views

Why is the triangle finding problem important?

I keep seeing in the literature that the triangle problem can be solved using the quantum walk algorithm. There is plenty of mathematical detail (eg. Magniez et al.'s paper), but I don't get why it's ...
Medulla Oblongata's user avatar
2 votes
0 answers
95 views

What is a quantum algorithm that is the most efficient for numerical calculating a definite integral?

What is a quantum algorithm that is the most efficient for numerical calculating an integral of a function, for example, of one variable on an interval from $a$ to $b$? For instance, the following ...
SFriendly's user avatar
  • 131
3 votes
1 answer
116 views

Are there quantum algorithms which initial state is a mixed one?

In this answer, it is stated that it is not yet known how to efficiently classically simulate separable mixed states, a statement supported in a comment to this answer. However, I can't imagine an ...
Tristan Nemoz's user avatar
  • 6,162
4 votes
3 answers
531 views

Comparison Between FLOPS and CLOPS

I'm now trying to design a quantum circuit via qiskit or pennylane. Here, to show my model's superiority, I'm now finding computational cost metrics (FLOPS in the classical algorithm). In my knowledge,...
JERMY's user avatar
  • 111
2 votes
0 answers
16 views

Is there a code version for the Quantum Mean Approximation algorithm?

I found this paper https://arxiv.org/pdf/1106.4267.pdf which describes a method to find the mean of all numbers in a list using a quantum algorithm. However, all it gives is the math behind it. Is ...
AadiTiwari's user avatar
1 vote
0 answers
53 views

Quantum algortihm for SVD and eigendecompostion

In this paper by Rebentrost, Steffens, and Lloyd, it is stated that: Such tasks [eigen- and singular value decomposition of a matrix] could be performed efficiently via phase estimation on a ...
atman's user avatar
  • 11
0 votes
0 answers
57 views

Understanding Shor algorithm fo Elliptic Curves Demonstration

I was reading Shor's discrete logarithm quantum algorithm for elliptic curves. And i have two questions. In page 7 they say that $x = (x0 - dy) mod q$, where $x0$ is between 0 and q-1, but then they ...
Philip.q.c's user avatar
1 vote
1 answer
92 views

Is there an alternative algorithm to extract a probability of states of qubit after measuring?

Let a simple quantum circuit consist of one qubit and one classical bit. Initially, a qubit has the $|0\rangle$-state and then goes through some sequence of quantum gates, see the circuit below. The ...
SFriendly's user avatar
  • 131
3 votes
2 answers
2k views

What is the fastest quantum computational algorithm by which quantum computer speed up than classic one?

What is the fastest quantum computational algorithm by which quantum computers speed up than classic one? Of course, those speedup algorithms have to be proven.
XL _At_Here_There's user avatar
0 votes
1 answer
47 views

Grover's Algorithm - Diffusion Matrix [closed]

In the Grover's Algorithm, the diffusion matrix $D$ is defined as: $$\begin{cases} D_{ij}=\frac{2}{N} \quad \text{ if } i \neq j \\ D_{ii}=-1+\frac{2}{N} \end{cases}$$ And then it goes on to say &...
Josh's user avatar
  • 387
0 votes
0 answers
43 views

How to obtain the product of the amplitudes of arbitrary basis vectors in a superposition state without measuring?

Suppose there is a superposition state $|{{\Phi }^{+}}\rangle =\sum\limits_{i=0}^{15}{{{\alpha }_{i}}|i\rangle }$, I want to get ${{\alpha }_{i}}\times {{a}_{j}},i\ne j,i,j\in [0,15]$ without ...
Ren-Xin Zhao's user avatar
2 votes
0 answers
169 views

How to implement an unitary operator expressed as a linear combination of unitaries without qubits ancilla

Let's say that I know the decomposition of a unitary operator $\hat{A}$ in terms of other unitary operators $U_{k=0, \dots, M}$, i.e: $$ \hat{A} = \sum_k \alpha_k U_k$$ I know how to implement in ...
Andrés Ruiz's user avatar
2 votes
1 answer
89 views

Encoding arbitrary quantum gates using qubits

Given an arbitrary 3-qubit state $\sum_{xyz} c_{xyz}|xyz\rangle$, is there a circuit (possibly with measurement) that creates the state $\sum_{xy} c_{xyy}|x\rangle$, up to a normalization constant? As ...
Trebor's user avatar
  • 123
1 vote
1 answer
418 views

What Adding Modulo To Register Means

I was reading about the Jordan gradient algorithm(https://arxiv.org/pdf/quant-ph/0405146.pdf) and I am a bit confused about one of the phrases: Next, use the blackbox to compute f and add it modulo $...
MeltedStatementRecognizing's user avatar
1 vote
2 answers
431 views

Quantum Computing Daily Practice / Quiz platform

I am looking for a platform where I can solve quizzes and programming / algorithmic challenges related to quantum computation and information. To be more specific, I am looking for a platform that is ...
Aman Kumar's user avatar
22 votes
1 answer
3k views

An impossible quantum adder claimed by a journal article?

In Quantum adder of two states that are themselves superpositions, I asked: I have two states $|a\rangle = \frac{1}{\sqrt N}\sum_{i=0}^{N-1}|i\rangle|a_i\rangle$ and $|b\rangle = \frac{1}{\sqrt N}\...
Paulske's user avatar
  • 457
3 votes
1 answer
265 views

Quantum adder of two states that are themselves superpositions

I have two states $|a\rangle = \frac{1}{\sqrt N}\sum_{i=0}^{N-1}|i\rangle|a_i\rangle$ and $|b\rangle = \frac{1}{\sqrt N}\sum_{j=0}^ {N-1} |j\rangle|b_j\rangle$, with $i,j,a_i,b_j \in \mathbb{N}$. I ...
Paulske's user avatar
  • 457

1
3 4
5
6 7
24