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)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChriPiv authored Jun 22, 2020
1 parent f0b68e4 commit 3b72172
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 3b72172

Please sign in to comment.