QHack 2023 challenge: Mid-Circuit Measurements

Use this topic to ask your questions about the QHack 2023 challenge: Mid-Circuit Measurements

Hello,
Why doesn’t it work if instead of qml.cond I use regular if statements in python ?
Thanks

Hi @yoshypdf ,

In quantum computing measurements are tricky because if you measure a quantum state you will destroy it. Many devices actually don’t even support mid-circuit measurements. qml.cond allows you to run quantum-compatible if-else conditionals on parameters such as the results of mid-circuit qubit measurements.

1 Like