Questions tagged [qaoa]
For questions about the Quantum Approximate Optimization Algorithm (QAOA), first introduced in Farhi, Goldstone, Gutmann 2014 (https://arxiv.org/abs/1411.4028).
179
questions
2
votes
0
answers
22
views
Why is my graph wrong when trying to visualize the max-cut in qiskit?
I think my QAOA code is correctly solving the max-cut but the visualization is wrong.
I am working on solving the Max-cut problem using QAOA. I started small-scale with a 5 node bipartite graph. I ...
1
vote
0
answers
69
views
How to map a constraint to the output of a binarized continuous Quadratic Optimization problem?
I have the following quadratic cost function
$$
J(t) = \int_{0}^{t} \left[ z(\tau)^\ast A z(\tau) + w(\tau)^\ast B w(\tau) \right] d(\tau)
$$
where $w = -Rz$ and A and B are matrices whose values are ...
1
vote
0
answers
56
views
SparsePauliOp' object has no attribute 'primitive_strings' warning for a max-cut problem using QAOA and MinimuEigenOptimizer
I am using Qiskit to implement QAOA for a max-cut problem. I am using inbuilt qiskit implemetation of QAOA and, the MinimuEigenOptimizer. The MinimuEigenOptimizer.solve() throws the warning.
...
3
votes
0
answers
27
views
Cost function lagrangian equality penalty in QAOA
I try to apply the QAOA to a given problem composed of $x_1,\dots,x_n$ boolean (0/1).
Each variable $x_i$ is then encoded on one qubit.
There is the constraint on theses variables that :
\begin{...
2
votes
1
answer
91
views
How to apply the QAOA in such a QUBO problem?
It was a rainy night, bro was learning QAOA and stuck on such a problem. For example, 100 CAD is exchanged for USD, USD is exchanged for EUR, and EUR is then exchanged back to CAD. The final value in ...
0
votes
1
answer
131
views
ValueError: The number of qubits of the circuit (127) does not match the number of qubits of the ()-th observable (4)
I am quite new to qiskit and i am trying to build a qaoa for portfolio optimization, but i get this error and i am not able to resolve this issue: ValueError: The number of qubits of the circuit (127) ...
1
vote
2
answers
43
views
How to easily get the number of qubits required when using QAOA from qiskit_algrithms?
I would like to know if there is a easy way or native solution to retrieve the number of qubits that is required when using QAOA from qiskit_algorithms package to ...
0
votes
1
answer
44
views
Problem with understanding advantage of QAOA over bruteforce
I am trying to figure out with QAOA alghorithm. I use the example from this qiskit notebook https://github.com/Qiskit/textbook/blob/main/notebooks/ch-applications/qaoa.ipynb.
I have the question to ...
3
votes
2
answers
69
views
Feasibility of Applying QAOA to Quantum Chemistry Calculations
Is it possible to apply QAOA (or quantum alternating operator ansatz) to quantum chemistry calculations for NISQ devices? If not, why? If it is possible, why is it not commonly seen?
3
votes
1
answer
69
views
Optimization in QAOA should only return global minimum?
I am working on a project dealing with QAOA and I have some theoretical question about this last one. I hope I could find someone familiar with the field.
QAOA is usually used to solve combinatorial ...
1
vote
0
answers
33
views
Adiabatic evolution vs QAOA
Attempting to understand some basics here before
developing an quantum algorithm.
Would of you be able to help clarify the
following definitions I attempted to construct
which compare the two ...
1
vote
0
answers
17
views
"Session has been closed" Error in solving Maxcut problem by QAOA
I am trying to run this code- https://learning.quantum.ibm.com/tutorial/quantum-approximate-optimization-algorithm same way as they mentioned. After running this code, my qiskit Dashboard show 10-12 ...
0
votes
0
answers
50
views
How to interpret result for an OR problem solved in Qiskit
I solved "01 KnapSack problem" in Qiskit optimization module. Though the iterations doesn't gets converged but I got an answer (may be infeasible). But my question is that how to interpret ...
3
votes
3
answers
294
views
How to convert a combinatorial optimization problem into a problem hamiltonian
I want to ask how I can convert any combinatorial optimization problem into a Problem Hamiltonian, since such a conversion is needed in order to solve an optimization problem on quantum hardware (e.g. ...
1
vote
1
answer
78
views
How to correctly compute expectation value in QAOA?
In QAOA after prepating $|\psi(\gamma, \beta) \rangle$, expectation value $\langle \psi(\gamma, \beta)|H_c|\psi(\gamma, \beta) \rangle$ is computed. In tutorials, I see two approaches to this ...
1
vote
0
answers
28
views
Do encoding schemes for variational algorithms apply to annealing methods (e.g. DWave)?
I understand there are some efficient encoding schemes for variational algorithms, that attempt to approximate the variational state using fewer qubits. I'm thinking of 2 papers in particular, which ...
0
votes
1
answer
57
views
Solving optimization problems on real quantum hardware
I want to know how to solve a 01 Knapsack problem (or any optimization problem) on real Quantum Hardware only. I don't want to use an Application class or any classical simulation technique.
If anyone ...
2
votes
0
answers
18
views
Can dimensionality reduction be used to simplify data before using an optimization algorithm?
I am attempting to use a quantum algorithm, like a QAOA, to solve an optimization problem. I saw that qPCA can be used to simplify datasets and make them easier to analyze. Can quantum optimization be ...
1
vote
1
answer
215
views
How to convert QUBO (with non-zero diagonal elements) to Maxcut?
I want to solve QUBO with non-zero diagonal elements in matrix Q using QAOA. But I want to solve for a large enough problem size (30+ variables) and hence want to divide my circuit into subcircuits. ...
1
vote
1
answer
149
views
Combinatorial optimization problem via VQE instead of QAOA
I'm studying about the hybrid quantum algorithms and I have a question about the VQE and QAOA.
It seems like QAOA is a part of VQE that use a certain ansatz for solving combinatorial optimization ...
1
vote
0
answers
79
views
How to run the post processing and return results in QAOA?
As suggested in TranspilerError: 'Number of qubits (40) in QAOA is greater than maximum (30) in the coupling_map' issue. I managed to submit the job to IBM quantum and the circuit runs successfully.
...
2
votes
2
answers
456
views
TranspilerError: 'Number of qubits (40) in QAOA is greater than maximum (30) in the coupling_map'
Hi Ive been trying to solve a custom PO problem using QAOA and I ran into this particular error. As per my understanding,this is due to the limitation of the simulation hardware. But as per the ...
1
vote
0
answers
22
views
What is the benefit of using a Multi Angle QAOA?
I am currently doing some research that requires a quantum optimization algorithm. I have been looking at types of quantum algorithms to see which one would be most useful for my problem and ...
4
votes
1
answer
351
views
Are there techniques to reduce the number of Pauli strings in a Hamiltonian?
Suppose $H=\sum_{i \in n} c_i h_i$ is a generic Hamiltonian. Is there a way to find $\tilde{H} = \sum_{j \in m} d_j h_j$ where $m < n$ is a user defined cut-off parameter that would accurately ...
1
vote
0
answers
98
views
How to solve a QUBO problem by QAOA algorithm with Qiskit Optimization on a real quantum resources/hardware?
I am new to quantum computing, and I am following this tutorial trying to use Qiskit Optimization 0.6.0 to solve a simple quadratic problem by applying QAOA algorithm.
As stated in the tutorial, I ...
1
vote
0
answers
61
views
Qiskit bad unitary decomposition
I want to decompose a two-qubit unitary gate $U$,
$$U = e^{-i \cdot \frac{t}{2} \cdot Z_1 \cdot Z_2}\,,$$ where $t$ is an angle.
I already know the right decomposition but Qiskit gives me an ...
1
vote
1
answer
77
views
Question on efficiency of HOBO Quadratization and other depth reducing techniques
I am having trouble understanding some concepts in Quadratizing a high order polynomial. I am reading the review "Quadratization in Discrete Optimization and Quantum Mechanics" .
I would ...
1
vote
1
answer
293
views
How to solve quadratic programming problems with continuous variables and continous constraints by using quantum algorithms?
enter image description here Here is my optimization problem I solve with classical optimization using DocPlex but I want to solve using quadratic program using Qiskit and QAOA as solver ...
3
votes
0
answers
74
views
Why don't we start evolution with ground state in QAOAnsatz?
The adiabatic theorem states that we can start from an eigenstate, slowly change our Hamiltonian and still remain in the eigenstate. In the vanilla QAOA we start from $|+\rangle^n$, which is the ...
1
vote
1
answer
245
views
Error code 1217, Message: Reduce time between submitting subsequent jobs in a session
I tried running a piece of Qiskit code to minimize a Hamiltonian using QAOA. I tried running the same piece of code that I had used earlier in the IBM Quantum system 'ibm_nairobi' which gave me the ...
1
vote
1
answer
244
views
Mapping a QUBO onto an observable for use with Qiskit QAOA
Background
I am attempting to understand the post-aqua way that external qiskit libraries are supposed to be used for solving QUBOs. To do so I am trying to work with the toy problem of minimizing $f(...
3
votes
0
answers
101
views
qiskit QAOA on Aer GPU giving errors
I am trying to run Qiskit QAOA algorithm on using aer simulator and device GPU. But I am not sure how to give this backend in the QAOA algorithm structure.
Here is ...
3
votes
0
answers
46
views
How to update angles
I am struggling to understand the concept of updating angles in a parameterized algorithm.
Assume I have an objective function $x^2+1$ that I want to optimize using QAOA which can handle continuous ...
4
votes
1
answer
226
views
Retrieving job result attributes in Qiskit
I am trying to optimize a Hamiltonian using QAOA in IBM Qiskit.
I used the following 'minimize' function to get my result. (I am not including the whole code because it will get unnecessarily long).
<...
3
votes
0
answers
57
views
How can one use QAOA to obtain parameters that approximate the first excited state of the target Hamiltonian?
One can use QAOA to find the ground state and its energy by minimizing the expectation value of a target Hamiltonian (say, $H_T$) with respect to the QAOA ansatz and obtaining optimal parameters ...
2
votes
1
answer
113
views
Qiskit qubit ordering
In their to_ising documantation page, Qiskit devs mark the comment:
Variables are mapped to qubits in the same order, i.e., $i$-th variable is mapped to $i$-th ...
2
votes
0
answers
164
views
Converting Ising Hamiltonian to a Circuit in Qiskit
I tried to solve a 2-node TSP (travelling salesman problem) by implementing QAOA on Qiskit. The graph looks like:
Then I used the related Qiskit functions to convert the graph to the QUBO and map it ...
1
vote
0
answers
89
views
Building a problem unitary circuit for QAOA on Qiskit
I am trying to build a circuit for QAOA that solves a Traveling Salesman's Problem, which can be represented as a complete graph with 4 nodes. After formulating the problem as a QUBO and mapping it ...
1
vote
1
answer
68
views
How are edge weights "loaded" in the problem hamiltonian when solving TSP with QAOA?
I've come across several of the QAOA tutorials, and yet I'm afraid I haven't found any explanation on this. According to the Qiskit tutorial on QAOA, the cost function for the target problem has a ...
4
votes
0
answers
184
views
Qiskit QAOA optimization does not work when setting simulation seed in AerSampler
I am using Qiskit's QAOA for optimization and I would like to extract the probabilities distribution obtained in the optimization loop when running the circuit with the optimal parameters set. To do ...
2
votes
0
answers
52
views
Implementing Adiabatic Grover Search via QAOA
I am reading the paper Grover Search Inspired Alternating Operator Ansatz of Quantum Approximate
Optimization Algorithm for Search Problems. The paper proposes running the Adiabatic Grover Search ...
1
vote
0
answers
122
views
IS my QUBO too big for QAOA using IBM Quantum computer?
On qiskit, I have defined a QUBO, called qp as follows:
...
1
vote
1
answer
110
views
QAOA on weighted graphs
I tried to use the QAOA to solve the MaxCut problem on a 10 nodes weighted graph and run the simulation on qiskit from $p = 1$ to $p = 6$. I was expecting to get closer to the real solution as $p$ ...
1
vote
0
answers
76
views
Link between AQC and QAOA
I try to understand precisely the link between AQC and QAOA, through the Trotter-Suzuki formula.
A similar question is Derivation of QAOA from AQC, but I was asked by moderators to post my question ...
1
vote
1
answer
79
views
How to add a circuit layer after computing QAOA layer
I have used the Qiskit-based QAOA function to solve a combinatorial problem tsp, and I want to append a circuit after the QAOA layer, is there any way to do that?
Qaoa
6
votes
0
answers
144
views
How to use Warm-Start QAOA in QisKit to solve non-convex QUBO problem?
I have a non-convex QUBO problem that I'd like to solve by warm-starting QAOA with a solution obtained from a continuous relaxation solution obtained by a classical algorithm. The specifics of the ...
5
votes
1
answer
123
views
Recent experimental demonstrations of variational quantum algorithms?
I am interested in the recent experimental demonstrations of variational quantum algorithms.
Can someone please provide me with a list of references of recent experimental demonstrations of ...
1
vote
0
answers
48
views
'Continuous' (Classical) Cost function for QAOA
I have some combinatorial optimization problems which I would like to analyze using QAOA. These problems are coming from various applications in scientific computing such as solving PDEs. Some of ...
0
votes
2
answers
246
views
How to get angles optimized by classical optimizer from QisKit's QAOA Module?
I have the following simple optimization in QAOA:
...
1
vote
0
answers
105
views
QAOA algorithm from qiskit.algorithms.minimum_eigensolvers sends jobs without stopping
I don't know why the code keeps sending jobs. The code is:
...