You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<codeclass="sig-name descname">H_gate</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">q_id</span></em><spanclass="sig-paren">)</span><aclass="headerlink" href="#eqsn.gates.EQSN.H_gate" title="Permalink to this definition">¶</a></dt>
187
187
<dd><p>Applies the Hadamard gate to the Qubit with q_id.</p>
188
+
<dlclass="field-list simple">
189
+
<dtclass="field-odd">Parameters</dt>
190
+
<ddclass="field-odd"><p><strong>q_id</strong> (<em>String</em>) – ID of the Qubit to apply the gate to.</p>
191
+
</dd>
192
+
</dl>
188
193
</dd></dl>
189
194
190
195
<dlclass="py method">
191
196
<dtid="eqsn.gates.EQSN.K_gate">
192
197
<codeclass="sig-name descname">K_gate</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">q_id</span></em><spanclass="sig-paren">)</span><aclass="headerlink" href="#eqsn.gates.EQSN.K_gate" title="Permalink to this definition">¶</a></dt>
193
198
<dd><p>Applies the K gate to the Qubit with q_id.</p>
199
+
<dlclass="field-list simple">
200
+
<dtclass="field-odd">Parameters</dt>
201
+
<ddclass="field-odd"><p><strong>q_id</strong> (<em>String</em>) – ID of the Qubit to apply the gate to.</p>
202
+
</dd>
203
+
</dl>
194
204
</dd></dl>
195
205
196
206
<dlclass="py method">
197
207
<dtid="eqsn.gates.EQSN.RX_gate">
198
208
<codeclass="sig-name descname">RX_gate</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">q_id</span></em>, <emclass="sig-param"><spanclass="n">rad</span></em><spanclass="sig-paren">)</span><aclass="headerlink" href="#eqsn.gates.EQSN.RX_gate" title="Permalink to this definition">¶</a></dt>
199
-
<dd><p>Applies the T gate to the Qubit with q_id.</p>
209
+
<dd><p>Applies a rotational X gate to the Qubit with q_id.</p>
210
+
<dlclass="field-list simple">
211
+
<dtclass="field-odd">Parameters</dt>
212
+
<ddclass="field-odd"><ulclass="simple">
213
+
<li><p><strong>q_id</strong> (<em>String</em>) – ID of the Qubit to apply the gate to.</p></li>
214
+
<li><p><strong>rad</strong> (<em>int</em>) – Rotational degrees in rad.</p></li>
215
+
</ul>
216
+
</dd>
217
+
</dl>
200
218
</dd></dl>
201
219
202
220
<dlclass="py method">
203
221
<dtid="eqsn.gates.EQSN.RY_gate">
204
222
<codeclass="sig-name descname">RY_gate</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">q_id</span></em>, <emclass="sig-param"><spanclass="n">rad</span></em><spanclass="sig-paren">)</span><aclass="headerlink" href="#eqsn.gates.EQSN.RY_gate" title="Permalink to this definition">¶</a></dt>
205
-
<dd><p>Applies the T gate to the Qubit with q_id.</p>
223
+
<dd><p>Applies a rotational Y gate to the Qubit with q_id.</p>
224
+
<dlclass="field-list simple">
225
+
<dtclass="field-odd">Parameters</dt>
226
+
<ddclass="field-odd"><ulclass="simple">
227
+
<li><p><strong>q_id</strong> (<em>String</em>) – ID of the Qubit to apply the gate to.</p></li>
228
+
<li><p><strong>rad</strong> (<em>int</em>) – Rotational degrees in rad.</p></li>
229
+
</ul>
230
+
</dd>
231
+
</dl>
206
232
</dd></dl>
207
233
208
234
<dlclass="py method">
209
235
<dtid="eqsn.gates.EQSN.RZ_gate">
210
236
<codeclass="sig-name descname">RZ_gate</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">q_id</span></em>, <emclass="sig-param"><spanclass="n">rad</span></em><spanclass="sig-paren">)</span><aclass="headerlink" href="#eqsn.gates.EQSN.RZ_gate" title="Permalink to this definition">¶</a></dt>
211
-
<dd><p>Applies the T gate to the Qubit with q_id.</p>
237
+
<dd><p>Applies a rotational Z gate to the Qubit with q_id.</p>
238
+
<dlclass="field-list simple">
239
+
<dtclass="field-odd">Parameters</dt>
240
+
<ddclass="field-odd"><ulclass="simple">
241
+
<li><p><strong>q_id</strong> (<em>String</em>) – ID of the Qubit to apply the gate to.</p></li>
242
+
<li><p><strong>rad</strong> (<em>int</em>) – Rotational degrees in rad.</p></li>
243
+
</ul>
244
+
</dd>
245
+
</dl>
212
246
</dd></dl>
213
247
214
248
<dlclass="py method">
215
249
<dtid="eqsn.gates.EQSN.S_gate">
216
250
<codeclass="sig-name descname">S_gate</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">q_id</span></em><spanclass="sig-paren">)</span><aclass="headerlink" href="#eqsn.gates.EQSN.S_gate" title="Permalink to this definition">¶</a></dt>
217
251
<dd><p>Applies the S gate to the Qubit with q_id.</p>
252
+
<dlclass="field-list simple">
253
+
<dtclass="field-odd">Parameters</dt>
254
+
<ddclass="field-odd"><p><strong>q_id</strong> (<em>String</em>) – ID of the Qubit to apply the gate to.</p>
255
+
</dd>
256
+
</dl>
218
257
</dd></dl>
219
258
220
259
<dlclass="py method">
221
260
<dtid="eqsn.gates.EQSN.T_gate">
222
261
<codeclass="sig-name descname">T_gate</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">q_id</span></em><spanclass="sig-paren">)</span><aclass="headerlink" href="#eqsn.gates.EQSN.T_gate" title="Permalink to this definition">¶</a></dt>
223
262
<dd><p>Applies the T gate to the Qubit with q_id.</p>
263
+
<dlclass="field-list simple">
264
+
<dtclass="field-odd">Parameters</dt>
265
+
<ddclass="field-odd"><p><strong>q_id</strong> (<em>String</em>) – ID of the Qubit to apply the gate to.</p>
266
+
</dd>
267
+
</dl>
224
268
</dd></dl>
225
269
226
270
<dlclass="py method">
227
271
<dtid="eqsn.gates.EQSN.X_gate">
228
272
<codeclass="sig-name descname">X_gate</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">q_id</span></em><spanclass="sig-paren">)</span><aclass="headerlink" href="#eqsn.gates.EQSN.X_gate" title="Permalink to this definition">¶</a></dt>
229
273
<dd><p>Applies the Pauli X gate to the Qubit with q_id.</p>
274
+
<dlclass="field-list simple">
275
+
<dtclass="field-odd">Parameters</dt>
276
+
<ddclass="field-odd"><p><strong>q_id</strong> (<em>String</em>) – ID of the Qubit to apply the gate to.</p>
277
+
</dd>
278
+
</dl>
230
279
</dd></dl>
231
280
232
281
<dlclass="py method">
233
282
<dtid="eqsn.gates.EQSN.Y_gate">
234
283
<codeclass="sig-name descname">Y_gate</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">q_id</span></em><spanclass="sig-paren">)</span><aclass="headerlink" href="#eqsn.gates.EQSN.Y_gate" title="Permalink to this definition">¶</a></dt>
235
284
<dd><p>Applies the Pauli Y gate to the Qubit with q_id.</p>
285
+
<dlclass="field-list simple">
286
+
<dtclass="field-odd">Parameters</dt>
287
+
<ddclass="field-odd"><p><strong>q_id</strong> (<em>String</em>) – ID of the Qubit to apply the gate to.</p>
288
+
</dd>
289
+
</dl>
236
290
</dd></dl>
237
291
238
292
<dlclass="py method">
239
293
<dtid="eqsn.gates.EQSN.Z_gate">
240
294
<codeclass="sig-name descname">Z_gate</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">q_id</span></em><spanclass="sig-paren">)</span><aclass="headerlink" href="#eqsn.gates.EQSN.Z_gate" title="Permalink to this definition">¶</a></dt>
241
295
<dd><p>Applies the Pauli Z gate to the Qubit with q_id.</p>
296
+
<dlclass="field-list simple">
297
+
<dtclass="field-odd">Parameters</dt>
298
+
<ddclass="field-odd"><p><strong>q_id</strong> (<em>String</em>) – ID of the Qubit to apply the gate to.</p>
299
+
</dd>
300
+
</dl>
242
301
</dd></dl>
243
302
244
303
<dlclass="py method">
245
304
<dtid="eqsn.gates.EQSN.cnot_gate">
246
-
<codeclass="sig-name descname">cnot_gate</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">q_id1</span></em>, <emclass="sig-param"><spanclass="n">q_id2</span></em><spanclass="sig-paren">)</span><aclass="headerlink" href="#eqsn.gates.EQSN.cnot_gate" title="Permalink to this definition">¶</a></dt>
305
+
<codeclass="sig-name descname">cnot_gate</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">applied_to_id</span></em>, <emclass="sig-param"><spanclass="n">controlled_by_id</span></em><spanclass="sig-paren">)</span><aclass="headerlink" href="#eqsn.gates.EQSN.cnot_gate" title="Permalink to this definition">¶</a></dt>
247
306
<dd><p>Applies a controlled X gate, where the gate is applied to
248
307
q_id1 and controlled by q_id2.</p>
249
308
<dlclass="field-list simple">
250
309
<dtclass="field-odd">Parameters</dt>
251
310
<ddclass="field-odd"><ulclass="simple">
252
-
<li><p><strong>q_id1</strong> (<em>String</em>) – Id of the Qubit on which the X gate is applied.</p></li>
253
-
<li><p><strong>q_id2</strong> (<em>String</em>) – Id of the Qubit which controls the gate.</p></li>
311
+
<li><p><strong>applied_to_id</strong> (<em>String</em>) – Id of the Qubit on which the X gate is applied.</p></li>
312
+
<li><p><strong>controlled_by_id</strong> (<em>String</em>) – Id of the Qubit which controls the gate.</p></li>
254
313
</ul>
255
314
</dd>
256
315
</dl>
257
316
</dd></dl>
258
317
259
318
<dlclass="py method">
260
319
<dtid="eqsn.gates.EQSN.cphase_gate">
261
-
<codeclass="sig-name descname">cphase_gate</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">q_id1</span></em>, <emclass="sig-param"><spanclass="n">q_id2</span></em><spanclass="sig-paren">)</span><aclass="headerlink" href="#eqsn.gates.EQSN.cphase_gate" title="Permalink to this definition">¶</a></dt>
320
+
<codeclass="sig-name descname">cphase_gate</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">applied_to_id</span></em>, <emclass="sig-param"><spanclass="n">controlled_by_id</span></em><spanclass="sig-paren">)</span><aclass="headerlink" href="#eqsn.gates.EQSN.cphase_gate" title="Permalink to this definition">¶</a></dt>
262
321
<dd><p>Applies a controlled Z gate, where the gate is applied to
263
322
q_id1 and controlled by q_id2.</p>
323
+
<dlclass="field-list simple">
324
+
<dtclass="field-odd">Parameters</dt>
325
+
<ddclass="field-odd"><ulclass="simple">
326
+
<li><p><strong>applied_to_id</strong> (<em>String</em>) – Id of the Qubit on which the X gate is applied.</p></li>
327
+
<li><p><strong>controlled_by_id</strong> (<em>String</em>) – Id of the Qubit which controls the gate.</p></li>
328
+
</ul>
329
+
</dd>
330
+
</dl>
331
+
</dd></dl>
332
+
333
+
<dlclass="py method">
334
+
<dtid="eqsn.gates.EQSN.custom_controlled_gate">
335
+
<codeclass="sig-name descname">custom_controlled_gate</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">applied_to_id</span></em>, <emclass="sig-param"><spanclass="n">controlled_by_id</span></em>, <emclass="sig-param"><spanclass="n">gate</span></em><spanclass="sig-paren">)</span><aclass="headerlink" href="#eqsn.gates.EQSN.custom_controlled_gate" title="Permalink to this definition">¶</a></dt>
336
+
<dd><p>Applies a custom controlled gate to a Qubit.</p>
337
+
<dlclass="field-list simple">
338
+
<dtclass="field-odd">Parameters</dt>
339
+
<ddclass="field-odd"><ulclass="simple">
340
+
<li><p><strong>applied_to_id</strong> (<em>String</em>) – ID of the qubit to apply the gate to.</p></li>
341
+
<li><p><strong>controlled_by_id</strong> (<em>String</em>) – ID of the qubit which controls the gate.</p></li>
342
+
<li><p><strong>gate</strong> (<em>np.ndarray</em>) – Unitary 2x2 matrix which should be applied.</p></li>
343
+
</ul>
344
+
</dd>
345
+
</dl>
264
346
</dd></dl>
265
347
266
348
<dlclass="py method">
267
349
<dtid="eqsn.gates.EQSN.custom_gate">
268
350
<codeclass="sig-name descname">custom_gate</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">q_id</span></em>, <emclass="sig-param"><spanclass="n">gate</span></em><spanclass="sig-paren">)</span><aclass="headerlink" href="#eqsn.gates.EQSN.custom_gate" title="Permalink to this definition">¶</a></dt>
269
351
<dd><p>Applies a custom gate to the qubit with q_id.</p>
352
+
<dlclass="field-list simple">
353
+
<dtclass="field-odd">Parameters</dt>
354
+
<ddclass="field-odd"><ulclass="simple">
355
+
<li><p><strong>q_id</strong> (<em>String</em>) – Id of the Qubit to apply the gate on.</p></li>
356
+
<li><p><strong>gate</strong> (<em>np.ndarray</em>) – unitary 2x2 matrix, of the gate.</p></li>
357
+
</ul>
358
+
</dd>
359
+
</dl>
360
+
</dd></dl>
361
+
362
+
<dlclass="py method">
363
+
<dtid="eqsn.gates.EQSN.custom_two_qubit_gate">
364
+
<codeclass="sig-name descname">custom_two_qubit_gate</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">q_id1</span></em>, <emclass="sig-param"><spanclass="n">q_id2</span></em>, <emclass="sig-param"><spanclass="n">gate</span></em><spanclass="sig-paren">)</span><aclass="headerlink" href="#eqsn.gates.EQSN.custom_two_qubit_gate" title="Permalink to this definition">¶</a></dt>
365
+
<dd><p>Applies a two Qubit gate to two Qubits.</p>
366
+
<dlclass="field-list simple">
367
+
<dtclass="field-odd">Parameters</dt>
368
+
<ddclass="field-odd"><ulclass="simple">
369
+
<li><p><strong>q_id1</strong> (<em>String</em>) – ID of the first Qubit of the gate.</p></li>
370
+
<li><p><strong>q_id2</strong> (<em>String</em>) – ID of the second Qubit of the gate.</p></li>
<codeclass="sig-name descname">give_statevector_for</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">q_id</span></em><spanclass="sig-paren">)</span><aclass="headerlink" href="#eqsn.gates.EQSN.give_statevector_for" title="Permalink to this definition">¶</a></dt>
380
+
<dd><p>Gives the statevector and Qubits of a Qubit and all other Qubits with
381
+
which the qubit is entangled.</p>
382
+
<dlclass="field-list simple">
383
+
<dtclass="field-odd">Parameters</dt>
384
+
<ddclass="field-odd"><p><strong>q_id</strong> (<em>String</em>) – Qubit id of the Qubit to get the statevector from.</p>
385
+
</dd>
386
+
<dtclass="field-even">Returns</dt>
387
+
<ddclass="field-even"><p>Tuple. Tuple of a lists and vector, where the first list are the qubits of
388
+
the statevector and the second list is the statevector.</p>
0 commit comments