Skip to content

Commit 9cb066c

Browse files
removed null space vectors from svd to make dimensions match
1 parent c90803d commit 9cb066c

File tree

3 files changed

+2
-1640
lines changed

3 files changed

+2
-1640
lines changed

pygsti/modelmembers/povms/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ def calc_physical_subspace(dense_ideal_povm, epsilon = 1e-4):
577577

578578
J[:,i] = vectorized_povm
579579

580-
_,S,Vt = _np.linalg.svd(J)
580+
_,S,Vt = _np.linalg.svd(J, full_matrices=False)
581581

582582
#Only return nontrivial singular vectors
583583
Vt = Vt[S > 1e-13, :].reshape((-1, Vt.shape[1]))

pygsti/modelmembers/states/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ def calc_physical_subspace(ideal_prep, epsilon = 1e-4):
286286
exp_errgen.from_vector(new_vec)
287287
J[:,i] = (exp_errgen.to_dense() @ ideal_prep - ideal_prep)[1:]/epsilon
288288

289-
_,S,Vt = _np.linalg.svd(J)
289+
_,S,Vt = _np.linalg.svd(J, full_matrices=False)
290290

291291
#Only return nontrivial singular vectors
292292
Vt = Vt[S > 1e-13, :].reshape((-1, Vt.shape[1]))

0 commit comments

Comments
 (0)