def test_count_qubits():
    'Test count_qubits'
    qubit_op = QubitOperator('X1 Y2')
    assert (count_qubits(qubit_op) == 3)
    fer_op = FermionOperator('1^')
    assert (count_qubits(fer_op) == 2)
    qubit_exc_op = QubitExcitationOperator('4^ 1')
    assert (count_qubits(qubit_exc_op) == 5)
Test count_qubits
def test_count_qubits():
    
    qubit_op = QubitOperator('X1 Y2')
    assert (count_qubits(qubit_op) == 3)
    fer_op = FermionOperator('1^')
    assert (count_qubits(fer_op) == 2)
    qubit_exc_op = QubitExcitationOperator('4^ 1')
    assert (count_qubits(qubit_exc_op) == 5)