diff --git a/src/openfermion/ops/representations/doci_hamiltonian_test.py b/src/openfermion/ops/representations/doci_hamiltonian_test.py index 86cdb0de3..70fa603b3 100644 --- a/src/openfermion/ops/representations/doci_hamiltonian_test.py +++ b/src/openfermion/ops/representations/doci_hamiltonian_test.py @@ -16,6 +16,7 @@ import unittest import numpy +import pytest from openfermion.config import EQ_TOLERANCE from openfermion.chem.molecular_data import MolecularData @@ -24,11 +25,9 @@ from openfermion.linalg import get_sparse_operator from openfermion.ops.representations.doci_hamiltonian import ( DOCIHamiltonian, - get_tensors_from_doci, - get_projected_integrals_from_doci, get_doci_from_integrals, ) -from openfermion import get_fermion_operator, InteractionOperator, normal_ordered +from openfermion import get_fermion_operator, InteractionOperator numpy.set_printoptions(linewidth=2000, threshold=sys.maxsize) @@ -55,6 +54,7 @@ def test_integrals_self_inverse(self): self.assertTrue(numpy.allclose(hr1, hr1_test)) self.assertTrue(numpy.allclose(hr2, hr2_test)) + @pytest.mark.slow def test_fermionic_hamiltonian_from_integrals(self): constant = self.molecule.nuclear_repulsion doci_constant = constant diff --git a/src/openfermion/resource_estimates/pbc/thc/factorizations/isdf_test.py b/src/openfermion/resource_estimates/pbc/thc/factorizations/isdf_test.py index 47706baf8..1b0e02905 100644 --- a/src/openfermion/resource_estimates/pbc/thc/factorizations/isdf_test.py +++ b/src/openfermion/resource_estimates/pbc/thc/factorizations/isdf_test.py @@ -10,6 +10,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + import numpy as np import pytest @@ -253,6 +254,7 @@ def test_G_vector_mapping_single_translation(): @pytest.mark.skipif(not HAVE_DEPS_FOR_RESOURCE_ESTIMATES, reason='pyscf and/or jax not installed.') +@pytest.mark.slow def test_kpoint_isdf_double_translation(): cell = gto.Cell() cell.atom = """ @@ -300,6 +302,7 @@ def test_kpoint_isdf_double_translation(): @pytest.mark.skipif(not HAVE_DEPS_FOR_RESOURCE_ESTIMATES, reason='pyscf and/or jax not installed.') +@pytest.mark.slow def test_kpoint_isdf_single_translation(): cell = gto.Cell() cell.atom = """ diff --git a/src/openfermion/transforms/opconversions/remove_symmetry_qubits_test.py b/src/openfermion/transforms/opconversions/remove_symmetry_qubits_test.py index 95ed7b3cb..98c7bf1bd 100644 --- a/src/openfermion/transforms/opconversions/remove_symmetry_qubits_test.py +++ b/src/openfermion/transforms/opconversions/remove_symmetry_qubits_test.py @@ -16,6 +16,8 @@ import unittest +import pytest + from openfermion.hamiltonians import fermi_hubbard from openfermion.chem import MolecularData from openfermion.transforms.opconversions import get_fermion_operator @@ -83,6 +85,7 @@ def number_of_qubits(qubit_hamiltonian, unreduced_orbitals): class ReduceSymmetryQubitsTest(unittest.TestCase): # Check whether fermionic and reduced qubit Hamiltonians # have the same energy for LiH + @pytest.mark.slow def test_energy_reduce_symmetry_qubits(self): # Generate the fermionic Hamiltonians, # number of orbitals and number of electrons.