sandialabs / pyGSTi

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

FOGI Labels Exponential Blowup #486

Closed juangmendoza19 closed 2 months ago

juangmendoza19 commented 2 months ago

When running GST with a FOGI model, the output model's labels get messed up. It seems like every iteration, the model gets rebuilt and during the label construction it includes a combination of the previous labels. Creating a nested pattern of labels which grows at an exponential rate, and causing huge memory consumption. Pointed out by @jordanh6

Steps to reproduce the behavior:

Create a FOGI model

import pygsti from pygsti.modelpacks import smq1Q_XY as std import numpy as np from FOGI.fogi import create_fogiASMP_smq1Q_XY_model fogi_model = create_fogiASMP_smq1Q_XY_model(pygsti_model=True)

Generate data to run GST

datagen_model = std.target_model("GLND") errgen_vector = np.zeros(datagen_model.num_params) errgen_vector[4] = .1 datagen_model.from_vector(errgen_vector) design = std.create_gst_experiment_design(32) dataset = pygsti.data.simulate_data(datagen_model, design.all_circuits_needing_data, num_samples=100000, seed=20230217, sample_error='none')

data = pygsti.protocols.ProtocolData(design, dataset)

Run GST

protoOpt = pygsti.protocols.GateSetTomography(fogi_model, verbosity=0, gaugeopt_suite=None)

Expected behavior The labels of the result model should be unchanged

Environment:

sserita commented 2 months ago

Completed with #488