Skip to content

Commit

Permalink
Add circuit diagrams to source code (Qiskit#7350)
Browse files Browse the repository at this point in the history
* Add circuit diagrams to test_hoare_opt.py

* Add circuit diagram to equivalence_library.py

* Add a TODO in equivalence_library.py

* Add circuit diagram to echo_rzx_weyl_decomposition

* Add circuit diagram to merge_adjacent_barriers.py

* Add circuit diagram to test/python/circuit/library

* Add circuit diagram to test/python/circuit

* Add circuit diagram to test/python/compiler

* Add circuit diagram to test/python/dagcircuit

* Add circuit diagram to test/python

* Format source code with black

* Chang block comment from string to line annotation

* Add circuit diagram to standard_gates

* Add parsed-literal before circuit diagram

* fix a lint problem

* Update circuit diagram in test

* Fix a lint problem

* Add blank lines before and after parsed-literal

Co-authored-by: Luciano Bello <bel@zurich.ibm.com>
  • Loading branch information
yjt98765 and 1ucian0 authored Feb 4, 2022
1 parent 8b672eb commit 8d97e98
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qiskit/algorithms/amplitude_estimators/estimation_problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def _rescale_amplitudes(circuit: QuantumCircuit, scaling_factor: float) -> Quant
For example, for a scaling factor of 0.25 this turns this circuit
.. code-block::
.. parsed-literal::
┌───┐
state_0: ─────┤ H ├─────────■────
Expand All @@ -231,7 +231,7 @@ def _rescale_amplitudes(circuit: QuantumCircuit, scaling_factor: float) -> Quant
into
.. code-block::
.. parsed-literal::
┌───┐
state_0: ─────┤ H ├─────────■────
Expand Down
7 changes: 7 additions & 0 deletions test/python/algorithms/test_skip_qobj_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ def setUp(self):
super().setUp()
self.random_seed = 10598

# ┌───┐ ░ ┌─┐ ░
# q0_0: ┤ H ├──■───░─┤M├─░────
# └───┘┌─┴─┐ ░ └╥┘ ░ ┌─┐
# q0_1: ─────┤ X ├─░──╫──░─┤M├
# └───┘ ░ ║ ░ └╥┘
# c0: 2/══════════════╩═════╩═
# 0 1
qr = QuantumRegister(2)
cr = ClassicalRegister(2)
qc = QuantumCircuit(qr, cr)
Expand Down

0 comments on commit 8d97e98

Please sign in to comment.