qiskit-optimization icon indicating copy to clipboard operation
qiskit-optimization copied to clipboard

Issue with the initialization in the ADMM Optimizer

Open Tzortzinaprk opened this issue 8 months ago • 0 comments

Hello, I’m new in programming and I’m currently doing my master thesis and it is in Python. I'm using the ADMM Optimizer from the qiskit library. My goal is to reconstruct the measurements that I have been given and take the reconstructed image. For this reason I'm trying to minimize this function:

Image

where the second part is the total variation. Unfortunately, my A matrix is too big (50408, 6859), while b is (50408,). In addition, the matrixes contain complex values, so they have a real and an imaginary part. Through the optimizer, I'm trying to find the x matrix. I initialized the parameters and wrote the objective function as can be seen below :

x_vars = [mdl.continuous_var(name=f"x{i}", lb=0) for i in range(S.shape[1])]

lambda_tv = 0.5
TV = mdl.sum((x_vars[i + 1] - x_vars[i]) ** 2 for i in range(S.shape[1] - 1))

objective = mdl.sum( (mdl.sum(S[i, j] * x_vars[j] for j in range(S.shape[1])) - u[i]) ** 2 for i in range(S.shape[0]) ) + lambda_tv * TV

The program runs but it never stops. I don't get any bug and the model never gets to the ADMM optimizer. I've tried using equations from the numpy library, but they are not compatible. What should I do in order to overcome this problem?

Tzortzinaprk avatar Mar 18 '25 12:03 Tzortzinaprk