Skip to content

Commit 40287de

Browse files
committed
updated docu
1 parent f224889 commit 40287de

11 files changed

Lines changed: 520 additions & 10612 deletions
5.48 KB
Binary file not shown.
26.9 KB
Binary file not shown.
36.1 KB
Binary file not shown.
29.3 KB
Binary file not shown.

docs/_build/_static/jquery-3.4.1.js

Lines changed: 0 additions & 10598 deletions
This file was deleted.

docs/_build/gates.html

Lines changed: 128 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -185,88 +185,209 @@ <h1>Gates Class<a class="headerlink" href="#gates-class" title="Permalink to thi
185185
<dt id="eqsn.gates.EQSN.H_gate">
186186
<code class="sig-name descname">H_gate</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">q_id</span></em><span class="sig-paren">)</span><a class="headerlink" href="#eqsn.gates.EQSN.H_gate" title="Permalink to this definition"></a></dt>
187187
<dd><p>Applies the Hadamard gate to the Qubit with q_id.</p>
188+
<dl class="field-list simple">
189+
<dt class="field-odd">Parameters</dt>
190+
<dd class="field-odd"><p><strong>q_id</strong> (<em>String</em>) – ID of the Qubit to apply the gate to.</p>
191+
</dd>
192+
</dl>
188193
</dd></dl>
189194

190195
<dl class="py method">
191196
<dt id="eqsn.gates.EQSN.K_gate">
192197
<code class="sig-name descname">K_gate</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">q_id</span></em><span class="sig-paren">)</span><a class="headerlink" href="#eqsn.gates.EQSN.K_gate" title="Permalink to this definition"></a></dt>
193198
<dd><p>Applies the K gate to the Qubit with q_id.</p>
199+
<dl class="field-list simple">
200+
<dt class="field-odd">Parameters</dt>
201+
<dd class="field-odd"><p><strong>q_id</strong> (<em>String</em>) – ID of the Qubit to apply the gate to.</p>
202+
</dd>
203+
</dl>
194204
</dd></dl>
195205

196206
<dl class="py method">
197207
<dt id="eqsn.gates.EQSN.RX_gate">
198208
<code class="sig-name descname">RX_gate</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">q_id</span></em>, <em class="sig-param"><span class="n">rad</span></em><span class="sig-paren">)</span><a class="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+
<dl class="field-list simple">
211+
<dt class="field-odd">Parameters</dt>
212+
<dd class="field-odd"><ul class="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>
200218
</dd></dl>
201219

202220
<dl class="py method">
203221
<dt id="eqsn.gates.EQSN.RY_gate">
204222
<code class="sig-name descname">RY_gate</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">q_id</span></em>, <em class="sig-param"><span class="n">rad</span></em><span class="sig-paren">)</span><a class="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+
<dl class="field-list simple">
225+
<dt class="field-odd">Parameters</dt>
226+
<dd class="field-odd"><ul class="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>
206232
</dd></dl>
207233

208234
<dl class="py method">
209235
<dt id="eqsn.gates.EQSN.RZ_gate">
210236
<code class="sig-name descname">RZ_gate</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">q_id</span></em>, <em class="sig-param"><span class="n">rad</span></em><span class="sig-paren">)</span><a class="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+
<dl class="field-list simple">
239+
<dt class="field-odd">Parameters</dt>
240+
<dd class="field-odd"><ul class="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>
212246
</dd></dl>
213247

214248
<dl class="py method">
215249
<dt id="eqsn.gates.EQSN.S_gate">
216250
<code class="sig-name descname">S_gate</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">q_id</span></em><span class="sig-paren">)</span><a class="headerlink" href="#eqsn.gates.EQSN.S_gate" title="Permalink to this definition"></a></dt>
217251
<dd><p>Applies the S gate to the Qubit with q_id.</p>
252+
<dl class="field-list simple">
253+
<dt class="field-odd">Parameters</dt>
254+
<dd class="field-odd"><p><strong>q_id</strong> (<em>String</em>) – ID of the Qubit to apply the gate to.</p>
255+
</dd>
256+
</dl>
218257
</dd></dl>
219258

