Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Cirq 0.12 #200

Closed
4 of 6 tasks
mpharrigan opened this issue Aug 17, 2021 · 6 comments · Fixed by #223
Closed
4 of 6 tasks

Update to Cirq 0.12 #200

mpharrigan opened this issue Aug 17, 2021 · 6 comments · Fixed by #223
Labels

Comments

@mpharrigan
Copy link
Collaborator

mpharrigan commented Aug 17, 2021

A new Cirq has been released. I will track any outstanding migration issues here.

  • bump cirq version number
  • ERROR: cirq 0.11.1 has requirement cirq-core==0.11.1, but you'll have cirq-core 0.12.0 which is incompatible.
    ERROR: cirq 0.11.1 has requirement cirq-google==0.11.1, but you'll have cirq-google 0.12.0 which is incompatible. I think this is from openfermion Release version compatible with Cirq 0.12 OpenFermion#743. pip install seems to work anyway: the above is a warning. newer pips hang in a very bad way, I think related to this and pytket
  • cirq_google.gate_set breaking change
  • segfault in docker when running tests. Seems to be a pytket issue. Pinning to not-the-latest-version
  • docs/quantum_chess/concepts is pre-filled out. Is this necessary? #214 -- not blocking. I just found it when manually testing all the pre-filled-in notebooks
  • molecular_data notebook issue. This is due to a change in h5py and no recent release of openfermionpyscf. Pinning h5py works for now but may cause environment issues later if other projects require a newer h5py.
@mpharrigan
Copy link
Collaborator Author

in hfvqf/molecular_data.ipynb

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-5-0c9a581e9405> in <module>
      1 from openfermion import MolecularData, general_basis_change
----> 2 from openfermionpyscf import run_pyscf

~/cirq/py39-venv/lib/python3.9/site-packages/openfermionpyscf/__init__.py in <module>
     15 """
     16 
---> 17 from ._pyscf_molecular_data import PyscfMolecularData
     18 
     19 from ._run_pyscf import (

~/cirq/py39-venv/lib/python3.9/site-packages/openfermionpyscf/_pyscf_molecular_data.py in <module>
     15 import numpy
     16 from functools import reduce
---> 17 from pyscf import ao2mo
     18 from pyscf import scf
     19 from pyscf.cc.addons import spatial2spin

~/cirq/py39-venv/lib/python3.9/site-packages/pyscf/__init__.py in <module>
     69 
     70 from pyscf import __config__
---> 71 from pyscf import lib
     72 from pyscf import gto
     73 from pyscf import scf

~/cirq/py39-venv/lib/python3.9/site-packages/pyscf/lib/__init__.py in <module>
     22 from pyscf.lib import parameters
     23 param = parameters
---> 24 from pyscf.lib import numpy_helper
     25 from pyscf.lib import linalg_helper
     26 from pyscf.lib import logger

~/cirq/py39-venv/lib/python3.9/site-packages/pyscf/lib/numpy_helper.py in <module>
     25 import math
     26 import numpy
---> 27 from pyscf.lib import misc
     28 from numpy import asarray  # For backward compatibility
     29 

~/cirq/py39-venv/lib/python3.9/site-packages/pyscf/lib/misc.py in <module>
     44                      'Async-IO is disabled.\n' % ((h5py.version.version,)*2))
     45 if h5py.version.version[:2] == '3.':
---> 46     h5py.get_config().default_file_mode = 'a'
     47 
     48 c_double_p = ctypes.POINTER(ctypes.c_double)

h5py/h5.pyx in h5py.h5.H5PYConfig.default_file_mode.__set__()

ValueError: Using default_file_mode other than 'r' is no longer supported. Pass the mode to h5py.File() instead.

@dstrain115
Copy link
Collaborator

Let me know if you need help with the gate_set issue. I did that change. I am not sure what the broken change was. If it is typing, you should be able to change SerializableGateSet with Serializer.

@mpharrigan
Copy link
Collaborator Author

It's a pretty simple fix. Some places we were importing cirq_google.gate_set. I changed those instances to top level cirq_google

@ncrubin
Copy link
Contributor

ncrubin commented Sep 20, 2021

@mpharrigan this is an issue with pyscf. pip install h5py==3.2.1 will fix this.

@mpharrigan
Copy link
Collaborator Author

Is there an open issue for openfermionpyscf? to release a new version that doesn't require pinning or itself chooses the correct version?

@mpharrigan
Copy link
Collaborator Author

opened quantumlib/OpenFermion-PySCF#60

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants