Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lieb_ando reformulation doesn't propogate DCP information correctly #683

Closed
ericphanson opened this issue May 21, 2024 · 0 comments · Fixed by #684
Closed

lieb_ando reformulation doesn't propogate DCP information correctly #683

ericphanson opened this issue May 21, 2024 · 0 comments · Fixed by #684

Comments

@ericphanson
Copy link
Collaborator

ericphanson commented May 21, 2024

julia> using Convex

julia> A = Variable(2,2)
Variable
size: (2, 2)
sign: real
vexity: affine
id: 406508

julia> B = Variable(2,2)
Variable
size: (2, 2)
sign: real
vexity: affine
id: 169045

julia> K = rand(2,2)
2×2 Matrix{Float64}:
 0.388952  0.227043
 0.64608   0.220724

julia> lieb_ando(A, B, K, 1//1)
real (affine; real)
└─ sum (affine; real)
   └─ diag (affine; real)
      └─ * (affine; real)
         ├─ 
         └─ 

julia> lieb_ando(A, B, K, -1//2)
real (affine; real)
└─ sum (affine; real)
   └─ diag (affine; real)
      └─ * (affine; real)
         ├─ 
         └─ 

help?> lieb_ando
search: lieb_ando

  Returns LinearAlgebra.tr(K' * A^{1-t} * K * B^t) where A and B are positive
  semidefinite matrices and K is an arbitrary matrix (possibly rectangular).

  Disciplined convex programming information: lieb_ando(A,B,K,t) is concave in
  (A,B) for t in [0,1], and convex in (A,B) for t in [-1,0] or [1,2]. K is a
  fixed matrix.

Seems like these should be concave/convex, not affine. The issue is similar to #682 (comment): extended formulations typically must be atoms to propagate DCP information correctly. Here, we add constraints to a new variable we create here and here.

I didn't see any other extended formulations in src/reformulations luckily; the other reformulations there simply compose operations without adding new variables or constraints.

We should also update the dev docs to mention this. I for one didn't fully realize this issue until today.

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

Successfully merging a pull request may close this issue.

1 participant