Skip to content

Commit

Permalink
Update qiskit_experiments/framework/experiment_data.py
Browse files Browse the repository at this point in the history
Co-authored-by: Naoki Kanazawa <[email protected]>
Musa-Sina-Ertugrul and nkanazawa1989 committed Apr 22, 2024
1 parent fc3efea commit 5713ab1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions qiskit_experiments/framework/experiment_data.py
Original file line number Diff line number Diff line change
@@ -899,6 +899,8 @@ def add_data(
marginalized_datum = self._marginalized_component_data([datum])
try:
composite_index = datum["metadata"]["composite_index"]
while max(composite_index) > len(self._child_data):
self.add_child_data(ExperimentData())
composite_expdata = [self.child_data(i) for i in composite_index]
for sub_expdata, sub_data in zip(composite_expdata, marginalized_datum):
sub_expdata.add_data(sub_data)

0 comments on commit 5713ab1

Please sign in to comment.