IME very difficulet for it to work, even though at first you both pull eachother upwards, then on the outside in my case in my case i was doing bad when she was doing ok, then i got clean and she relapsed big time, it's strange, then your relationship turns into you being 50% boyfriend 50% nurse, psychologist and doc... We were warned by the staff, that it would not be easy, and that there was a large chance that things would not work out, from their past experience of seeing couples forming in rehab.
At first everything was wonderful, it goes so fast, you get to spend so much time together, and really learn about eachother, and sharing the difficulty of addiction, and at that time, the desire to be rid of the enslavement of x or y substance, you are bound to have a lot in common, you pull eachother upwards, and trust the other person and fall in love very fast for those reasons (in my case). However you are sheltered from the "real world" and in a sort of "cocoon", things get complicated on the outside.
I'm not saying it's imposssible for it to work out, but unfortunately unlikely.