1
$\begingroup$

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? If yes, how can we transform the cost function to be solvable by the quantum computer? And how can we take into account the constraints?

max (x+y)

-x + 2y <=8
2x + y <=14
2x - y <= 10
0 < x <10
0 < y < 10

I want to know if that is possible to transform this into an Ising Hamiltonian or not?

$\endgroup$

2 Answers 2

0
$\begingroup$

You may state the model as a QUBO model, turning the inequalities into equalities using slack variables. See for example the following paper: https://arxiv.org/abs/2205.01165 That said, Qiskit is not the best option for solving this kind of problem, as you easily need tens of qubits even for small instances. Better using D-Wave.

$\endgroup$
0
$\begingroup$

For Qiskit, take a look at Qiskit Optimization. There are tutorials there, as part of the documentation that cover its function.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.