Repository: Qiskit/qiskit

Issue:
Latex drawer cannot draw parameterized circuit

### Information

- **Qiskit Terra version**: master 
- **Python version**: 3.5
- **Operating system**: Mac

### Steps to reproduce the problem
```
import qiskit as qk
theta = qk.circuit.Parameter('theta')

qc = qk.QuantumCircuit(1)
qc.rz(theta, 0)
qc.rz(2 * theta, 0) # Latex drawer will raise even without this line

qc.draw(output='text')

qc.draw(output='mpl')

qc.draw(output='latex')

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-5-df2fe88c70ca> in <module>
----> 1 qc.draw(output='latex')

~/q/qiskit-terra/qiskit/circuit/quantumcircuit.py in draw(self, scale, filename, style, output, interactive, line_length, plot_barriers, reverse_bits, justify, vertical_compression, idle_wires, with_layout)
    601                               vertical_compression=vertical_compression,
    602                               idle_wires=idle_wires,
--> 603                               with_layout=with_layout)
    604 
    605     def size(self):

~/q/qiskit-terra/qiskit/visualization/circuit_visualization.py in circuit_drawer(circuit, scale, filename, style, output, interactive, line_length, plot_barriers, reverse_bits, justify, vertical_compression, idle_wires, with_layout)
    238                                       justify=justify,
    239                                       idle_wires=idle_wires,
--> 240                                       with_layout=with_layout)
    241     elif output == 'latex_source':
    242         return _generate_latex_source(circuit,

~/q/qiskit-terra/qiskit/visualization/circuit_visualization.py in _latex_circuit_drawer(circuit, scale, filename, style, plot_barriers, reverse_bits, justify, idle_wires, with_layout)
    433                                plot_barriers=plot_barriers,
    434                                reverse_bits=reverse_bits, justify=justify,
--> 435                                idle_wires=idle_wires, with_layout=with_layout)
    436         try:
    437 

~/q/qiskit-terra/qiskit/visualization/circuit_visualization.py in _generate_latex_source(circuit, filename, scale, style, reverse_bits, plot_barriers, justify, idle_wires, with_layout)
    511                                  plot_barriers=plot_barriers,
    512                                  reverse_bits=reverse_bits, layout=layout)
--> 513     latex = qcimg.latex()
    514     if filename:
    515         with open(filename, 'w') as latex_file:

~/q/qiskit-terra/qiskit/visualization/latex.py in latex(self, aliases)
    147         """
    148         self._initialize_latex_array(aliases)
--> 149         self._build_latex_array(aliases)
    150         header_1 = r"""% \documentclass[preview]{standalone}
    151 % If the image is too large to fit on this documentclass use

~/q/qiskit-terra/qiskit/visualization/latex.py in _build_latex_array(self, aliases)
    478                             elif nm == "rz":
    479                                 self._latex[pos_1][column] = "\\gate{R_z(%s)}" % (
--> 480                                     pi_check(op.op.params[0], output='latex'))
    481                             elif nm == "reset":
    482                                 self._latex[pos_1][column] = (

~/q/qiskit-terra/qiskit/visualization/tools/pi_check.py in pi_check(inpt, eps, output, ndigits)
     43         QiskitError: if output is not a valid option.
     44     """
---> 45     inpt = float(inpt)
     46     if abs(inpt) < 1e-14:
     47         return str(0)

~/q/qiskit-terra/qiskit/circuit/parameterexpression.py in __float__(self)
    232         if self.parameters:
    233             raise TypeError('ParameterExpression with unbound parameters ({}) '
--> 234                             'cannot be cast to a float.'.format(self.parameters))
    235 
    236         return float(self._symbol_expr)

TypeError: ParameterExpression with unbound parameters ({Parameter(theta)}) cannot be cast to a float.

```

### What is the expected behavior?

Similar to the text and MPL drawers, it would be nice if the latex drawer could output something like `str(parameter_expression)`  for unbound parameter expressions.


Discussion:

Resolving patch:
diff --git a/qiskit/visualization/tools/pi_check.py b/qiskit/visualization/tools/pi_check.py
--- a/qiskit/visualization/tools/pi_check.py
+++ b/qiskit/visualization/tools/pi_check.py
@@ -17,6 +17,7 @@
 
 import numpy as np
 
+from qiskit.circuit.parameterexpression import ParameterExpression
 from qiskit.exceptions import QiskitError
 
 N, D = np.meshgrid(np.arange(1, 9), np.arange(1, 9))
@@ -42,6 +43,8 @@ def pi_check(inpt, eps=1e-6, output='text', ndigits=5):
     Raises:
         QiskitError: if output is not a valid option.
     """
+    if isinstance(inpt, ParameterExpression):
+        return str(inpt)
     inpt = float(inpt)
     if abs(inpt) < 1e-14:
         return str(0)


Test patch: