qua-platform / quam

The Quantum Abstract Machine (QuAM) is a comprehensive framework designed to abstract and manage quantum programming environments, providing robust tools for configuring and running quantum operations effectively. It is built over the QUA programming language, offering an organized structure for handling complex quantum components and operations.
http://qua-platform.github.io/quam/
BSD 3-Clause "New" or "Revised" License
4 stars 2 forks source link

feat: Add support for instantiating union types #47

Closed nulinspiratie closed 2 months ago

nulinspiratie commented 2 months ago

The code changes in quam_instantiation.py and test_instantiation.py introduce support for instantiating union types. This allows the instantiate_attr function to handle union types correctly when creating instances of classes. The changes include importing the types module and checking for types.UnionType in addition to typing.Union when determining if a type is a union type.