|
29 | 29 | }, |
30 | 30 | { |
31 | 31 | "cell_type": "code", |
32 | | - "execution_count": 3, |
| 32 | + "execution_count": 1, |
33 | 33 | "id": "bb7d11b2-68ee-4d44-82e0-d33c35046604", |
34 | 34 | "metadata": {}, |
35 | 35 | "outputs": [ |
36 | 36 | { |
37 | 37 | "name": "stdout", |
38 | 38 | "output_type": "stream", |
39 | 39 | "text": [ |
40 | | - "Logarithmic Negativity (exact) = 4.4847971053408774e-15\n" |
| 40 | + "Logarithmic Negativity (exact) = 4.164454454959387e-15\n" |
41 | 41 | ] |
42 | 42 | } |
43 | 43 | ], |
|
67 | 67 | }, |
68 | 68 | { |
69 | 69 | "cell_type": "code", |
70 | | - "execution_count": 4, |
| 70 | + "execution_count": 2, |
71 | 71 | "id": "eec8ffe0-b606-490c-9bc9-f4a51401ec06", |
72 | 72 | "metadata": {}, |
73 | 73 | "outputs": [ |
|
103 | 103 | }, |
104 | 104 | { |
105 | 105 | "cell_type": "code", |
106 | | - "execution_count": 8, |
| 106 | + "execution_count": 3, |
107 | 107 | "id": "b9558a22-4bd0-4c87-b776-193cd0a18a14", |
108 | 108 | "metadata": {}, |
109 | 109 | "outputs": [], |
|
116 | 116 | }, |
117 | 117 | { |
118 | 118 | "cell_type": "code", |
119 | | - "execution_count": 10, |
| 119 | + "execution_count": 4, |
120 | 120 | "id": "4e2e900f-d996-4fb5-b259-32fba56e1974", |
121 | 121 | "metadata": {}, |
122 | 122 | "outputs": [], |
|
130 | 130 | }, |
131 | 131 | { |
132 | 132 | "cell_type": "code", |
133 | | - "execution_count": 19, |
| 133 | + "execution_count": 5, |
134 | 134 | "id": "e8059915-ea72-48ee-b51b-5f2a4e84b651", |
135 | 135 | "metadata": {}, |
136 | 136 | "outputs": [ |
|
140 | 140 | "text": [ |
141 | 141 | "=================================== Simulate 2-qubit =========================================\n", |
142 | 142 | "Logarithmic Negativity (exact) = 0.4607085373250065\n", |
143 | | - "Logarithmic Negativity (HRF) = 0.5037943745848781\n", |
| 143 | + "Logarithmic Negativity (HRF) = 0.5023735774657798\n", |
144 | 144 | "=================================== Simulate 4-qubit =========================================\n", |
145 | 145 | "Logarithmic Negativity (exact) = 0.844756958281152\n", |
146 | | - "Logarithmic Negativity (HRF) = 0.8540890214338566\n", |
| 146 | + "Logarithmic Negativity (HRF) = 0.8590883068910752\n", |
147 | 147 | "=================================== Simulate 6-qubit =========================================\n", |
148 | 148 | "Logarithmic Negativity (exact) = 1.6779210392164574\n", |
149 | | - "Logarithmic Negativity (HRF) = 1.6878049433906073\n", |
| 149 | + "Logarithmic Negativity (HRF) = 1.7173906754959771\n", |
150 | 150 | "=================================== Simulate 8-qubit =========================================\n", |
151 | 151 | "Logarithmic Negativity (exact) = 2.297051063765075\n", |
152 | | - "Logarithmic Negativity (HRF) = 2.370611767843103\n" |
| 152 | + "Logarithmic Negativity (HRF) = 2.3877043577478925\n" |
153 | 153 | ] |
154 | 154 | } |
155 | 155 | ], |
156 | 156 | "source": [ |
157 | 157 | "import math\n", |
158 | | - "from qiskit.circuit.library import RealAmplitudes\n", |
| 158 | + "from qiskit.circuit.library import real_amplitudes\n", |
159 | 159 | "from qiskit.quantum_info import Statevector, state_fidelity, DensityMatrix\n", |
160 | 160 | "import hadamard_random_forest as hrf\n", |
161 | 161 | "\n", |
|
168 | 168 | "\n", |
169 | 169 | "for num_qubits in range(2, 9, 2):\n", |
170 | 170 | " print(f\"=================================== Simulate {num_qubits}-qubit =========================================\")\n", |
171 | | - " ansatz = RealAmplitudes(num_qubits, entanglement='pairwise', reps=num_layers, insert_barriers=True, skip_final_rotation_layer=True)\n", |
| 171 | + " ansatz = real_amplitudes(num_qubits, entanglement='pairwise', reps=num_layers, insert_barriers=True, skip_final_rotation_layer=True)\n", |
172 | 172 | " params = loaded_param['parameter'][(num_qubits, num_layers)][0] \n", |
173 | 173 | " list_circuits = hrf.get_circuits(num_qubits, ansatz)\n", |
174 | 174 | "\n", |
|
212 | 212 | }, |
213 | 213 | { |
214 | 214 | "cell_type": "code", |
215 | | - "execution_count": 7, |
| 215 | + "execution_count": 1, |
216 | 216 | "id": "b56946c6-13a3-483c-b985-52f670ea28a4", |
217 | 217 | "metadata": {}, |
218 | 218 | "outputs": [ |
219 | 219 | { |
220 | 220 | "name": "stdout", |
221 | 221 | "output_type": "stream", |
222 | 222 | "text": [ |
223 | | - "Qiskit: 2.0.0\n", |
224 | | - "Qiskit Aer: 0.17.0\n", |
| 223 | + "Qiskit: 2.1.2\n", |
| 224 | + "Qiskit Aer: 0.17.1\n", |
| 225 | + "Qiskit IBM Runtime: 0.41.1\n", |
225 | 226 | "Mthree error mitigation: 3.0.0\n" |
226 | 227 | ] |
227 | 228 | } |
|
249 | 250 | ], |
250 | 251 | "metadata": { |
251 | 252 | "kernelspec": { |
252 | | - "display_name": "Python 3 (ipykernel)", |
| 253 | + "display_name": "qenv (3.9.13)", |
253 | 254 | "language": "python", |
254 | 255 | "name": "python3" |
255 | 256 | }, |
|
263 | 264 | "name": "python", |
264 | 265 | "nbconvert_exporter": "python", |
265 | 266 | "pygments_lexer": "ipython3", |
266 | | - "version": "3.10.14" |
| 267 | + "version": "3.11.13" |
267 | 268 | } |
268 | 269 | }, |
269 | 270 | "nbformat": 4, |
|
0 commit comments