Skip to content

pytket v1.19.0 release candidate 2

Pre-release
Pre-release

Choose a tag to compare

@cqc-alec cqc-alec released this 31 Aug 09:28
· 267 commits to develop since this release
ada0a12
Add type stubs for tket (#987)

* wip

* wip

* wip

* mypy mostly happy on pytket (some type: ignores necessary in python code), still unhappy with tests

* remove a lot of type ignores, fix some of resulting problems

* revert unnessecary changes to fix error

* fix some more stuff

* use python types instead of 'json' for better stubs

* fix hash type errors using explicit deletion of hash

* put unit_id into new module to remove cyclic dependency

* add python script to generate stubs and perform cleanup

* more stub cleaning

* fix backend errors

* Move module _tket.circuit._library to _tket.circuit_library

Makes importing and stub generation much easier/possible
Also now using ExprVariant in library functions, which translates to
Union[sympy.Exr, float] instead of just sympy.Expr

* add back some type igores in places that are just weird code

* fix weird stubgen docstring to stub error

* fixed mypy errors in mapping_test

* fixed mypy errors in predicates test

* fixed mypy errors in transform_test

* fixed mypy errors in architecture_aware_synthesis_test

* fixed mypy errors in tket_sim_test

* fixed mypy errors in pytket_config_test

* fixed mypy errors in passes_serialisation_test

* remove tests/conftest.py, it's not used anywhere

* fixed mypy errors in classical_test

* fixed mypy errors in circuit_test

* mypy finally happy

* remove unneeded type ignores

* remove unneeded type_helpers

* better generation, cleanup setup.py, add to readme

* add generated pytket/_tket/__init__.py

* clang format

* regnerate stubs and fix mypy errors after merging in develop

* add typedef for Union[float, Expr], dont use | for Union since we still support 3.9

* make tests a package

* dont use | for Union in pytket

* fix docs, remove more unneeded type ignores

* change syntax so windows also compiles, clang format

* simplify Expr typing, add readme for stub generation

* fix README

* clang format

* lint

* grammar pytket/README.md

* configure black to ignore .pyi files

* implement review suggestions

* add  method for register types, fix type errors in add_condition.py

* trying to fix the type problems in qasm.py is like playing whack-a-mole

* review suggestions

* Review suggestion: stub generation script

* Make sure stubs were regenerated before mypy check

* review suggestions

* lint

* merge develop, fix new binders, regenerate stubs

* actually don't check stub files with black

* fix stub check

* update changelog