Partial tracing on a SDP @variable

I want to be able of partial tracing the X variable defined below :

using ProxSDP, JuMP
model = Model(with_optimizer(ProxSDP.Optimizer, log_verbose=false))
@variable(model, X[1:N,1:N], PSD)

where N>=1. I tried using QuantumInformation.ptrace but it didn’t work.

JuMP doesn’t have explicit support for the partial trace, so you’ll have to write out an equivalent expression algebraically.