Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix documentation of models.circuit.Circuit #1544

Merged
merged 6 commits into from
Dec 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading