File tree Expand file tree Collapse file tree 4 files changed +16
-10
lines changed Expand file tree Collapse file tree 4 files changed +16
-10
lines changed Original file line number Diff line number Diff line change 95
95
" try:\n " ,
96
96
" import cirq\n " ,
97
97
" \n " ,
98
- " # trigger ImportError when cirq is not cirq~=1.0.dev\n " ,
99
- " from cirq_google.engine import load_device_noise_properties as _\n " ,
98
+ " # raise ImportError when cirq is not new enough\n " ,
99
+ " if cirq.__version__ == \" 1.5.0\" :\n " ,
100
+ " raise ImportError(\" This notebook requires development version of Cirq\" )\n " ,
100
101
" except ImportError:\n " ,
101
102
" print(\" installing cirq...\" )\n " ,
102
103
" !pip install --upgrade --quiet cirq~=1.0.dev\n " ,
Original file line number Diff line number Diff line change 84
84
" try:\n " ,
85
85
" import cirq\n " ,
86
86
" \n " ,
87
- " # trigger ImportError when cirq is not cirq~=1.0.dev\n " ,
88
- " from cirq_google.engine import load_device_noise_properties as _\n " ,
87
+ " # raise ImportError when cirq is not new enough\n " ,
88
+ " if cirq.__version__ == \" 1.5.0\" :\n " ,
89
+ " raise ImportError(\" This notebook requires development version of Cirq\" )\n " ,
89
90
" except ImportError:\n " ,
90
91
" print(\" installing cirq...\" )\n " ,
91
92
" !pip install --upgrade --quiet cirq~=1.0.dev\n " ,
Original file line number Diff line number Diff line change 97
97
" \n " ,
98
98
" try:\n " ,
99
99
" import cirq\n " ,
100
- " import cirq_google\n " ,
101
100
" \n " ,
102
- " # trigger ImportError when cirq is not cirq~=1.0.dev\n " ,
103
- " from cirq_google.engine import load_device_noise_properties as _\n " ,
101
+ " # raise ImportError when cirq is not new enough\n " ,
102
+ " if cirq.__version__ == \" 1.5.0\" :\n " ,
103
+ " raise ImportError(\" This notebook requires development version of Cirq\" )\n " ,
104
+ " \n " ,
105
+ " import cirq_google\n " ,
104
106
" except ImportError:\n " ,
105
107
" print(\" installing cirq...\" )\n " ,
106
108
" !pip install --upgrade --quiet cirq-google~=1.0.dev\n " ,
Original file line number Diff line number Diff line change 104
104
" \n " ,
105
105
" try:\n " ,
106
106
" import cirq\n " ,
107
- " import cirq_google\n " ,
108
107
" \n " ,
109
- " # trigger ImportError when cirq is not cirq~=1.0.dev\n " ,
110
- " from cirq_google.engine import load_device_noise_properties as _\n " ,
108
+ " # raise ImportError when cirq is not new enough\n " ,
109
+ " if cirq.__version__ == \" 1.5.0\" :\n " ,
110
+ " raise ImportError(\" This notebook requires development version of Cirq\" )\n " ,
111
+ " \n " ,
112
+ " import cirq_google\n " ,
111
113
" except ImportError:\n " ,
112
114
" print(\" installing cirq...\" )\n " ,
113
115
" !pip install --upgrade --quiet cirq-google~=1.0.dev\n " ,
You can’t perform that action at this time.
0 commit comments