Skip to content

Commit

Permalink
added comment for pyqsp version
Browse files Browse the repository at this point in the history
  • Loading branch information
orsa-classiq committed Jan 20, 2025
1 parent 04b51af commit 9f04405
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,8 @@
}
],
"source": [
"# The following code assumes pyqsp version 0.1.6\n",
"# !pip install pyqsp==0.1.6\n",
"import pyqsp\n",
"from pyqsp.angle_sequence import QuantumSignalProcessingPhases\n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,8 @@
}
],
"source": [
"# The following code assumes pyqsp version 0.1.6\n",
"# !pip install pyqsp==0.1.6\n",
"import pyqsp\n",
"\n",
"DEGREE = 25\n",
Expand Down
26 changes: 2 additions & 24 deletions algorithms/qsvt/qsvt_matrix_inversion/qsvt_matrix_inversion.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -287,30 +287,6 @@
"\n",
"@qfunc\n",
"def my_qsvt_step(\n",
" phase_seq: CArray[CReal],\n",
" index: CInt,\n",
" u: QCallable[QArray[QBit]],\n",
" state: QArray[QBit],\n",
" aux: QBit,\n",
"):\n",
" my_projector_controlled_phase(phase_seq[2 * index], proj_cnot_1, state, aux)\n",
" u(state)\n",
" my_projector_controlled_phase(\n",
" phase_seq[2 * index + 1],\n",
" proj_cnot_2,\n",
" state,\n",
" aux,\n",
" )\n",
"\n",
" if_(\n",
" condition=2 * index + 2 == phase_seq.len,\n",
" then=lambda: IDENTITY(state),\n",
" else_=lambda: invert(lambda: u(state)),\n",
" )\n",
"\n",
"\n",
"@qfunc\n",
"def my_qsvt_step(\n",
" phase1: CReal,\n",
" phase2: CReal,\n",
" proj_cnot_1: QCallable[QArray[QBit], QBit],\n",
Expand Down Expand Up @@ -470,6 +446,8 @@
}
],
"source": [
"# The following code assumes pyqsp version 0.1.6\n",
"# !pip install pyqsp==0.1.6\n",
"import pyqsp\n",
"\n",
"pg = pyqsp.poly.PolyOneOverX()\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@
"\n",
"import numpy as np\n",
"from numpy.polynomial import Polynomial\n",
"\n",
"# The following code assumes pyqsp version 0.1.6\n",
"# !pip install pyqsp==0.1.6\n",
"from pyqsp.angle_sequence import QuantumSignalProcessingPhases\n",
"\n",
"from classiq import *\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -481,9 +481,7 @@
{
"name": "stdout",
"output_type": "stream",
"text": [
""
]
"text": []
}
],
"source": [
Expand Down Expand Up @@ -856,9 +854,7 @@
{
"name": "stdout",
"output_type": "stream",
"text": [
""
]
"text": []
}
],
"source": [
Expand Down Expand Up @@ -989,6 +985,8 @@
}
],
"source": [
"# The following code assumes pyqsp version 0.1.6\n",
"# !pip install pyqsp==0.1.6\n",
"import pyqsp\n",
"from pyqsp.angle_sequence import Polynomial, QuantumSignalProcessingPhases\n",
"\n",
Expand Down Expand Up @@ -1207,9 +1205,7 @@
{
"name": "stdout",
"output_type": "stream",
"text": [
""
]
"text": []
}
],
"source": [
Expand Down

0 comments on commit 9f04405

Please sign in to comment.