-
Couldn't load subscription status.
- Fork 70
Open
Description
What should we add?
While working on #73, @ElePT and I have identified the following inconsistencies and/or problems around the type hints which should be investigated further. Rather than holding up that PR unnecessarily, we decided to gather these here.
That way, they can be investigated one-by-one.
Note: some of these may very likely require code changes to resolve inconsistencies in the interfaces.
- Typing around
np.ndarrayvsSequence[float]. It is a known issue that tomypythe numpy arrays do not satisfy theSequencetype. This leads to many type ignore statements right now which can hopefully be improved upon.- For example, typing around parameter values being passed on to the primitives: sometimes its
Sequence[float], sometimes itsSequence[Sequence[float]], and oftentimes internally it ends up asnp.ndarraycausing many type ignore comments
- For example, typing around parameter values being passed on to the primitives: sometimes its
- The typing of the
initial_pointattributes is very inconsistent across its various occurrences. - The
Minimizerinterface does not appear to be supported properly byVQDandPVQD(for example) since they do not provide the requiredjacargument - The
ListOrDicttype is causing quite some oddities. This has multiple cases:- for the
metadata(e.g.variance) types and implementations are inconsistent with the variance sometimes wrapped in dictionaries and sometimes provided as a single number - for
aux_operatorsand/orobservableswe had to add many type ignores which would need to be re-evaluated (possibly linked to the previous point)
- for the
- All classes that use the
EsimationProblemhave very poor typing around the following points:- the
post_processingfunction - the confidence intervals
- the
circuit_results
- the
- Add py.typed file back again - removed by Remove py.typed until #74 is addressed #121
Metadata
Metadata
Assignees
Labels
No labels