Skip to content

Commit b90be51

Browse files
committed
update the povm.convert(...) free function to work with CPTPLND parameterizations on non-qubit spaces (for example, qutrit spaces) by changing the default error generator basis.
1 parent 0cc05dc commit b90be51

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pygsti/modelmembers/povms/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,10 +547,14 @@ def convert(povm, to_type, basis, ideal_povm=None, flatten_structure=False, cp_p
547547
#It is often the case that there are more error generators than physical degrees of freedom in the POVM
548548
#We define a function which finds linear comb. of errgens that span these degrees of freedom.
549549
#This has been called "the trivial gauge", and this function is meant to avoid it
550+
eegb = 'PP' if basis.name == 'pp' else basis
550551
def calc_physical_subspace(dense_ideal_povm, epsilon = 1e-4):
551552

552553
degrees_of_freedom = (dense_ideal_povm.shape[0] - 1) * dense_ideal_povm.shape[1]
553-
errgen = _LindbladErrorgen.from_error_generator(povm.state_space.dim, parameterization=to_type)
554+
errgen = _LindbladErrorgen.from_error_generator(
555+
povm.state_space.dim, parameterization=to_type,
556+
elementary_errorgen_basis=eegb, mx_basis=basis
557+
)
554558

555559
if degrees_of_freedom > errgen.num_params:
556560
warnings.warn("POVM has more degrees of freedom than the available number of parameters, representation in this parameterization is not guaranteed")

0 commit comments

Comments
 (0)