Skip to content

Commit

Permalink
refactor: add error bars and remove bands
Browse files Browse the repository at this point in the history
  • Loading branch information
Edoardo-Pedicillo committed Apr 19, 2024
1 parent 5c6ee4d commit a76abb4
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions src/qibocal/protocols/characterization/allxy/allxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from qibolab.qubits import QubitId

from qibocal.auto.operation import Data, Parameters, Results, Routine
from qibocal.protocols.characterization.utils import COLORBAND, COLORBAND_LINE


@dataclass
Expand Down Expand Up @@ -243,6 +242,11 @@ def _plot(data: AllXYData, target: QubitId, fit: AllXYResults = None):
go.Scatter(
x=gates,
y=probs,
error_y=dict(
type="data",
array=error_bars,
visible=True,
),
mode="markers",
text=gatelist,
textposition="bottom center",
Expand All @@ -252,17 +256,6 @@ def _plot(data: AllXYData, target: QubitId, fit: AllXYResults = None):
),
)

fig.add_trace(
go.Scatter(
x=np.concatenate((gates, gates[::-1])),
y=np.concatenate((probs + error_bars, (probs - error_bars)[::-1])),
fill="toself",
fillcolor=COLORBAND,
line=dict(color=COLORBAND_LINE),
showlegend=True,
name="Errors",
),
)
fig.add_hline(
y=0,
line_width=2,
Expand Down

0 comments on commit a76abb4

Please sign in to comment.