Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions documentation/source/general/changelog/changelog-dev.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ New Tutorials/ Updated Documentation

.. Add new tutorials above this line


Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this blankline

* Replaced usage of ``sbp_mult`` with the ``*`` operator in the
``QuantumSession.compile`` and ``IterationEnvironment`` docstrings
(`PR #733 <https://github.com/eclipse-qrisp/Qrisp/pull/733>`_).

API Changes
-----------

Expand Down
15 changes: 7 additions & 8 deletions src/qrisp/core/quantum_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -816,37 +816,36 @@ def compile(

**Workspace**

We calculate a product of 2 :ref:`QuantumFloats <QuantumFloat>` using the
:meth:`sbp_mult <qrisp.sbp_mult>` function which heavily profits from more
workspace.
We calculate a product of 2 :ref:`QuantumFloats <QuantumFloat>` which heavily
profits from more workspace.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the language needs to be altered. With or without workspace, the depth is the same.


>>> from qrisp import QuantumFloat, sbp_mult
>>> from qrisp import QuantumFloat
>>> qf_0 = QuantumFloat(5)
>>> qf_0[:] = 3
>>> qf_1 = QuantumFloat(5)
>>> qf_1[:] = 5

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

>>> qc_0 = qf_res.qs.compile(0)
>>> qc_0.num_qubits()
21
>>> qc_0.depth()
497
205

Compile circuit with 4 workspace qubits

>>> qc_1 = qf_res.qs.compile(4)
>>> qc_1.num_qubits()
25
>>> qc_1.depth()
258
205

**mcx recompilation**

Expand Down
2 changes: 1 addition & 1 deletion src/qrisp/environments/iteration_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Comment on lines +74 to 75

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here. I do not think high demand of ancilla qubits is true anymore. Check how q_mult works and then alter the language.

Therefore many iterations can quickly overload the allocation algorithm.

Expand Down
Loading