Skip to content

Commit

Permalink
removed \ for line continuation
Browse files Browse the repository at this point in the history
  • Loading branch information
Damian S. Steiger committed Jun 17, 2017
1 parent 17b1cbe commit 8bb6db1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/fermilib/tests/_lih_integration_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ def test_all(self):
# Check that frozen core result matches frozen core FCI from psi4.
# Recore frozen core result from external calculation.
self.frozen_core_fci_energy = -7.8807607374168
no_core_fci_energy = scipy. \
linalg.eigh(self.hamiltonian_matrix_no_core.todense())[0][0]
no_core_fci_energy = scipy.linalg.eigh(
self.hamiltonian_matrix_no_core.todense())[0][0]
self.assertAlmostEqual(no_core_fci_energy,
self.frozen_core_fci_energy)

Expand Down
4 changes: 2 additions & 2 deletions src/fermilib/transforms/_jordan_wigner.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ def jordan_wigner_two_body(p, q, r, s):
elif len(set([p, q, r, s])) == 4:

# Loop through different operators which act on each tensor factor.
for operator_p, operator_q, operator_r in \
itertools.product(['X', 'Y'], repeat=3):
for operator_p, operator_q, operator_r in itertools.product(
['X', 'Y'], repeat=3):
if [operator_p, operator_q, operator_r].count('X') % 2:
operator_s = 'X'
else:
Expand Down
9 changes: 5 additions & 4 deletions src/fermilib/utils/_jellium.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ def momentum_potential_operator(grid, spinless=False):
orbital_c = orbital_id(grid, shifted_indices_c, spin_b)

# Add interaction term.
if (orbital_a != orbital_b) and \
(orbital_c != orbital_d):
if ((orbital_a != orbital_b) and
(orbital_c != orbital_d)):
operators = ((orbital_a, 1), (orbital_b, 1),
(orbital_c, 0), (orbital_d, 0))
operator += FermionOperator(operators, coefficient)
Expand Down Expand Up @@ -439,8 +439,9 @@ def jordan_wigner_position_jellium(grid, spinless=False):
for k_indices in grid.all_points_indices():
momenta = momentum_vector(k_indices, grid)
if momenta.any():
term_coefficient += prefactor * momenta.dot(momenta) * \
numpy.cos(momenta.dot(differences))
term_coefficient += (prefactor *
momenta.dot(momenta) *
numpy.cos(momenta.dot(differences)))

# Add term.
z_string = tuple((i, 'Z') for i in range(p + 1, q))
Expand Down

0 comments on commit 8bb6db1

Please sign in to comment.