diff --git a/documentation/source/general/changelog/changelog-dev.rst b/documentation/source/general/changelog/changelog-dev.rst index 6e46bae1a..08c8e70f4 100644 --- a/documentation/source/general/changelog/changelog-dev.rst +++ b/documentation/source/general/changelog/changelog-dev.rst @@ -33,6 +33,11 @@ New Tutorials/ Updated Documentation .. Add new tutorials above this line + +* Replaced usage of ``sbp_mult`` with the ``*`` operator in the + ``QuantumSession.compile`` and ``IterationEnvironment`` docstrings + (`PR #733 `_). + API Changes ----------- diff --git a/src/qrisp/core/quantum_session.py b/src/qrisp/core/quantum_session.py index 2a7eec7b3..2bd5b2900 100644 --- a/src/qrisp/core/quantum_session.py +++ b/src/qrisp/core/quantum_session.py @@ -816,11 +816,10 @@ def compile( **Workspace** - We calculate a product of 2 :ref:`QuantumFloats ` using the - :meth:`sbp_mult ` function which heavily profits from more - workspace. + We calculate a product of 2 :ref:`QuantumFloats ` which heavily + profits from more workspace. - >>> from qrisp import QuantumFloat, sbp_mult + >>> from qrisp import QuantumFloat >>> qf_0 = QuantumFloat(5) >>> qf_0[:] = 3 >>> qf_1 = QuantumFloat(5) @@ -828,9 +827,9 @@ def compile( Calculate product: - >>> qf_res = sbp_mult(qf_0, qf_1) + >>> qf_res = qf_0 * qf_1 >>> qf_res.qs.num_qubits() - 45 + 21 Compile circuit with no workspace @@ -838,7 +837,7 @@ def compile( >>> qc_0.num_qubits() 21 >>> qc_0.depth() - 497 + 205 Compile circuit with 4 workspace qubits @@ -846,7 +845,7 @@ def compile( >>> qc_1.num_qubits() 25 >>> qc_1.depth() - 258 + 205 **mcx recompilation** diff --git a/src/qrisp/environments/iteration_environment.py b/src/qrisp/environments/iteration_environment.py index 36bf0573a..eb5213baf 100644 --- a/src/qrisp/environments/iteration_environment.py +++ b/src/qrisp/environments/iteration_environment.py @@ -71,7 +71,7 @@ class IterationEnvironment(QuantumEnvironment): **Precompilation** - Squaring a :ref:`QuantumFloat` uses the :meth:`qrisp.sbp_mult` function, + Squaring a :ref:`QuantumFloat` uses a multiplication algorithm which has a high demand of ancilla qubits. Therefore many iterations can quickly overload the allocation algorithm.