Skip to content

Commit

Permalink
Restrict specialization to unnormalized Paulis
Browse files Browse the repository at this point in the history
Actually, it looks like the change I implemented specializing the error generator construction when using paulis is actually only valid when using unnormalized ones. Could get it working for the other case by tracking the additional scale factor, but for now just revert partially.
  • Loading branch information
Corey Ostrove committed Jan 6, 2025
1 parent 4f1a8aa commit b47a9c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pygsti/tools/lindbladtools.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def create_elementary_errorgen_dual(typ, p, q=None, sparse=False, normalization_
def create_elementary_errorgen_dual_pauli(typ, p, q=None, sparse=False):
"""
Construct a "dual" elementary error generator matrix in the "standard" (matrix-unit) basis.
Specialized to p and q being elements of the pauli basis.
Specialized to p and q being elements of the (unnormalized) pauli basis.
The elementary error generator that is dual to the one computed by calling
:func:`create_elementary_errorgen` with the same argument. This dual element
Expand Down Expand Up @@ -337,7 +337,7 @@ def create_elementary_errorgen(typ, p, q=None, sparse=False):
def create_elementary_errorgen_pauli(typ, p, q=None, sparse=False):
"""
Construct an elementary error generator as a matrix in the "standard" (matrix-unit) basis.
Specialized to the case where p and q are elements of the pauli basis.
Specialized to the case where p and q are elements of the (unnormalized) pauli basis.
There are four different types of elementary error generators: 'H' (Hamiltonian),
'S' (stochastic), 'C' (correlation), and 'A' (active). See arxiv:2103.01928.
Expand Down
3 changes: 1 addition & 2 deletions pygsti/tools/optools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1988,8 +1988,7 @@ def _create_elementary_errorgen_nqudit(typ, basis_element_labels, basis_1q, norm
#See docstrings for `bulk_create_elementary_errorgen_nqudit` and `bulk_create_elementary_errorgen_nqudit_dual`.

#check if we're using the pauli basis
is_pauli = set(basis_1q.name.split('*')) == set(['PP']) or set(basis_1q.name.split('*')) == set(['pp'])

is_pauli = set(basis_1q.name.split('*')) == set(['PP'])
if create_dual:
if is_pauli:
create_fn = _lt.create_elementary_errorgen_dual_pauli
Expand Down

0 comments on commit b47a9c6

Please sign in to comment.