Skip to content
This repository was archived by the owner on Jul 12, 2026. It is now read-only.
This repository was archived by the owner on Jul 12, 2026. It is now read-only.

Issue with the initialization in the ADMM Optimizer #655

Description

@Tzortzinaprk

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions