File tree Expand file tree Collapse file tree
src/openfermion/measurements Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313import os
1414import unittest
1515import numpy
16- import openfermion
1716
17+ from openfermion .ops .operators import FermionOperator
1818from openfermion .chem import MolecularData
1919from openfermion .config import DATA_DIRECTORY
2020from openfermion .transforms .opconversions import get_fermion_operator
@@ -61,9 +61,9 @@ def test_linearize_term(self):
6161 past_terms .add (index )
6262
6363 def test_error_with_non_physical_term (self ):
64- non_physical_operator = openfermion . FermionOperator ((0 , 1 ))
64+ non_physical_operator = FermionOperator ((0 , 1 ))
6565 with self .assertRaises (ValueError ):
66- linearize_term (non_physical_operator , self .n_orbitals )
66+ linearize_term (non_physical_operator . terms , self .n_orbitals )
6767
6868 def test_unlinearize_term_consistency (self ):
6969 for term , _ in self .fermion_hamiltonian .terms .items ():
You can’t perform that action at this time.
0 commit comments