Questions tagged [optimization]

For questions concerning how to improve quantum computers on different aspects like performance, efficiency or fault-tolerance.

Filter by
Sorted by
Tagged with
8 votes
1 answer
243 views

Enforcing a particular layout mapping in Qiskit

I would like to ask how to set a particular layout during transpiling. I guess that the layout can be set by the initial_layout parameter in the transpiler. However,...
1 vote
1 answer
102 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
1 answer
109 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 (...
1 vote
1 answer
51 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 ...
1 vote
0 answers
20 views

Why is quantum annealing not used in optimization for variational quantum algorithms?

I have been learning about variational quantum algorithms and encountered that none of the articles talk about using quantum annealers for optimization of the parameters ? I have however encountered ...
2 votes
1 answer
240 views

Quantum Annealing vs Quantum Monte Carlo: can QMC do all that QA can?

I'm working on an essay about quantum technology, and the connection between the annealing algorithm and quantum computing hardware is an important transition in the text. I'd like to know if there is ...
1 vote
1 answer
331 views

Inequality constraint to QUBO penalty

I am trying to formulate a problem as QUBO problem and am not able to transform the inequality constraint. $$ \sum_i^N x_i \geq 1 $$ into a suitable penalty function. For N = 2, the penalty term can ...
3 votes
0 answers
67 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 ...
3 votes
0 answers
28 views

Why is "reducing Hamiltonian energy" also optimizing a Quantum Machine Learning model?

From what I observed, most hybrid qml architectures surround the ideas of Hamiltonian states, and it seems like our goal to optimize a circuit is to keep energy states as low as possible. But why is ...
4 votes
2 answers
151 views

Optimise implementation of a quantum algorithm when an input is fixed

I need to implement a quantum comparator that, given a quantum register $a$ and a real number $b$ known at generation time (i.e. when the quantum circuit is generated), set a qubit $r$ to the boolean ...
1 vote
1 answer
74 views

How to use D-Wave decomposers?

I'm currently trying to work on a minimization problem using D-Wave hybrid and quantum machines. The problem is, shortly, an energy optimization for a network of switches and servers, linked as a ...
1 vote
1 answer
62 views

What's the case when parameter-shift rule does not hold?

When the parameterized unitary is of the form $e^{-i\theta V}$, where $V$ is a Hermitian operator of the unitary, we can use parameter shift rule to calculate the gradient. In this paper, it says: &...
1 vote
1 answer
65 views

Where is the input data X in the CV-QNN as presented in Pennylane?

I am referring to the tutorial of CV-QNN in Pennylane(Strawberry Fields). Each layer of CV-QNN can perform the operation below. Unlike other quantum neural network tutorials, where the input X and y ...
1 vote
0 answers
25 views

Quantum optimization and correlation function

If one imagines the nodes of the classical weighted graph as atoms, and paths between them as bonding strength, then to find the shortest path in the weighted graph, can one also look at the minima/...
0 votes
0 answers
39 views

Parallelize estimation of expectation values in Qiskit

Edit I tried using python multiprocessing library. The result with 8 cores isn't always faster than the original script that uses only one core. How can i improve the algorithm? Suppose i've a matrix ...
2 votes
0 answers
31 views

Quantum Annealing on IBMQ using Qiskit-Pulse

Qiskit-Pulse is the analog level control SDK of IBMQ hardware. Is it possible to implement an adiabatic annealing protocol/algorithm on IBMQ hardware using Qiskit-Pulse? Not asking about QAOA, which I ...
1 vote
1 answer
93 views

Solving max/min problem for graphs based on Grover

Basis is for this post ist the paper https://arxiv.org/pdf/1902.00445.pdf I want to do something similar using graph data encoded in quantum states. The circuit structure should look like this (first ...
3 votes
1 answer
63 views

Python code for D-Wave Annealer

In the below screenshot, I am aware of resolving the issue by reducing num_reads as the annealing time is exceeding my allowance. Although it works, my question ...
1 vote
2 answers
92 views

Solving a linear optimization problem with inequality constraints in qiskit? is it possible?

This is an easy optimization problem that can be classically solved. My question is that, in qiskit, how can we solve this optimization problem using IBM real machines? Is it even possible to do that? ...
2 votes
0 answers
93 views

Save output, wavefunction file and orbital information in Qiskit

I am going through LiH ground state energy calculation. I would like to know how to save the output file in Qiskit as one would do in classical computing using software like Gaussian or Psi4. Can ...
2 votes
1 answer
153 views

Knapsack problem formulation

I would like to use a knapsack problem formulation based on Lucas paper. Namely, I try to implement the following math formula for Hamiltonian $H =H_A + H_B$, where $$H_{B} = -B\sum_{i=1}^{n}v_{i}x_{i}...
1 vote
0 answers
28 views

Comparing BQM and CQM solving for a tree-path problem

I'm currently working on a project for my thesis regarding BQM and CQM optimisation for a path problem. Without going too much on the details, here's some info: the structure is a tree, where all the ...
2 votes
0 answers
134 views

SLSQP optimizer(scipy.minimize) doesn't update parameters

I'm trying to find optimal parameters that minimize the cost functions. In cost function, it calculates the classical-fisher-information at a certain point(phi[0] = np.pi). Cost-function takes 3-...
10 votes
1 answer
273 views

Categories and types of quantum inspired algorithms

I have a question concerning "quantum-inspired" algorithms. There seem to be several types of algorithms that fall into this category. Some examples are: Ewin's dequantized algorithms ...
1 vote
0 answers
40 views

Running multiple amplitude estimations simulations

I am working on a mini project investigating the scalability of quantum computing in the context of option pricing. I have been following the above Finance API from Qiskit as an introduction, however, ...
1 vote
0 answers
103 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 ...
0 votes
1 answer
203 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/...
1 vote
0 answers
72 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 ...
4 votes
0 answers
135 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 ...
0 votes
1 answer
364 views

How does qiskit's CircuitQNN calculate the gradients of circuits?

I'm trying to understand how the gradients are calculated for any given circuit using qiskits CircuitQNN and ...
7 votes
2 answers
175 views

Quantum annealing - studies showing empirical evidence for better performance in comparison with classical computers

Currently, it is not known wheter quantum anneling or algorithms like VQE and QAOA for general purpose quantum computers bring about any increase in computational power. However, there are some ...
5 votes
1 answer
103 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
37 views

Continuous variable portfolio optimization problem

Has anyone tried to solve the continuous variable portfolio optimization in Qiskit? I see a lot of binary variable problems but none which solve and get the optimal weights.
0 votes
0 answers
57 views

How can I exactly solve a Quadratic Model with integer variables using DWave Ocean classical solvers?

As an example, let's consider the following simple QuadraticModel problem with just 3 INTEGER variables: ...
1 vote
1 answer
124 views

GRAPE with Python?

I want to do some quick GRAPE calculations in Python. The qutip implementation is handy but I can't modify the fidelity function. However, I need to use my own fidelity function to evaluate fidelity. ...
2 votes
2 answers
121 views

What is the algebraic result of the matrix exponential operation $e^{i A}|b\rangle$?

The circuit for the HHL algorithm looks as follows: I am uncertain what is the algebraic operation of the matrix exponential $e^{i A}$ on $|b\rangle$? If $$|b\rangle = b_0|0\rangle + b_1|1\rangle$$ ...
7 votes
0 answers
306 views

Solving linear system $Ax=b$ with exponential speed-up via binary optimization?

The main disadvantage of HHL algorithm for solving $A|x\rangle = |b\rangle$ is that exponential speed-up is reached only in case we are interested in value $\langle x|M|x\rangle$, where $M$ is a ...
2 votes
0 answers
52 views

GPU Support for Qiskit's SPSA Optimization Algorithm

I am using Qiskit's SPSA optimization algorithm to find the ground state energy of various lattices (fermi-Hubbard model) by running different circuits through it and having the algorithm modify the ...
1 vote
1 answer
55 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
4 votes
0 answers
59 views

When is a quantum algorithm considered to have a significantly superior performance over another quantum algorithm?

Suppose we have two heuristic quantum algorithms $A$ and $B$ that attempt to solve a certain class of optimization problems. Let's suppose that the benchmarking metric is Time To Solution (TTS), which ...
5 votes
0 answers
115 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 ...
0 votes
1 answer
86 views

Portfolio optimization via quantum Zeno dynamics in Qiskit

Recently, I came across paper Portfolio Optimization via Quantum Zeno Dynamics on a Quantum Processor. In the paper, a new approach to optimization with QAOA is introduced. Instead of employing a ...
3 votes
1 answer
64 views

How to sanity check QAOA cost Hamiltonian?

I'm trying to learn QAOA and how to apply it to a complex combinatorial problem. But for the purpose of this question I'll use the common example MaxCut. I'd like to know if I've set up my cost ...
3 votes
2 answers
345 views

Does QAOA require that the problem Hamiltonian be an Ising Hamiltonian as a quadratic function of the spin variables?

In the context of QAOA, I often see the problem Hamiltonian being called an "Ising Hamiltonian", and shortly after, I that the Hamiltonian is a quadratic function of the spin variables. Is ...
4 votes
2 answers
202 views

Does the gradient commute with the partial trace?

Suppose I have a parameterized quantum state: $\rho(\theta) = U(\theta) \rho U^\dagger(\theta)$. I am curious to know whether the following holds: $\frac{\partial \text{Tr}_A (\rho(\theta))}{\partial \...
2 votes
1 answer
52 views

Why is a large quantum annealer likely to leave its ground state?

For problems of significant size in quantum annealing, I have read that even for slow transitions, the annealer is likely to leave its ground state. I have not fully grasped the meaning of why exactly ...
0 votes
0 answers
187 views

Extracting a QUBO matrix from pyqubo

I am benchmarking different QUBO solvers for a very simple instance of the knapsack problem. Some of these solvers require the matrix, Q, and offset, b, from the equation: $$ \begin{equation} x^{\...
2 votes
1 answer
67 views

Does pytket have an optimization pass that removes gate-inverse pairs & identity rotations & redundant gates and/or merges rotations?

For the following sample circuit I want to reduce the number of gates in pytket: for example, I know: Adjacent Rx gates can be merged CZ is self-inverse and cancels itself out because any Hermitian ...
4 votes
1 answer
155 views

Does QAO Ansatz have any better performance guarantees than QAOA?

QAOA is a well-known heuristic for solving optimization problems, and it has the desirable property that as p -> infinity, the true minimum objective function value is reached. There is a ...
0 votes
0 answers
88 views

Can pyqubo and qiskit be used together?

I used Pyqubo to create an optimisation problem with an objective function and some constraints, but I want to use Qiskit to run QAOA/VQE on my model. Is it possible to call my Pyqubo model into ...