-
Notifications
You must be signed in to change notification settings - Fork 90
Remove usage of sbp_mult from docstrings #733
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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** | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here. I do not think |
||
| Therefore many iterations can quickly overload the allocation algorithm. | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this blankline