quantum_hooks.py