---
title: "How can I do an active reset?"
date: "2021-02-24T17:19:20+00:00"
url: "https://www.quantum-machines.co/faq/how-can-i-do-an-active-reset/"
description: "The measure command sends a pulse to the resonator, acquires the response, demodulates it, and extracts the I and Q values which can then be used to perform..."
---

# How can I do an active reset?

```
measure(readout_pulse, resonator, …)
save(I, I1+Q1)
with if_(I&gt;I_threshold):
     play(pi_pulse, qubit)
```

The `measure` command sends a pulse to the resonator, acquires the response, demodulates the response, and extracts the I and Q values which can then be used further down the QUA program to perform feedback on a qubit coupled to the resonator – for instance, to perform an active reset sequence. The `if` statement checks whether the I quadrature is above a certain threshold, indicating that the qubit is in the excited state and if so, sends a pi pulse to bring back the qubit to the ground state.
