|
| 1 | +# Copyright 2023 Google LLC |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# https://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | +r"""Simulating the Hubbard model Hamiltonian using qubitization. |
| 15 | +
|
| 16 | +This module follows section V. of Encoding Electronic Spectra in Quantum Circuits with Linear T |
| 17 | +Complexity. Babbush et. al. 2018. [arxiv:1805.03662](https://arxiv.org/abs/1805.03662). |
| 18 | +
|
| 19 | +The 2D Hubbard model is a special case of the electronic structure Hamiltonian |
| 20 | +restricted to spins on a planar grid. |
| 21 | +
|
| 22 | +$$ |
| 23 | +H = -t \sum_{\langle p,q \rangle, \sigma} a_{p,\sigma}^\dagger a_{q,\sigma} |
| 24 | + + \frac{u}{2} \sum_{p,\alpha\ne\beta} n_{p, \alpha} n_{p, \beta} |
| 25 | +$$ |
| 26 | +
|
| 27 | +Under the Jordan-Wigner transformation to Pauli operators, this is |
| 28 | +
|
| 29 | +$$ |
| 30 | +\def\Zvec{\overrightarrow{Z}} |
| 31 | +\def\hop#1{#1_{p,\sigma} \Zvec #1_{q,\sigma}} |
| 32 | +H = -\frac{t}{2} \sum_{\langle p,q \rangle, \sigma} (\hop{X} + \hop{Y}) |
| 33 | + + \frac{u}{8} \sum_{p,\alpha\ne\beta} Z_{p,\alpha}Z_{p,\beta} |
| 34 | + - \frac{u}{4} \sum_{p,\sigma} Z_{p,\sigma} + \frac{uN}{4}\mathbb{1} |
| 35 | +$$ |
| 36 | +
|
| 37 | +This can be simulated using a qubitization circuit, which consists of PREPARE and SELECT |
| 38 | +operations. This module contains `SelectHubbard` and `PrepareHubbard`, with particular |
| 39 | +compilation optimizations for the Hubbard model. For more insight into how Select and Prepare |
| 40 | +operations can be combined into a quantum walk, please see |
| 41 | +[Qubitization Walk Operator](./qubitization_walk_operator.ipynb). |
| 42 | +
|
| 43 | +With these operators, our selection register has indices |
| 44 | +for $p$, $\alpha$, $q$, and $\beta$ as well as two indicator bits $U$ and $V$. There are four cases |
| 45 | +considered in both the PREPARE and SELECT operations corresponding to the terms in the Hamiltonian: |
| 46 | +
|
| 47 | + - $U=1$, single-body Z |
| 48 | + - $V=1$, spin-spin ZZ term |
| 49 | + - $p<q$, XZX term |
| 50 | + - $p>q$, YZY term. |
| 51 | +""" |
| 52 | +from .prepare_hubbard import PrepareHubbard |
| 53 | +from .select_hubbard import SelectHubbard |
| 54 | +from .walk_operator import get_walk_operator_for_hubbard_model |
0 commit comments