220259
<dl class="py method">
221260
<dt id="eqsn.gates.EQSN.T_gate">
222261
<code class="sig-name descname">T_gate</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">q_id</span></em><span class="sig-paren">)</span><a class="headerlink" href="#eqsn.gates.EQSN.T_gate" title="Permalink to this definition"></a></dt>
223262
<dd><p>Applies the T gate to the Qubit with q_id.</p>
263+
<dl class="field-list simple">
264+
<dt class="field-odd">Parameters</dt>
265+
<dd class="field-odd"><p><strong>q_id</strong> (<em>String</em>) – ID of the Qubit to apply the gate to.</p>
266+
</dd>
267+
</dl>
224268
</dd></dl>
225269

226270
<dl class="py method">
227271
<dt id="eqsn.gates.EQSN.X_gate">
228272
<code class="sig-name descname">X_gate</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">q_id</span></em><span class="sig-paren">)</span><a class="headerlink" href="#eqsn.gates.EQSN.X_gate" title="Permalink to this definition"></a></dt>
229273
<dd><p>Applies the Pauli X gate to the Qubit with q_id.</p>
274+
<dl class="field-list simple">
275+
<dt class="field-odd">Parameters</dt>
276+
<dd class="field-odd"><p><strong>q_id</strong> (<em>String</em>) – ID of the Qubit to apply the gate to.</p>
277+
</dd>
278+
</dl>
230279
</dd></dl>
231280

232281
<dl class="py method">
233282
<dt id="eqsn.gates.EQSN.Y_gate">
234283
<code class="sig-name descname">Y_gate</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">q_id</span></em><span class="sig-paren">)</span><a class="headerlink" href="#eqsn.gates.EQSN.Y_gate" title="Permalink to this definition"></a></dt>
235284
<dd><p>Applies the Pauli Y gate to the Qubit with q_id.</p>
285+
<dl class="field-list simple">
286+
<dt class="field-odd">Parameters</dt>
287+
<dd class="field-odd"><p><strong>q_id</strong> (<em>String</em>) – ID of the Qubit to apply the gate to.</p>
288+
</dd>
289+
</dl>
236290
</dd></dl>
237291

238292
<dl class="py method">
239293
<dt id="eqsn.gates.EQSN.Z_gate">
240294
<code class="sig-name descname">Z_gate</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">q_id</span></em><span class="sig-paren">)</span><a class="headerlink" href="#eqsn.gates.EQSN.Z_gate" title="Permalink to this definition"></a></dt>
241295
<dd><p>Applies the Pauli Z gate to the Qubit with q_id.</p>
296+
<dl class="field-list simple">
297+
<dt class="field-odd">Parameters</dt>
298+
<dd class="field-odd"><p><strong>q_id</strong> (<em>String</em>) – ID of the Qubit to apply the gate to.</p>
299+
</dd>
300+
</dl>
242301
</dd></dl>
243302

244303
<dl class="py method">
245304
<dt id="eqsn.gates.EQSN.cnot_gate">
246-
<code class="sig-name descname">cnot_gate</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">q_id1</span></em>, <em class="sig-param"><span class="n">q_id2</span></em><span class="sig-paren">)</span><a class="headerlink" href="#eqsn.gates.EQSN.cnot_gate" title="Permalink to this definition"></a></dt>
305+
<code class="sig-name descname">cnot_gate</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">applied_to_id</span></em>, <em class="sig-param"><span class="n">controlled_by_id</span></em><span class="sig-paren">)</span><a class="headerlink" href="#eqsn.gates.EQSN.cnot_gate" title="Permalink to this definition"></a></dt>
247306
<dd><p>Applies a controlled X gate, where the gate is applied to
248307
q_id1 and controlled by q_id2.</p>
249308
<dl class="field-list simple">
250309
<dt class="field-odd">Parameters</dt>
251310
<dd class="field-odd"><ul class="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>
254313
</ul>
255314
</dd>
256315
</dl>
257316
</dd></dl>
258317

