Skip to content

Commit

Permalink
Make text drawer module private
Browse files Browse the repository at this point in the history
The text circuit drawer backend is not a public interface. We don't want
people to be confused and assume that we have a public api contract with
the public classes and functions in the module. This commit just renames
the module to indicate it's a private module.
  • Loading branch information
mtreinish committed Oct 16, 2018
1 parent bf9b297 commit 18f71de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions qiskit/tools/visualization/_circuit_visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@
from qiskit.tools.visualization._error import VisualizationError
from qiskit.tools.visualization import _latex
from qiskit.tools.visualization import _matplotlib
from qiskit.tools.visualization import _text
from qiskit.tools.visualization import _utils
from qiskit.transpiler import transpile
from .text import TextDrawing


logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -216,7 +217,7 @@ def _text_circuit_drawer(circuit, filename=None,
dag_circuit = DAGCircuit.fromQuantumCircuit(circuit, expand_gates=False)
json_circuit = transpile(dag_circuit, basis_gates=basis, format='json')

text = "\n".join(TextDrawing(json_circuit).lines(line_length))
text = "\n".join(_text.TextDrawing(json_circuit).lines(line_length))

if filename:
with open(filename, mode='w', encoding="utf8") as text_file:
Expand Down
File renamed without changes.

0 comments on commit 18f71de

Please sign in to comment.