Skip to content

Apparently sub-experiments are not blocked #592

@yaelbh

Description

@yaelbh

Informations

  • Qiskit Experiments version: main
  • Python version: 3.9.5
  • Operating system: Linux

What is the current behavior?

The test test_composite_subexp_data fails in my local environment.

(env1) hrlquantum:System$ stestr run - test_composite_subexp_data
{0} test.test_composite.TestCompositeExperimentData.test_composite_subexp_data [9.824127s] ... FAILED

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):

      File "/home/hrlquantum/work/experiments/System/test/test_composite.py", line 422, in test_composite_subexp_data
    self.assertEqual(len(childdata.data()), len(child_counts))

      File "/home/hrlquantum/miniconda3/envs/env1/lib/python3.9/unittest/case.py", line 831, in assertEqual
    assertion_func(first, second, msg=msg)

      File "/home/hrlquantum/miniconda3/envs/env1/lib/python3.9/unittest/case.py", line 824, in _baseAssertEqual
    raise self.failureException(msg)

    AssertionError: 0 != 2

In the AssertionError: 0 != 2, the 0 on the left side is the number of counts in a sub-experiment, and is expected to be 2, and certainly not empty. Printing that sub-experiment data reveals that its data is indeed empty, and it's still in INITIALIZING status:

Experiment: Experiment
Experiment ID: 1bc57184-39b8-4b19-a1a4-7ce5f24e96ea
Parent ID: 86b3636a-2252-45d6-bc2d-b6be6958c6a1
Status: INITIALIZING
Backend: fake_backend
Data: 0
Analysis Results: 0
Figures: 0

Suggested solutions

Probably related to #584 and #573. My a-priori guess is that block_for_results for the parent somehow doesn’t reach the line that blocks the results for the children. If this guess is true then debugging and fixing it doesn’t require special expertise in syncs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions