fixed and simplified the display logic

before the number of qubits was determined incorrectly
slight simplification