Skip to content
Open
8 changes: 4 additions & 4 deletions docs/workflow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -618,11 +618,11 @@ You can also reset qubits individually.
.. testcode::

from dwave.gate.qcdl import qcdl
from dwave.gate.qcdl.operations import initialize
from dwave.gate.qcdl.operations import reset
Comment thread
qci-amos marked this conversation as resolved.

@qcdl(1)
def reset_example(q0):
q0.reset()
reset(q0)


.. _qcdl_basic_transpilation:
Expand Down Expand Up @@ -927,15 +927,15 @@ This example detects and resets a qubit if it has been erased.
.. testcode::

from dwave.gate.qcdl import qcdl
from dwave.gate.qcdl.operations import mced
from dwave.gate.qcdl.operations import mced, reset

@qcdl(1)
def detect_erasure_example(q0):
Comment thread
qci-amos marked this conversation as resolved.
erased = q0.Register(name="erased")
erased <<= 0
mced(q0, register=erased)
with q0.If(erased == 1):
q0.reset()
reset(q0)

This example conditions on a classical register.

Expand Down
Loading