# Partial tracing on a SDP @variable

**URL:** <https://discourse.julialang.org/t/partial-tracing-on-a-sdp-variable/88123>\
**Category:** Optimization (Mathematical)\
**Tags:** question, jump\
**Created:** [October 2, 2022, 2:13pm UTC](https://discourse.julialang.org/t/partial-tracing-on-a-sdp-variable/88123 "2022-10-02T14:13:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![danuzco](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/danuzco/32/18740_2.png) [@danuzco](https://discourse.julialang.org/u/danuzco)\
**Post date:** [October 2, 2022, 2:13pm UTC](https://discourse.julialang.org/t/partial-tracing-on-a-sdp-variable/88123/1 "2022-10-02T14:13:15Z")

</div>

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

```julia
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.

---

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [October 8, 2022, 4:36am UTC](https://discourse.julialang.org/t/partial-tracing-on-a-sdp-variable/88123/2 "2022-10-08T04:36:32Z")

</div>

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