Skip to content

Commit 1c7d5aa

Browse files
committed
changes in README for MFT_20230125 from Corey
1 parent 38072e6 commit 1c7d5aa

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

pygsti/baseobjs/basisconstructors.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -862,8 +862,12 @@ def _is_integer(x):
862862

863863
nQubits = _np.log2(matrix_dim)
864864
if not _is_integer(nQubits):
865-
raise ValueError(
866-
"Dimension for Pauli tensor product matrices must be an integer *power of 2* (not %d)" % matrix_dim)
865+
nQutrits = _np.log(matrix_dim) / _np.log(3)
866+
if _is_integer(nQutrits):
867+
return gm_matrices(matrix_dim)
868+
else:
869+
raise ValueError(
870+
"Dimension for Pauli tensor product matrices must be an integer *power of 2* (not %d)" % matrix_dim)
867871
nQubits = int(round(nQubits))
868872

869873
if nQubits == 0: # special case: return single 1x1 identity mx

pygsti/protocols/gst.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2432,6 +2432,9 @@ def _compute_1d_reference_values_and_name(estimate, badfit_options, gaugeopt_sui
24322432
spamdd[key] = 0.5 * _tools.optools.povm_diamonddist(gaugeopt_model, target_model, key)
24332433

24342434
dd[lbl]['SPAM'] = sum(spamdd.values())
2435+
for k,v in spamdd.items():
2436+
dd[lbl][k] = v
2437+
24352438
return dd, 'diamond distance'
24362439
else:
24372440
raise ValueError("Invalid wildcard1d_reference value (%s) in bad-fit options!"

0 commit comments

Comments
 (0)