Skip to content
This repository has been archived by the owner on Jun 12, 2023. It is now read-only.

Commit

Permalink
fixed partial trace constraint in cvx fitting routine (#438) (#440)
Browse files Browse the repository at this point in the history
(cherry picked from commit 3b72172)

Co-authored-by: Christophe Piveteau <cpivetea@student.ethz.ch>
  • Loading branch information
mtreinish and ChriPiv authored Jun 24, 2020
1 parent 6579e61 commit f0e1021
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions qiskit/ignis/verification/tomography/fitters/cvx_fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ def cvx_fit(data: np.array,
sdim = int(np.sqrt(dim))
ptr = partial_trace_super(sdim, sdim)
cons.append(ptr @ cvxpy.vec(rho_r) == np.identity(sdim).ravel())
cons.append(ptr @ cvxpy.vec(rho_i) == np.zeros(sdim*sdim))

# Rescale input data and matrix by weights if they are provided
if weights is not None:
Expand Down

0 comments on commit f0e1021

Please sign in to comment.