a example using Quantum statamachine