Use a decorator instead of a if statement inside of a function to do the following :
- Unitary checks to validate that the input is a valid quantum gate
- Size checks to validate that the input has the correct shape
The decorators should be used in every function that contains unitary or size checks if possible. For example, those modules should implement decorators:
utils.exact_synthesis
decompositions.sqg
- ...