Skip to content

Commit b979e77

Browse files
committed
QMCI: replaced control env by condition env
1 parent e59a9db commit b979e77

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

documentation/source/general/tutorial/QMCItutorial.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ Now, we arrive at the heart of the algorithm, the definition of the ``state_func
131131
distribution(qf_x)
132132
h(qf_y)
133133

134-
qbl = (qf_y < function(qf_x))
135-
cx(qbl,tar)
134+
with(qf_y < function(*qf_x)):
135+
x(tar)
136136

137137
It receives the ``@auto_uncompute`` :ref:`decorator <uncomputation>` ensuring that all intermediate variables are properly uncomputed.
138138
We apply the chosen distribution to ``qf_x``, which represents the :math:`x`-axes support.

src/qrisp/algorithms/qmci.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ def state_function(*args):
103103
distribution(*qf_x)
104104
h(qf_y)
105105

106-
qbl = (qf_y < function(*qf_x))
107-
cx(qbl,tar)
106+
with(qf_y < function(*qf_x)):
107+
x(tar)
108108

109109
a = IQAE(qargs, state_function, eps=0.01, alpha=0.01)
110110

0 commit comments

Comments
 (0)