Skip to content

Commit

Permalink
Merge pull request #1544 from qiboteam/fix_doc
Browse files Browse the repository at this point in the history
Fix documentation of `models.circuit.Circuit`
  • Loading branch information
renatomello authored Dec 16, 2024
2 parents 1e99772 + 9a173f4 commit 3713524
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/qibo/models/circuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,15 @@ class Circuit:
- ``nqubits`` and ``wire_names`` must be consistent with each other.
Example:
Example::
.. testcode::
from qibo import Circuit
from qibo import Circuit
c = Circuit(5) # Default wire names are [0, 1, 2, 3, 4]
c = Circuit(["A", "B", "C", "D", "E"])
c = Circuit(5, wire_names=["A", "B", "C", "D", "E"])
c = Circuit(wire_names=["A", "B", "C", "D", "E"])
# Every circuit initialization below is valid
circuit = Circuit(5) # Default wire names are [0, 1, 2, 3, 4]
circuit = Circuit(["A", "B", "C", "D", "E"])
circuit = Circuit(5, wire_names=["A", "B", "C", "D", "E"])
circuit = Circuit(wire_names=["A", "B", "C", "D", "E"])
Args:
nqubits (int | list, optional): Number of qubits in the circuit or a list of wire names.
Expand Down

0 comments on commit 3713524

Please sign in to comment.