Skip to content

Commit 9b3862b

Browse files
author
Corey Ostrove
committed
Finish removal of problematic line
Remove the commented out lines related to the (erroneous) ComplementPOVMEffect check. Also clean up a few misc commented out bits of code.
1 parent f35efd2 commit 9b3862b

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

pygsti/algorithms/fiducialselection.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,6 @@ def create_meas_cache(model, available_meas_fid_list, circuit_cache=None):
712712
if circuit_cache is not None:
713713
for povm in model.povms.values():
714714
for E in povm.values():
715-
#if isinstance(E, _ComplementPOVMEffect): continue # complement is dependent on others
716715
new_povm_effect_key_pair= (povm.to_vector().tobytes(), E.to_dense().tobytes())
717716
keypairlist.append(new_povm_effect_key_pair)
718717
for measFid in available_meas_fid_list:
@@ -721,7 +720,6 @@ def create_meas_cache(model, available_meas_fid_list, circuit_cache=None):
721720
else:
722721
for povm in model.povms.values():
723722
for E in povm.values():
724-
#if isinstance(E, _ComplementPOVMEffect): continue # complement is dependent on others
725723
new_povm_effect_key_pair= (povm.to_vector().tobytes(), E.to_dense().tobytes())
726724
keypairlist.append(new_povm_effect_key_pair)
727725
for measFid in available_meas_fid_list:
@@ -777,7 +775,6 @@ def create_prep_mxs(model, prep_fid_list, prep_cache=None):
777775
except KeyError as err:
778776
print('A (Rho, Circuit) pair is missing from the cache, all such pairs should be available is using the caching option.')
779777
raise err
780-
#outputMat[:, i] = _np.dot(model.sim.product(prepFid), rho.to_dense())
781778
outputMatList.append(outputMat)
782779

783780
else:
@@ -836,13 +833,11 @@ def create_meas_mxs(model, meas_fid_list, meas_cache=None):
836833
except KeyError as err:
837834
print('A (POVM, Effect, Circuit) pair is missing from the cache, all such pairs should be available if using the caching option.')
838835
raise err
839-
#outputMat[:, i] = _np.dot(E.to_dense(), model.sim.product(measFid))
840836
outputMatList.append(outputMat)
841837

842838
else:
843839
for povm in model.povms.values():
844840
for E in povm.values():
845-
#if isinstance(E, _ComplementPOVMEffect): continue # complement is dependent on others
846841
outputMat = _np.zeros([dimE, numFid], float)
847842
for i, measFid in enumerate(meas_fid_list):
848843
outputMat[:, i] = _np.dot(E.to_dense(), model.sim.product(measFid))
@@ -1774,10 +1769,6 @@ def _find_fiducials_greedy(model, fids_list, prep_or_meas, op_penalty=0.0,
17741769
else:
17751770
for fiducial in fids_list:
17761771
#calculate the score matrix
1777-
#if prep_or_meas == 'prep':
1778-
# fidArrayList = create_prep_mxs(model, [fiducial], fid_cache)
1779-
#elif prep_or_meas == 'meas':
1780-
# fidArrayList = create_meas_mxs(model, [fiducial], fid_cache)
17811772
current_score_mx= fiducial_compact_EVD_cache[fiducial]
17821773
current_score_gramian= fiducial_compact_EVD_cache[fiducial]@fiducial_compact_EVD_cache[fiducial].T
17831774
current_inv_trace = _np.trace(_np.linalg.pinv(current_score_gramian, hermitian=True))

0 commit comments

Comments
 (0)