Skip to main content

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

175 questions
Filter by
Sorted by
Tagged with
2 votes
1 answer
56 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 ...
1 vote
1 answer
36 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) ...
3 votes
1 answer
33 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
51 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
1 answer
23 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
41 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 ...
1 vote
0 answers
21 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
1 answer
176 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
139 views

### Calculating state fidelity and space complexity of Minimum Eigen Optimizers (VQE, QAOA and Grover Optimizer) in qiskit

I'm a beginner in using Qiskit and my Computer Science background is not extensive. But I understand the Quantum Physics aspects of it relatively well. I solved a QUBO problem in Qiskit using VQE (...
0 votes
0 answers
12 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 ...
1 vote
1 answer
65 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 ...
3 votes
3 answers
220 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. ...
0 votes
0 answers
37 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 ...
1 vote
1 answer
62 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
1 answer
204 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 ...
1 vote
0 answers
24 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 ...
3 votes
1 answer
467 views

### QUBO defined in Qiskit/DOcplex: how to solve it using Pennylane?

I have a complex Integer Linear Programming model defined in DOcplex/Qiskit representing a combinatorial optimization problem. Using the Qiskit utils, it is possible to covert it to either an Ising ...
0 votes
1 answer
38 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 ...
1 vote
0 answers
67 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 ...
0 votes
1 answer
241 views

### QAOA Optimization

I want to use historical data for 5 stocks from YahooFinance and then calculate mean vector and covariance matrice, so I can optimize them with QAOA. Anyone know what is wrong with this code:
1 vote
0 answers
16 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
0 answers
105 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. ...
6 votes
1 answer
104 views

### Does the Lie closure of a set of Hamiltonians describe all unitaries you can generate with them?

Suppose we have $k$ Hermitian matrices $H_1, ..., H_k \in M_d(\mathbb{C})$. Define $\mathfrak{g} = \langle iH_1, ... iH_k \rangle_{\text{Lie}}$ to be the Lie algebra generated by these Hermitian ...
1 vote
1 answer
103 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
54 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
357 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
19 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 ...
1 vote
1 answer
65 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 ...
4 votes
1 answer
321 views

### Qiskit unable to transpile the circuit for Rigetti Aspen M 1 on AWS

I am trying to run a Qiskit QAOA algorithm on AWS Rigetti Aspen M 1 Backend using qiskit braket provider. However qiskit is not able to properly transpile the circuit ...
4 votes
1 answer
322 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 ...
2 votes
1 answer
93 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 ...
1 vote
0 answers
58 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 ...
3 votes
0 answers
73 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 ...
4 votes
1 answer
167 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
71 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 ...
1 vote
1 answer
185 views

1 vote
1 answer
70 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