qulacs/cirq-qulacs

Cannot Simulate any circuits with cirqqulacs

as3232cornell opened this issue · 0 comments

Hello,
I have run a fresh installation of cirq, qulacs, and cirqqulacs on a new anaconda environment. Whenever I try to simulate any circuit, as in the tutorial, I get the error

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/as3232/.conda/envs/qulacs/lib/python3.7/site-packages/cirq/sim/simulator.py", line 435, in simulate
    program, study.ParamResolver(param_resolver), qubit_order, initial_state
  File "/home/as3232/cirq-qulacs/cirqqulacs/qulacs_simulator.py", line 128, in simulate_sweep
    final_simulator_state=final_state
  File "/home/as3232/.conda/envs/qulacs/lib/python3.7/site-packages/cirq/sim/simulator.py", line 845, in __init__
    if [final_step_result, final_simulator_state].count(None) != 1:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

Here are my packages:

Package                  Version
------------------------ -----------
attrs                    20.3.0
bayesian-optimization    1.2.0
cachetools               4.2.4
certifi                  2021.5.30
charset-normalizer       2.0.7
cirq                     0.13.0
cirq-aqt                 0.13.0
cirq-core                0.13.0
cirq-google              0.13.0
cirq-ionq                0.13.0
cirq-pasqal              0.13.0
cirq-rigetti             0.13.0
cirq-web                 0.13.0
cirqqulacs               0.0.3
cma                      3.1.0
cycler                   0.10.0
decorator                5.1.0
duet                     0.2.1
google-api-core          1.31.3
google-auth              1.35.0
googleapis-common-protos 1.53.0
grpcio                   1.41.0
h11                      0.9.0
httpcore                 0.11.1
httpx                    0.15.5
idna                     2.10
importlib-metadata       3.10.1
iso8601                  0.1.16
kiwisolver               1.3.2
lark                     0.11.3
matplotlib               3.4.3
mpmath                   1.2.1
msgpack                  0.6.2
networkx                 2.6.3
nevergrad                0.4.3.post8
numpy                    1.21.2
packaging                21.0
pandas                   1.3.4
Pillow                   8.4.0
pip                      21.0.1
protobuf                 3.17.3
py                       1.10.0
Py-BOBYQA                1.3
pyasn1                   0.4.8
pyasn1-modules           0.2.8
pydantic                 1.8.2
PyJWT                    1.7.1
pyparsing                2.4.7
pyquil                   3.0.0
python-dateutil          2.8.2
python-rapidjson         1.4
pytz                     2021.3
pyzmq                    22.3.0
qcs-api-client           0.8.0
Qulacs                   0.3.0
requests                 2.26.0
retry                    0.9.2
retrying                 1.3.3
rfc3339                  6.2
rfc3986                  1.5.0
rpcq                     3.9.2
rsa                      4.7.2
ruamel.yaml              0.17.16
ruamel.yaml.clib         0.2.6
scipy                    1.7.1
setuptools               58.0.4
six                      1.16.0
sniffio                  1.2.0
sortedcontainers         2.4.0
sympy                    1.9
toml                     0.10.2
tqdm                     4.62.3
typing-extensions        3.10.0.2
urllib3                  1.26.7
wheel                    0.37.0
zipp                     3.6.0