Fix barrier placement in latex circuit drawer (#1361)
Fix barrier placement in latex circuit drawer (#1361)

After the migration to using the standardized bit order and using the
dag/circuit instead of json output from the transpiler the latex circuit
drawer has been drawing barriers incorrectly. The code from before the
migration was never updated and assumed that the bit order was always
increasing from the top down. So it would just find the LSB on the first
register from the barrier and figure out how long the barrier was and
use that (reverse bits worked because the internal data structures
inversed everything). However post-migration this no longer holds true
since the MSB by default is at the top, and the first register is at the
bottom. So instead of drawing a barrier on the proper bits it would draw
down from the last bit covered by the barrier (reverse bits worked
correctly because it had the expected input). This commit fixes this
problem by changing the barrier handling to identify the top most bit
covered by the barrier and use that as the starting point. It does this
by iterating over the qubits and finding the position of the bit in the
output instead of making assumptions about the order.
QISKit/qiskit-sdk-py,QISKit/qiskit-sdk-py,QISKit/qiskit-sdk-py