Skip to content

Commit ba8a71a

Browse files
committed
fix deprecated warnings
1 parent a2c3700 commit ba8a71a

File tree

4 files changed

+12
-14
lines changed

4 files changed

+12
-14
lines changed

chemistry/h2_iqpe.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
" two_qubit_reduction = True\n",
5959
" num_orbitals = qubit_op.num_qubits + (2 if two_qubit_reduction else 0)\n",
6060
"\n",
61-
" num_time_slices = 3000\n",
61+
" num_time_slices = 1\n",
6262
" num_iterations = 12\n",
6363
" state_in = HartreeFock(qubit_op.num_qubits, num_orbitals,\n",
6464
" num_particles, qubit_mapping, two_qubit_reduction)\n",

chemistry/h2_qpe.ipynb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
"name": "stdout",
6868
"output_type": "stream",
6969
"text": [
70-
"The exact ground state energy is: -1.8572750302023817\n"
70+
"The exact ground state energy is: -1.8572750302023802\n"
7171
]
7272
}
7373
],
@@ -94,7 +94,7 @@
9494
"name": "stdout",
9595
"output_type": "stream",
9696
"text": [
97-
"The ground state energy as computed by QPE is: -1.8571368753258866\n"
97+
"The ground state energy as computed by QPE is: -1.8571368753258861\n"
9898
]
9999
}
100100
],
@@ -103,7 +103,7 @@
103103
"two_qubit_reduction = True\n",
104104
"num_orbitals = qubit_op.num_qubits + (2 if two_qubit_reduction else 0)\n",
105105
"\n",
106-
"num_time_slices = 50\n",
106+
"num_time_slices = 1\n",
107107
"n_ancillae = 9\n",
108108
"\n",
109109
"state_in = HartreeFock(qubit_op.num_qubits, num_orbitals,\n",
@@ -114,7 +114,7 @@
114114
" expansion_mode='suzuki',\n",
115115
" expansion_order=2, shallow_circuit_concat=True)\n",
116116
"backend = BasicAer.get_backend('qasm_simulator')\n",
117-
"quantum_instance = QuantumInstance(backend, shots=100, pass_manager=PassManager())\n",
117+
"quantum_instance = QuantumInstance(backend, shots=100)\n",
118118
"result_qpe = qpe.run(quantum_instance)\n",
119119
"print('The ground state energy as computed by QPE is: {}'.format(result_qpe['energy']))"
120120
]
@@ -147,7 +147,7 @@
147147
" 'algorithm': {\n",
148148
" 'name': 'QPE',\n",
149149
" 'num_ancillae': 9,\n",
150-
" 'num_time_slices': 50,\n",
150+
" 'num_time_slices': 1,\n",
151151
" 'expansion_mode': 'suzuki',\n",
152152
" 'expansion_order': 2,\n",
153153
" },\n",
@@ -181,9 +181,9 @@
181181
"name": "stdout",
182182
"output_type": "stream",
183183
"text": [
184-
"The groundtruth total ground state energy is -1.857275030202381.\n",
185-
"The total ground state energy as computed by QPE is -1.857136875325887.\n",
186-
"In comparison, the Hartree-Fock ground state energy is -1.8369679912029842.\n"
184+
"The groundtruth total ground state energy is -1.8572750302023793.\n",
185+
"The total ground state energy as computed by QPE is -1.8571368753258861.\n",
186+
"In comparison, the Hartree-Fock ground state energy is -1.8369679912029846.\n"
187187
]
188188
}
189189
],
@@ -226,7 +226,7 @@
226226
"name": "python",
227227
"nbconvert_exporter": "python",
228228
"pygments_lexer": "ipython3",
229-
"version": "3.6.1"
229+
"version": "3.6.8"
230230
}
231231
},
232232
"nbformat": 4,

chemistry/input_files/iqpe_h2.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,11 @@
2828
two_qubit_reduction=True
2929
freeze_core=False
3030
orbital_reduction=[]
31-
max_workers=4
3231
&end
3332

3433
&algorithm
3534
name=IQPE
36-
num_time_slices=200
35+
num_time_slices=1
3736
expansion_mode=suzuki
3837
expansion_order=2
3938
num_iterations=9

chemistry/input_files/qpe_h2.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,11 @@
2828
two_qubit_reduction=True
2929
freeze_core=False
3030
orbital_reduction=[]
31-
max_workers=4
3231
&end
3332

3433
&algorithm
3534
name=QPE
36-
num_time_slices=50
35+
num_time_slices=1
3736
expansion_mode=suzuki
3837
expansion_order=2
3938
num_ancillae=9

0 commit comments

Comments
 (0)