Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinsung committed Jan 2, 2024
1 parent 9784d8b commit 1e4119a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion qiskit_cold_atom/fermions/ffsim_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ def _simulate_phase(
)


def _fermionic_op_to_fermion_operator(
def _fermionic_op_to_fermion_operator( # pylint: disable=invalid-name
op: FermionicOp, target_orbs: list[int]
) -> ffsim.FermionOperator:
"""Convert a Qiskit Nature FermionicOp to an ffsim FermionOperator."""
Expand Down
7 changes: 7 additions & 0 deletions test/test_ffsim_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class TestFfsimBackend:
"""Test FfsimBackend."""

def test_hop_gate(self):
"""Test hop gate."""
norb = 5
nelec = (3, 2)

Expand Down Expand Up @@ -83,6 +84,7 @@ def test_hop_gate(self):
np.testing.assert_allclose(ffsim_vec, expected_vec, atol=1e-12)

def test_hop_gate_sign(self):
"""Test hop gate correctly handles fermionic sign."""
norb = 4

occupations = [[1, 0, 1, 0], [1, 0, 1, 0]]
Expand All @@ -102,6 +104,7 @@ def test_hop_gate_sign(self):
np.testing.assert_allclose(ffsim_vec, expected_vec, atol=1e-12)

def test_interaction_gate(self):
"""Test interaction gate."""
norb = 5
nelec = (3, 2)

Expand Down Expand Up @@ -131,6 +134,7 @@ def test_interaction_gate(self):
np.testing.assert_allclose(ffsim_vec, expected_vec, atol=1e-12)

def test_phase_gate(self):
"""Test phase gate."""
norb = 5
nelec = (3, 2)

Expand Down Expand Up @@ -161,6 +165,7 @@ def test_phase_gate(self):
np.testing.assert_allclose(ffsim_vec, expected_vec, atol=1e-12)

def test_fermi_hubbard_gate(self):
"""Test Fermi-Hubbard gate."""
norb = 5
nelec = (3, 2)

Expand Down Expand Up @@ -198,6 +203,7 @@ def test_fermi_hubbard_gate(self):
np.testing.assert_allclose(ffsim_vec, expected_vec, atol=1e-12)

def test_fermi_hubbard_gate_simple(self):
"""Test a simple Fermi-Hubbard gate."""
norb = 4

occupations = [[1, 1, 0, 0], [1, 1, 0, 0]]
Expand All @@ -217,6 +223,7 @@ def test_fermi_hubbard_gate_simple(self):
np.testing.assert_allclose(ffsim_vec, expected_vec, atol=1e-12)

def test_simulate(self):
"""Test simulating and measuring a statevector."""
norb = 5
nelec = (3, 2)

Expand Down

0 comments on commit 1e4119a

Please sign in to comment.