Skip to content

Commit

Permalink
try to fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
abbycross committed Dec 12, 2024
1 parent 4d738b6 commit e6433d1
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions qiskit/circuit/quantumcircuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -3843,13 +3843,11 @@ def num_ancillas(self) -> int:
qc.add_register(anc) # Add the ancilla register to the circuit
print("Number of ancilla qubits:")
print(qc.num_ancillas)
print("Number of ancilla qubits:", qc.num_ancillas)
.. code-block:: text
Number of ancilla qubits:
1
Number of ancilla qubits: 1
"""
return len(self.ancillas)

Expand All @@ -3874,8 +3872,12 @@ def num_clbits(self) -> int:
# Perform a controlled-X gate on qubit 1, controlled by qubit 0
qc.cx(0, 1)
print("Number of classical bits:")
print(qc.num_clbits)
print("Number of classical bits:", qc.num_clbits)
.. code-block:: text
Number of classical bits: 1
"""
return self._data.num_clbits
Expand Down

0 comments on commit e6433d1

Please sign in to comment.