I would like to create a complex jump array variable and I have been looking through the documentation for awhile and things are still not clear.

Lets say for a trivial example I want to minimize the trace of a DxD complex array. I might create something like:

using Ipopt
using LinearAlgebra
using JuMP
model = Model(with_optimizer(Ipopt.Optimizer))
function E(x::Vector)
F = reshape(Complex.(x[1:2:2*D^2-1],x[2:2:2*D^2]),D,D)
return e = tr(F)
end
F = @variable(model)
@objective(model, Min, e)
optimize!(model)