sandialabs / pyGSTi

A python implementation of Gate Set Tomography
http://www.pygsti.info
Apache License 2.0
132 stars 55 forks source link

Fixes bug where depolarizing noise strength differs with parameterization #407

Closed enielse closed 3 months ago

enielse commented 4 months ago

Depolarizing noise constructed with depolarization_parameterization="lindblad" doesn't match the same constructio when depolarization_parameterization="depolarize", as demonstrated by the below code. This is due to the use of the normalized Pauli basis ("pp") where we should be using the un-normalized basis ("PP"). This PR fixes this issue and adds a unit test.

To see the bug, run this (printed output should be the same but is not):

import pygsti
from pygsti.modelmembers.operations.opfactory import ComposedOpFactory
from pygsti.modelmembers.operations.depolarizeop import DepolarizeOp

pspec = pygsti.processors.QubitProcessorSpec(1, ["Gi"], geometry="line")

mdl1 = pygsti.models.create_crosstalk_free_model(
        pspec,
        depolarization_parameterization="lindblad",
        depolarization_strengths={'Gi': 0.02}
)

mdl2 = pygsti.models.create_crosstalk_free_model(
        pspec,
        depolarization_parameterization="depolarize",
        depolarization_strengths={'Gi': 0.02}
)

c = pygsti.circuits.Circuit("Gi:0@(0)")

print(dict(mdl1.probabilities(c)))
print(dict(mdl2.probabilities(c)))