apache / mahout

Mirror of Apache Mahout
Apache License 2.0
2.14k stars 945 forks source link

MAHOUT-2202 Testing Suite Template (plus MAHOUT-2207) #442

Closed tdnaugle closed 7 months ago

tdnaugle commented 8 months ago

Purpose of PR:

This PR implements a basic template for a testing suite using pytest, including the following items:

  1. Adding pytest as a dependency
  2. Define a helper function which can create from-scratch initial quantum state vectors (i.e. without using an instantiator from any of the backends), to be run as initial states for test circuits
  3. Choose an example circuit to test on the qumat circuit execution and then on the backend native execution, followed by a comparison of the two final state vectors

I also implement a candidate solution for MAHOUT-2207 by simply upping the python requirement in poetry.toml: "^3.8" -> "^3.9"

Important ToDos

Please mark each with an "x"

If all of these things aren't complete, but you still feel it is appropriate to open a PR, please add [WIP] after MAHOUT-XXXX before the descriptions- e.g. "MAHOUT-XXXX [WIP] Description of Change"

Does this change break earlier versions? No

Is this the beginning of a larger project for which a feature branch should be made? No

rawkintrevo commented 7 months ago

Just reviewed on community call.

  1. looks great
  2. refactor to scale out to arbitrary number of backends
  3. add minimal docs for a. adding a new backend b. adding unit test to existing backend
rawkintrevo commented 7 months ago

@tdnaugle is this ready for another review?

tdnaugle commented 7 months ago

@tdnaugle is this ready for another review?

Yes, this is ready.

rawkintrevo commented 7 months ago

Discussed on community call, clean up the git log, and merge. Will revisit issues on upcoming issues/PRs