Summary: The older your child is, the easier it is. But by no means it will be easy. Personally, I don't even think it is possible. I present my own observations to support my claim.
I am an early career researcher myself, having just graduated with a PhD in a STEM field. I also got married a year before my dissertation defense and became a parent literally a month before I was to defend and graduate.
First, of course, anything is possible. While I may not personally know of any such success stories, I am sure others here do and I am sure you can google and find a few success stories.
But I will describe what I think is the average case instead of the extreme case, resulting from my own experiences and what I saw around me; friends, colleagues, lab partners, advisors, coauthors, other professors, people I met and got to know in meetings and conferences, people with whom I have interacted during my career...a sample size of 30-ish people.
Grad school is hard. Grad school in a STEM field is really really hard. It is very consuming. It consumes your time, eats into your social life, takes up your mental energy, your physical energy, and your emotional energy. It always has an adverse effect on your mental and physical health unless you are very disciplined and exercise, eat, and sleep regularly.
Likewise, being a parent is hard. Being a good parent is really really hard. Kids demand so much energy and they need so much love and attention. Raising a child is more demanding than going through grad school. If there are two of you, sure it helps. But both parents have to put in a lot in raising a child. Being a single parent is even harder because in a way, you are filling in for both parents.
Now on to hard data! Master's is easier so we will only consider doctoral students and above. These are all in STEM fields. I only know of two cases where they had children before starting doctoral studies. One had three kids, another had one kid. One had already made quite a lot of money on wall street and wanted to come back to school to get a PhD so he didn't worry too much about TAing or financial aid. The other was a typical student. They both did finish successfully but it took them about a year longer than was average in their respective fields. And I want to emphasize that they were both with their partners who were both full-time stay-at-home parents.
Next, I only know of myself and one another student, who had children while in grad school. We both had children very late in our studies, when most of our work was done, a paper or two was published, a paper or two was submitted, the thesis was being written or half done. Every single other person that I know of who wanted to have children, were waiting to graduate or even later to have kids.
I have never known nor heard of (a friend of a friend of a friend) a single case, a single parent who has wanted to start a PhD, or has started a PhD, was/in in a PhD, or has successfully finished a PhD.
In all honestly, I don't think that in your case, you can put up hard boundaries between your personal life and your professional life. How can you separate raising a child as a single parent and work on your computer science PhD? It doesn't matter what hours you decide, nine hours a day or 4 days a week. You will come home and think about your dissertation problem. You will think of your thesis. You will think of the comp sci question you are trying to answer. You will think about big and small inevitable conflicts with your advisor, your lab colleagues, your coauthors, your thesis committee, and whether you'll get a TAship next semester or not. Similarly, how can you stop thinking of your child when at work? What happens when the child is fussy or upset and doesn't want to stay with the babysitter or go to daycare? What if the child gets sick or there is another emergency? You'll run out of your lab without even thinking and there goes your rest of the nine-hour-planned-day out the window.
Furthermore, let's say a miracle happens and you get your nine-hours-a-day workdays. From a 24 hour day, taking out the time for sleep, how much time will you have for yourself? When will you decompress? When will you destress? When will you have time for your physical exercise and mental wanderings and distractions such as your hobbies? How often will you be able to just sit in front of the TV and eat cereal the whole day? When will you relax with your own alone me-time? Without hobbies, exercise, relaxation time, grad school will absolutely kill you. Every single person I know who tried this either dropped out or was an absolute wreck by the time they graduated. And these people were not even parents, much less single parents.
In conclusion, the statistics are against you. Sure, your child's age is a factor which makes it easier the older your child is...but it will still be very hard. You are taking two things which are notoriously difficult and intrude upon every aspect of life, and you want to try them both simultaneously, and hope you can keep them separate and succeed in both. I really wish you the best. Good luck!