Skip to content

Commit

Permalink
[Demo] Fix qml demos (#444)
Browse files Browse the repository at this point in the history
**Description of the Change:** `range` is a generator and generators are
not supported.

---------

Co-authored-by: David Ittah <dime10@users.noreply.github.com>
  • Loading branch information
erick-xanadu and dime10 authored Jan 8, 2024
1 parent f236121 commit fae58ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ ifeq ($(ENABLE_ASAN) $(PLATFORM),ON Darwin)
endif
@echo "check the Catalyst demos"
MDD_BENCHMARK_PRECISION=1 \
$(ASAN_COMMAND) $(PYTHON) -m pytest demos/*.ipynb --nbmake $(PARALLELIZE)
$(ASAN_COMMAND) $(PYTHON) -m pytest demos --nbmake $(PARALLELIZE)

wheel:
echo "INSTALLED = True" > $(MK_DIR)/frontend/catalyst/_configuration.py
Expand Down
2 changes: 1 addition & 1 deletion demos/qml/tutorial_qft_arithmetics.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@
"\n",
" fourier_add_const(k, range(n_wires))\n",
"\n",
" qml.adjoint(qml.QFT)(wires=range(n_wires))\n",
" qml.adjoint(qml.QFT)(wires=list(range(n_wires)))\n",
"\n",
" return qml.sample()\n",
"\n",
Expand Down

0 comments on commit fae58ae

Please sign in to comment.