jpmorganchase / QOKit

QOKit
https://www.jpmorgan.com/technology/applied-research
Apache License 2.0
51 stars 23 forks source link

Fix parameterization of LABS tests and parameterize MaxCut tests #29

Closed rsln-s closed 9 months ago

rsln-s commented 10 months ago

Currently, a very nice parameterization is used to test that QAOA objective for LABS is computed the same way for all simulators (see tests/test_objectives.py).

However, for MaxCut there are two separate files that manually test only a small number of simulators (I believe, only "auto" and "qiskit"): tests/test_qaoa_objective_maxcut.py and tests/test_maxcut.py.

At the same time, parameterization for LABS is missing "qiskit" simulator. I suspect this lack of test coverage is what caused #28.

The request is to add parameterization to MaxCut tests along the lines of how LABS tests are parameterized in tests/test_objectives.py and to add "qiskit" simulator to the tests for LABS objective.

I would also suggest the following minor refactoring: