Skip to content

Commit

Permalink
make it work with python3
Browse files Browse the repository at this point in the history
  • Loading branch information
Spaceenter committed Jul 23, 2017
1 parent 978c365 commit ba224de
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/fermilib/utils/_operator_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

from fermilib.config import *
from fermilib.ops import *
from itertools import *
from future.builtins.iterators import map, zip

from projectq.ops import QubitOperator

Expand Down Expand Up @@ -153,8 +153,8 @@ def save_operator(operator, file_name=None, data_directory=None):

tm = operator.terms
with open(file_path, 'wb') as f:
marshal.dump((operator_type, dict(izip(tm.iterkeys(),
imap(complex, tm.itervalues())))), f)
marshal.dump((operator_type, dict(zip(tm.keys(),
map(complex, tm.values())))), f)
f.close()


Expand Down

0 comments on commit ba224de

Please sign in to comment.