All Questions
42 questions
0
votes
1
answer
61
views
How to program Grover's Operator?
I understand the theory behind Grover's operator but I still am unsure how to code it. I have a quantum circuit with 13 qubits. Could someone please tell me step by step the code to use for Grover's ...
0
votes
0
answers
19
views
How does amplitude amplification work (in Grover's Algorithm) and does this code for it work?
I understand amplitude amplification at a high level: operations and gates are applied to the qubits such that the solution states amplitude is raised while the non-solution states are lowered. ...
2
votes
1
answer
231
views
Where to find the Grover's algorithm for Qiskit 1.0.2?
Can anyone please provide me with the latest version of qiskit 1.0.2 Grover's algorithm, as the earlier version is throwing an error.
1
vote
1
answer
113
views
What is wrong with my quantum grover's algorithm?
I am trying to create Grover's algorithm in quantum programming with Qiskit to find the target binary string 010.
This is my process :
Apply a Hadamard gate to 4 ...
3
votes
1
answer
200
views
Is it possible to brute force the Salsa-20 algorithm with quantum computing in a reasonable amount of time?
I was recently attacked by the LockBit 3.0 ransomware. I researched it and found this article: LockBit 3.0 Ransomware Unlocked. It said that "files are encrypted using the Salsa-20 algorithm.&...
1
vote
1
answer
194
views
Syntax of Importing LogicalExpressionOracle in IBM Quantum Lab
This article provides a sample code to use Grover's algorithm to solve SAT problems. It requires importing a method called LogicalExpressionOracle. However, when I copied the code into IBM quantum lab,...
1
vote
1
answer
935
views
Solve sudoku using Grover's algorithm
The Qiskit tutorial shows the application of Grover's Algorithm to solve a 2x2 sudoku. However, I don't understand how why its diffuser works as intended. Precisely, why the control bit is on a "...
1
vote
1
answer
94
views
Qubit reset using Grover iteration
Suppose I’m building a long circuit and I need to reuse a qubit from a previous step but I don’t want to use the reset operation (or I’m not using an IBM computer so I don’t even have the reset option)...
1
vote
1
answer
571
views
Insufficient memory to run circuit using the statevector simulator
I am a newbie to quantum and have been trying qiskit library for learning quantum computing (in order to explore quantum effects on cryptography). I am basically ...
1
vote
2
answers
189
views
How do I use the quantum searching algorithm to loop search through a datafile in qiskit?
I have a localhost index.html has a table contains names and address and balances etc... also there is a search bar on the home page to go through the pages, the interesting thing is, there is loooot ...
0
votes
1
answer
240
views
Grover's algorithm for 3SAT problem gives unexpected results
Based on SAT problem and Grover's algorithm, I've done some experiments. For the below example, I've received unexpected results:
Input: boolean function:
...
0
votes
0
answers
85
views
Q# Grover Tutorial Problem
Referring to the Q# tutorial on Grover algorithm in https://docs.microsoft.com/en-us/azure/quantum/tutorial-qdk-grovers-search?tabs=tabid-visualstudio, I replicated the code exactly in Visual Studio ...
4
votes
2
answers
807
views
Phase Oracle in Qiskit Solving Satisfiability Problems using Grover's Algorithm Section
In Qiskit Textbook, there is a section on solving satisfiability problems using Grover's Algorithm. For the 3SAT instance
they construct the following phase oracle:
Is there any reasoning behind ...
1
vote
2
answers
164
views
Setting the $\texttt{state_preparation}$ for $\texttt{AmplificationProblem()}$ in the scope of Grover's algorithm
I am having trouble setting the state_preparation parameter of AmplificationProblem() from ...
4
votes
1
answer
199
views
Does Qiskit Statevector has actual speed up for Grover Search?
From Qiskit document, the Statevector can be used to specify the oracle of Grover Search. After seeing the source code of the operators, it seems a statevector is converted to a rank-1 projector ...
2
votes
1
answer
180
views
Can I use Grover's algorithm on overlapping sets of qubits?
Let's say I have 3 qubits: $q_1,q_2,q_3$.
I want to apply Grover's algorithm on q1,q2, such that q1,q2 $\neq$ 10 and do the same for q2,q3, so that q2,q3 $\neq$ 11. The final possible combinations of ...
3
votes
1
answer
1k
views
Implementing 3-Qubit Grover Algorithm in Qiskit
The Qiskit tutorial on Grover's Algorithm shows an example of finding two marked solutions out of 8 items, produced by 3 qubits. Using the general diffuser code it provides, however, I realize that ...
4
votes
2
answers
1k
views
Implementing Grover's oracle with multiple solutions in Qiskit
I want to turn a state
$$
|\Psi_1⟩ = \frac{1}{\sqrt{8}}(|000⟩+|001⟩+|010⟩+|011⟩+|100⟩+|101⟩+|110⟩+|111⟩)
$$
into
$$
|\Psi_2⟩ = \frac{1}{\sqrt{8}}(|000⟩+|001⟩+|010⟩+|011⟩+|100⟩-|101⟩-|110⟩+|111⟩)
$$
...
1
vote
1
answer
431
views
Multiply-Controlled X Gate/MCT Gate Implementation
I am currently trying to implement a multi-controlled Toffoli/multi-controlled X gate in Braket, but I am confused as to the general concept of cascaded X gates and other implementations. I've read ...
3
votes
3
answers
557
views
Grover's algorithm for finding 6/8 states
I'm trying to apply the diffusion operator to this state (normalization factors excluded):
$|000\rangle + |001\rangle - |010\rangle - |011\rangle - |100\rangle - |101\rangle - |110\rangle -|111\...
2
votes
1
answer
205
views
Connectivity in Grover's algorithm on real quantum computers
Everytime I execute Grover's search algorithm on IBM real quantum computers I get a wrong answer (it doesn't find the correct winner state) unless I use only 2 qubits. For any higher number of qubits ...
1
vote
2
answers
185
views
Question about a circuit from "Quantum Computing for Computer Scientists"
I am trying to implement a basic quantum computing emulator. In the chapter on Grover's algorithm, we're shown the following circuit:
They demonstrate Grover's algorithm with a function $f$ that ...
2
votes
0
answers
111
views
Length / transpilation issues with Grover's algorithm
I would like to discuss the discrepancies between what we see in the simulator versus what we see in the actual running of the code on any IBMQ machine for any qubits at 5 or above. I am doing a final ...
2
votes
0
answers
183
views
How to implement the Maximum or Minimum Searching Algorithm (QUMMSA) circuit in Quirk?
I am Java and Python programmer who started self-learning Quantum Computing a couple of months back. The journey has been thus far very tough. I have been using QisKit and Quirk to learn by in ...
3
votes
1
answer
184
views
Grover's algorithm with matrix_product_state method
I implemented Grover algorithm with matrix_product_state method in qiskit. But I found something strange. I designed the oracle part come out $|1111\rangle$ but, real output was $0011\rangle$. I check ...
5
votes
1
answer
1k
views
Qiskit BasicAer & Aer
While I'm simulating grover's algorithm, I found that with BasicAer backend it works well but with Aer it is not. What is the difference between ...
0
votes
0
answers
305
views
Different result between Q# and Qiskit
I'm running a search program with custom initial state. I wrote a program in Q# and one in Qiskit but I get different results even if the code seems to be peforming the same operations. The Q# result ...
1
vote
1
answer
115
views
Grover algorithm in Q#
I have this program derived from Microsoft Quantum Kata for quantum search (Grover algorithm) (see here)
...
2
votes
2
answers
249
views
Why is the number of solutions given in Qiskit textbook(Quantum Counting Algorithm) as N-M instead of M?
I'm following the Qiskit textbook for Quantum Counting. We have assumed $M$ as the number of states containing solutions throughout the algorithm but at last, $N-M$ has been taken as the solution. ...
1
vote
2
answers
1k
views
How to write decent code for oracle in Qiskit without custom circuit or long truth table?
I am now practising using Qiskit. The example of Grover's algorithm in tutorials suggests using logical expression, truth table or circuit to construct the oracle. In most textbooks on quantum ...
2
votes
1
answer
106
views
How to correctly define $U_\omega$ for Grover's search algorithm
I am working on Grover's algorithm and I am trying to implement the algorithm. I am following the Microsoft quantum katas and I finished and did everything correctly. I am trying to implement the ...
1
vote
1
answer
2k
views
Finding minimum with Grover
I am a beginner in quantum computing. I have already computed the sat quantum solver with Grover search and then, I would like to compute the "minimum search" of Dür and Hoyer. My question is: Is it ...
4
votes
1
answer
130
views
Logical Explanation behind second reflection in Grover's algorithm
Logically, what does the second reflection in Grover's algorithm do? I currently don't have a lot of background in linear algebra so I'm failing to understand what exactly its purpose is and what it ...
3
votes
0
answers
761
views
How to construct the oracle for Grover's search to solve the traveling salesman problem?
Consider the modified version of the Traveling Salesman Problem where you are searching for a path of length less than some $k$. We can solve this problem using Grover's search where we encode each ...
-1
votes
2
answers
375
views
How do you pass input to a circuit? [closed]
I've implemented Grover's search algorithm in qiskit, and I'd like to pass in an input to run through the circuit. How is that done?
4
votes
0
answers
129
views
Grover search for basis states with complex coefficents and multiple marked states
I tried to run Grover's search for basis states with complex coefficients, including the marked basis (complex coefficients because the states are obtained from inverse QFT), but it could not amplify ...
3
votes
1
answer
654
views
Counting in Q#: number of solutions
I have this program derived from Microsoft Quantum Katas for counting (see here):
...
2
votes
1
answer
291
views
Grover's algorithm returns skewed probability distribution
I wrote an implementation of Grover's algorithm that looks like this:
...
3
votes
2
answers
584
views
Finding the second smallest number. Is it achievable in QC?
I have a set of numbers in a superposition state (example: 3,8,1,5) in a quantum register (of 3 qubits).
So I try to find the $n^{\text{th}}$ smallest number (...
5
votes
2
answers
426
views
Why is Grover's algorithm not converging monotonically? (Python implementation)
I have tried to implement Grover's algorithm for three qubits in python/numpy and the first two iterations work like a charm but the third one starts to diverge. Is this expected, or is there a bug in ...
6
votes
1
answer
981
views
How to create the oracle matrix in Grover's algorithm?
I'm trying to implement Grover's algorithm in pyQuil, but I'm having trouble creating the oracle matrix given the function $f$, where $f(x)=1$ if $x=w$ and $f(x)=0$ otherwise. In most of the ...
4
votes
1
answer
1k
views
Practical example of Grover's algorithm (in Q#)
Is there any real example for Grover's algorithm but with real database (generated from SQL or file)? I download the Q# development kit & its example, there was one call DatabaseSearchExample ...