Skip to content

Commit f422726

Browse files
committed
de-nest two lines
1 parent e5b2738 commit f422726

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pygsti/tools/jamiolkowski.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,11 +215,13 @@ def fast_jamiolkowski_iso_std(operation_mx, op_mx_basis):
215215
#first, get operation matrix into std basis
216216
operation_mx = _np.asarray(operation_mx)
217217
op_mx_basis = _bt.create_basis_for_matrix(operation_mx, op_mx_basis)
218-
opMxInStdBasis = _bt.change_basis(operation_mx, op_mx_basis, op_mx_basis.create_equivalent('std'))
218+
temp = op_mx_basis.create_equivalent('std')
219+
opMxInStdBasis = _bt.change_basis(operation_mx, op_mx_basis, temp)
219220

220221
#expand operation matrix so it acts on entire space of dmDim x dmDim density matrices
221-
opMxInStdBasis = _bt.resize_std_mx(opMxInStdBasis, 'expand', op_mx_basis.create_equivalent('std'),
222-
op_mx_basis.create_simple_equivalent('std'))
222+
temp1 = op_mx_basis.create_equivalent('std')
223+
temp2 = op_mx_basis.create_simple_equivalent('std')
224+
opMxInStdBasis = _bt.resize_std_mx(opMxInStdBasis, 'expand',temp1, temp2)
223225

224226
#Shuffle indices to go from process matrix to Jamiolkowski matrix (they vectorize differently)
225227
N2 = opMxInStdBasis.shape[0]; N = int(_np.sqrt(N2))

0 commit comments

Comments
 (0)