259318
<dl class="py method">
260319
<dt id="eqsn.gates.EQSN.cphase_gate">
261-
<code class="sig-name descname">cphase_gate</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">q_id1</span></em>, <em class="sig-param"><span class="n">q_id2</span></em><span class="sig-paren">)</span><a class="headerlink" href="#eqsn.gates.EQSN.cphase_gate" title="Permalink to this definition"></a></dt>
320+
<code class="sig-name descname">cphase_gate</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">applied_to_id</span></em>, <em class="sig-param"><span class="n">controlled_by_id</span></em><span class="sig-paren">)</span><a class="headerlink" href="#eqsn.gates.EQSN.cphase_gate" title="Permalink to this definition"></a></dt>
262321
<dd><p>Applies a controlled Z gate, where the gate is applied to
263322
q_id1 and controlled by q_id2.</p>
323+
<dl class="field-list simple">
324+
<dt class="field-odd">Parameters</dt>
325+
<dd class="field-odd"><ul class="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+
<dl class="py method">
334+
<dt id="eqsn.gates.EQSN.custom_controlled_gate">
335+
<code class="sig-name descname">custom_controlled_gate</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">applied_to_id</span></em>, <em class="sig-param"><span class="n">controlled_by_id</span></em>, <em class="sig-param"><span class="n">gate</span></em><span class="sig-paren">)</span><a class="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+
<dl class="field-list simple">
338+
<dt class="field-odd">Parameters</dt>
339+
<dd class="field-odd"><ul class="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>
264346
</dd></dl>
265347

266348
<dl class="py method">
267349
<dt id="eqsn.gates.EQSN.custom_gate">
268350
<code class="sig-name descname">custom_gate</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">q_id</span></em>, <em class="sig-param"><span class="n">gate</span></em><span class="sig-paren">)</span><a class="headerlink" href="#eqsn.gates.EQSN.custom_gate" title="Permalink to this definition"></a></dt>
269351
<dd><p>Applies a custom gate to the qubit with q_id.</p>
352+
<dl class="field-list simple">
353+
<dt class="field-odd">Parameters</dt>
354+
<dd class="field-odd"><ul class="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+
<dl class="py method">
363+
<dt id="eqsn.gates.EQSN.custom_two_qubit_gate">
364+
<code class="sig-name descname">custom_two_qubit_gate</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">q_id1</span></em>, <em class="sig-param"><span class="n">q_id2</span></em>, <em class="sig-param"><span class="n">gate</span></em><span class="sig-paren">)</span><a class="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+
<dl class="field-list simple">
367+
<dt class="field-odd">Parameters</dt>
368+
<dd class="field-odd"><ul class="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>
371+
<li><p><strong>gate</strong> (<em>np.ndarray</em>) – 4x4 unitary matrix gate.</p></li>
372+
</ul>
373+
</dd>
374+
</dl>
375+
</dd></dl>
376+
377+
<dl class="py method">
378+
<dt id="eqsn.gates.EQSN.give_statevector_for">
379+
<code class="sig-name descname">give_statevector_for</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">q_id</span></em><span class="sig-paren">)</span><a class="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+
<dl class="field-list simple">
383+
<dt class="field-odd">Parameters</dt>
384+
<dd class="field-odd"><p><strong>q_id</strong> (<em>String</em>) – Qubit id of the Qubit to get the statevector from.</p>
385+
</dd>
386+
<dt class="field-even">Returns</dt>
387+
<dd class="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>
389+
</dd>
390+
</dl>
270391
</dd></dl>
271392

272393
<dl class="py method">

0 commit comments

Comments
 (0)