quantumlib / ReCirq

Research using Cirq!
https://quantumai.google/cirq/experiments
Apache License 2.0
272 stars 116 forks source link

QAOA run-problem-generation Error #323

Open hmy98213 opened 2 years ago

hmy98213 commented 2 years ago

I am running the "run-problem-generation.py" in https://github.com/quantumlib/ReCirq/blob/dcc4da9892b4e22c386e05242552660b3c558f8e/recirq/qaoa/experiments/run-problem-generation.py#L1-L60

and got the following error:

Traceback (most recent call last):
  File "c:\Users\hmy98\iCloudDrive\Desktop\Test_Generator\qaoa_tutorial.py", line 60, in <module>
    main()
  File "c:\Users\hmy98\iCloudDrive\Desktop\Test_Generator\qaoa_tutorial.py", line 52, in main
    generate_hardware_grid_problem(task)
  File "C:\Users\hmy98\iCloudDrive\Desktop\Test_Generator\venv\lib\site-packages\recirq\qaoa\experiments\problem_generation_tasks.py", line 174, in generate_hardware_grid_problem        
    problem = _get_all_hardware_grid_problems(
  File "C:\Users\hmy98\iCloudDrive\Desktop\Test_Generator\venv\lib\site-packages\recirq\qaoa\experiments\problem_generation_tasks.py", line 156, in _get_all_hardware_grid_problems       
    device_graph = _get_device_graph(device_name=device_name)
  File "C:\Users\hmy98\iCloudDrive\Desktop\Test_Generator\venv\lib\site-packages\recirq\qaoa\experiments\problem_generation_tasks.py", line 121, in _get_device_graph
    device_graph = ccr.gridqubits_to_graph_device(device.qubits)
AttributeError: 'GridDevice' object has no attribute 'qubits'