Skip to content

Commit

Permalink
regen notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
anurudhp committed Nov 6, 2024
1 parent e6b365d commit 62ea110
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
21 changes: 18 additions & 3 deletions qualtran/bloqs/phase_estimation/qubitization_qpe.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
"\n",
"#### Parameters\n",
" - `walk`: Bloq representing the Qubitization walk operator to run the phase estimation protocol on.\n",
" - `m_bits`: Bitsize of the phase register to be used during phase estimation.\n",
" - `ctrl_state_prep`: Bloq to prepare the control state on the phase register. Defaults to `OnEach(self.m_bits, Hadamard())`.\n",
" - `qft_inv`: Bloq to apply inverse QFT on the phase register. Defaults to `QFTTextBook(self.m_bits).adjoint()` \n",
"\n",
Expand Down Expand Up @@ -213,8 +212,8 @@
"outputs": [],
"source": [
"from qualtran.drawing import show_bloqs\n",
"show_bloqs([qubitization_qpe_hubbard_model_small, qubitization_qpe_sparse_chem, qubitization_qpe_chem_thc],\n",
" ['`qubitization_qpe_hubbard_model_small`', '`qubitization_qpe_sparse_chem`', '`qubitization_qpe_chem_thc`'])"
"show_bloqs([qubitization_qpe_hubbard_model_small, qubitization_qpe_sparse_chem, qubitization_qpe_chem_thc, qubitization_qpe_ising],\n",
" ['`qubitization_qpe_hubbard_model_small`', '`qubitization_qpe_sparse_chem`', '`qubitization_qpe_chem_thc`', '`qubitization_qpe_ising`'])"
]
},
{
Expand All @@ -241,6 +240,22 @@
"show_call_graph(qubitization_qpe_hubbard_model_small_g)\n",
"show_counts_sigma(qubitization_qpe_hubbard_model_small_sigma)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "49743657",
"metadata": {
"cq.autogen": "QubitizationQPE.qubitization_qpe_ising"
},
"outputs": [],
"source": [
"from qualtran.bloqs.chemistry.ising.walk_operator import get_walk_operator_for_1d_ising_model\n",
"from qualtran.bloqs.phase_estimation import RectangularWindowState\n",
"\n",
"walk, _ = get_walk_operator_for_1d_ising_model(4, 0.1)\n",
"qubitization_qpe_ising = QubitizationQPE(walk, RectangularWindowState(4))"
]
}
],
"metadata": {
Expand Down
1 change: 0 additions & 1 deletion qualtran/bloqs/phase_estimation/qubitization_qpe.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ class QubitizationQPE(GateWithRegisters):
Args:
walk: Bloq representing the Qubitization walk operator to run the phase estimation protocol
on.
m_bits: Bitsize of the phase register to be used during phase estimation.
ctrl_state_prep: Bloq to prepare the control state on the phase register. Defaults to
`OnEach(self.m_bits, Hadamard())`.
qft_inv: Bloq to apply inverse QFT on the phase register. Defaults to
Expand Down

0 comments on commit 62ea110

Please sign in to comment.