If you followed the nvidia tutorial you probably installed the proprietary drivers. I haven't had much luck with those, so here is a solution using the modified drivers. Make sure to remove any nvidia drivers or cuda installation before following these instructions.
Install the drivers:
sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install nvidia-XXX nvidia-prime
Restart your computer and make sure the drivers installed correctly. To check, install nvidia x server settings. If your gpu is found, this software will display information about your graphics card.
Next install the cuda toolkit from standard repository:
sudo apt-get install nvdia-cuda-toolkit
Then install the correct cuda library from the repository added earlier:
sudo apt-get install libcuda1-XXX
sudo add-apt-repository -r ppa:xorg-edgers/ppa
XXX in the above will depend on what graphics card you have (higher XXX means a newer driver). For me (I have an nvidia 970M) it was 346 (EDIT: this was the latest driver at the time, it's now 361. Most video cards will be compatible with the latest driver, but check the nvidia website to be safe).
Finally, try running deviceQuery (may have to run as sudo) to see if cuda is installed and finding your gpu.