File tree Expand file tree Collapse file tree 3 files changed +79
-79
lines changed
Expand file tree Collapse file tree 3 files changed +79
-79
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ total number of qubits and all gates in order of the number of times they appear
7070The QASM name is used as identifier of gates.
7171For example
7272
73- .. testcode ::
73+ .. code-block :: python
7474
7575 from qibo import Circuit, gates
7676
@@ -81,7 +81,9 @@ For example
8181 circuit.add(gates.CNOT(1 , 2 ))
8282 circuit.add(gates.H(2 ))
8383 circuit.add(gates.TOFFOLI(0 , 1 , 2 ))
84- print(circuit.summary())
84+
85+ circuit.summary()
86+
8587 # Prints
8688 '''
8789 Circuit depth = 5
@@ -92,17 +94,6 @@ For example
9294 cx: 2
9395 ccx: 1
9496 '''
95- .. testoutput ::
96- :hide:
97-
98- Circuit depth = 5
99- Total number of gates = 6
100- Number of qubits = 3
101- Most common gates:
102- h: 3
103- cx: 2
104- ccx: 1
105-
10697
10798 The circuit property ``circuit.gate_types `` (or ``circuit.gate_names ``) will return a ``collections.Counter ``
10899that contains the gate types (or names) and the corresponding numbers of appearance. The
You can’t perform that action at this time.
0 commit comments