Skip to content

Commit 6a5d301

Browse files
authored
Remove original dependabot-pr-trimmer.yaml (#1044)
1 parent 17f7eb5 commit 6a5d301

24 files changed

+94
-69
lines changed

src/openfermion/chem/reduced_hamiltonian.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ def make_reduced_hamiltonian(
1515
lift the 1-body terms to the two-body space.
1616
1717
Derivation:
18-
use the fact that i^l = (1/(n -1)) sum_{jk}\delta_{jk}i^ j^ k l
19-
i^l = (-1/(n -1)) sum_{jk}\delta_{jk}j^ i^ k l
20-
i^l = (-1/(n -1)) sum_{jk}\delta_{jk}i^ j^ l k
21-
i^l = (1/(n -1)) sum_{jk}\delta_{jk}j^ i^ l k
18+
use the fact that
19+
- $i^l = (1/(n -1)) sum_{jk}\delta_{jk}i^ j^ k l$
20+
- $i^l = (-1/(n -1)) sum_{jk}\delta_{jk}j^ i^ k l$
21+
- $i^l = (-1/(n -1)) sum_{jk}\delta_{jk}i^ j^ l k$
22+
- $i^l = (1/(n -1)) sum_{jk}\delta_{jk}j^ i^ l k$
2223
2324
Rewrite each one-body term as an even weighting of all four 2-RDM
2425
elements with delta functions. Then rearrange terms so that each ijkl

src/openfermion/circuits/gates/fermionic_simulation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ def state_swap_eigen_component(x: str, y: str, sign: int = 1, angle: float = 0):
5252
"""The +/- eigen-component of the operation that swaps states x and y.
5353
5454
For example, state_swap_eigen_component('01', '10', ±1) with angle θ returns
55+
5556
┌ ┐
5657
│0, 0, 0, 0│
5758
│0, 0.5, ±0.5 e^{-iθ}, 0│
@@ -102,7 +103,7 @@ def fermionic_simulation_gates_from_interaction_operator(
102103
):
103104
r"""
104105
Given $H = \sum_{I \subset [n]} H_I$, returns gates
105-
$\left\{G_I\right\} = \left\{e^{i H_I\right\}$.
106+
$\left\{G_I\right\} = \left\{e^{i H_I}\right\}$.
106107
107108
Each term $H_I$ is the sum of all terms in $H$ that involve exactly the
108109
orbitals $I$.

src/openfermion/circuits/primitives/bogoliubov_transform.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def bogoliubov_transform(
5151
given by
5252
5353
$$
54-
b^\dagger_p = \sum_{q=1}^N W_{pq} a^\dagger_q
54+
b^\dagger_p = \sum_{q=1}^N W_{pq} a^\dagger_q \\
5555
+ \sum_{q=N+1}^{2N} W_{pq} a_q.
5656
$$
5757

src/openfermion/hamiltonians/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656

5757
from .special_operators import (
5858
s_plus_operator,
59+
s_minus_operator,
5960
s_squared_operator,
6061
sx_operator,
6162
sy_operator,

src/openfermion/hamiltonians/general_hubbard.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ class FermiHubbardModel:
6363
form
6464
6565
$$
66+
\begin{align}
6667
H = &- \sum_{a < b} t_{a, b}^{(\mathrm{onsite})}
6768
\sum_{i} \sum_{\sigma}
6869
(a^\dagger_{i, a, \sigma} a_{i, b, \sigma} +
@@ -104,6 +105,7 @@ class FermiHubbardModel:
104105
\\
105106
&- h \sum_{i} \sum_{a}
106107
\left(n_{i, a, \uparrow} - n_{i, a, \downarrow}\right)
108+
\end{align}
107109
$$
108110
109111
where
@@ -159,6 +161,7 @@ class FermiHubbardModel:
159161
&- \sum_{a} \mu_a
160162
\sum_i n_{i, a}
161163
\end{align}
164+
$$
162165
"""
163166

164167
def __init__(

src/openfermion/hamiltonians/richardson_gaudin.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,30 +22,30 @@ class RichardsonGaudin(DOCIHamiltonian):
2222
r"""Richardson Gaudin model.
2323
2424
Class for storing and constructing Richardson Gaudin hamiltonians
25-
combining an equi-distant potential ladder like potential per
25+
combining an equidistant potential ladder like potential per
2626
qubit with a uniform coupling between any pair of
27-
qubits with coupling strength g, which can be either attractive
28-
(g<0) or repulsive (g>0).
27+
qubits with coupling strength `g`, which can be either attractive
28+
(`g<0`) or repulsive (`g>0`).
2929
30-
The operators represented by this class has the form:
31-
32-
.. math::
30+
The operators represented by this class have the form:
3331
32+
$$
3433
H = \sum_{p=0} (p + 1) N_p + g/2 \sum_{p < q} P_p^\dagger P_q,
34+
$$
3535
3636
where
3737
38-
.. math::
39-
38+
$$
4039
\begin{align}
4140
N_p &= (1 - \sigma^Z_p)/2, \\
4241
P_p &= a_{p,\beta} a_{p,\alpha} = S^{-} = \sigma^X + i \sigma^Y, \\
4342
g &= constant coupling term
4443
\end{align}
44+
$$
4545
4646
Note;
4747
The diagonal of the Hamiltonian is composed of the values in
48-
range((n_qubits+1)*n_qubits//2+1).
48+
`range((n_qubits+1)*n_qubits//2+1)`.
4949
"""
5050

5151
def __init__(self, g, n_qubits):

src/openfermion/hamiltonians/special_operators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def s_plus_operator(n_spatial_orbitals: int) -> FermionOperator:
4848

4949

5050
def s_minus_operator(n_spatial_orbitals: int) -> FermionOperator:
51-
r"""Return the s+ operator.
51+
r"""Return the s- operator.
5252
5353
$$
5454
\begin{align}

src/openfermion/linalg/erpa.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def erpa_eom_hamiltonian(
1212
h_ijkl: numpy.ndarray, tpdm: numpy.ndarray, p: int, q: int, r: int, s: int
1313
) -> Union[float, complex]:
1414
"""
15-
Evaluate sum_{a,b,c,d}h_{a, b, d, c}<psi[p^ q, [a^ b^ c d, r^ s]]psi>
15+
Evaluate $\sum_{a,b,c,d}h_{a, b, d, c}<\psi[p^ q, [a^ b^ c d, r^ s]]\psi>$
1616
1717
Args:
1818
h_ijkl: two-body integral tensors of full reduced Hamiltonian
@@ -84,7 +84,7 @@ def singlet_erpa(
8484
"""
8585
Generate the singlet ERPA equations
8686
87-
[ea + eb, [H, sa, sb]] = [ea, [H, sa]]
87+
[ea + eb, [H, sa, sb]] = [ea, [H, sa]]
8888
8989
The erpa equations are solved with scipy.linalg.eig which calls
9090
lapack's geev

src/openfermion/linalg/rdm_reconstruction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def valdemoro_reconstruction(tpdm, n_electrons):
66
"""
77
Build a 3-RDM by cumulant expansion and setting 3rd cumulant to zero
88
9-
d3 approx = D ^ D ^ D + 3 (2C) ^ D
9+
d3 approx = D ^ D ^ D + 3 (2C) ^ D
1010
1111
tpdm has normalization (n choose 2) where n is the number of electrons
1212

src/openfermion/linalg/sparse_tools.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ def jordan_wigner_ladder_sparse(n_qubits, tensor_factor, ladder_type):
4949
r"""Make a matrix representation of a fermion ladder operator.
5050
5151
Operators are mapped as follows:
52-
a_j^\dagger -> Z_0 .. Z_{j-1} (X_j - iY_j) / 2
53-
a_j -> Z_0 .. Z_{j-1} (X_j + iY_j) / 2
52+
53+
a_j^\dagger -> Z_0 .. Z_{j-1} (X_j - iY_j) / 2
54+
a_j -> Z_0 .. Z_{j-1} (X_j + iY_j) / 2
5455
5556
Args:
5657
index: This is a nonzero integer. The integer indicates the tensor
@@ -75,8 +76,9 @@ def jordan_wigner_sparse(fermion_operator, n_qubits=None):
7576
r"""Initialize a Scipy sparse matrix from a FermionOperator.
7677
7778
Operators are mapped as follows:
78-
a_j^\dagger -> Z_0 .. Z_{j-1} (X_j - iY_j) / 2
79-
a_j -> Z_0 .. Z_{j-1} (X_j + iY_j) / 2
79+
80+
a_j^\dagger -> Z_0 .. Z_{j-1} (X_j - iY_j) / 2
81+
a_j -> Z_0 .. Z_{j-1} (X_j + iY_j) / 2
8082
8183
Args:
8284
fermion_operator(FermionOperator): instance of the FermionOperator

0 commit comments

Comments
 (0)