RasQberry Installation and Setup

The RasQberry project

RasQberry Installation and Setup

If you already have a raspberry pi with the latest version of Raspbian you can start at step 2.

Step 1: Get your Raspberry Pi ready

With the Raspberry Pi Imager (https://www.raspberrypi.org/software/ ) write the Raspberry Pi OS Raspian on an (empty) SD-Card. You can either choose the Image right from the Raspberry Pi Imager or you can first download Raspian at https://www.raspberrypi.org/software/operating-systems/#raspberry-pi-os-32-bit.

drawing drawing

(Optional) Do the default Setup of your Raspberry Pi by using

sudo raspi-config

For this you will need an Display or for an headless set up you’ll need to enable SSH.


Step 2: Enable SSH (optional)

You can enable SSH in different ways:

drawing


You can enable SSH and enter your password or public-key to make the authenticating process while connecting easier.

Next, you’ll need to get the IP address from the Raspberry Pi. You can find the address in your Router’s DHCP lease allocation table or if you use a display, you can get your IP address by typing ifconfig in your terminal.

Open a terminal on your remote device and enter

ssh pi@/{your IP address}

You need to agree that you want to connect your devices and enter your Raspberry Pi password (default: raspberry). Now you should be able to use SSH.


Step 3: Installing RasQberry

Open the terminal/ssh window on your Raspberry Pi.

pip3 install getgist
.local/bin/getgist -y JanLahmann RasQ-init.sh
. ./RasQ-init.sh

drawing drawing

This will download and start the RasQberry Configuration Tool (rasqberry-config) in your terminal. It is similar to the well-known raspi-config and can also be used for some basic configurations. To start the tool again you can use

. ./RasQ-init.sh 

in your terminal/ssh window.


Step 4: RasQberry Setup

You can assemble your Hardware either with an (touch) display or with an senseHAT. It is not possible to use the senseHAT and the touch display on the same Raspberry Pi, because the senseHAT isn’t working with the installation process from the touch display.

With touch display

Open the RasQberry Configuration Tool and follow the steps below.

  1. Select S – RasQberry Setup
  2. Select G0 – System Update
  3. Select G1 - Initial Config
    Your Raspberry will process the basic configurations on your device.
  4. Select G2 – Install Qiskit
    With this step you will install Qiskit. You can choose between a few versions of Qiskit to install. The latest version is recommended.
  5. Select D0 – Bloch Autostart
    With this step you Raspberry will start the Bloch Sphere Demo automatically whenever you start your device.
    After your first the executing D0 your Raspberry will reboot automatically. After the reboot you should execute D0 again. This time there is no automatic reboot, but one is recommended.
  6. Select D1 – Config & Demos (optional)
    With this step you will configurate Qiskit automatically and install the Quantum Demos. Also this step will configurate jupyter notebook.

With Sense HAT

Before the Raspberry Pi can boot with the SenseHAT attached you need to do some changes in the config.txt-file.

/boot/config.txt

Open the config.txt-file and uncomment the line

#hdmi_force_hotplug

Next, open the RasQberry Configuration Tool and follow the steps below.

  1. Select S – RasQberry Setup
  2. Select G0 – System Update
  3. Select G1 – Initial Config
    Your Raspberry will process the basic configurations on your device.
  4. Select G2 – Install Qiskit
    With this step you will install Qiskit. You can choose between a few versions of Qiskit to install. The latest version is recommended.
  5. Select S0 – Config SenseHAT
    With this step you will configurate the SenseHAT and the qrasp demo will autostart.


The above installation procedure used pre-compiled wheel files for most of the python packages. These are downloaded automatically from https://www.piwheels.org. For the packages retworkx and qiskit-aer, currently there are no whl files available. Total install with local compile takes 10 minutes on RPi 4.


Update your IBM Quantum Experience API Token

If you want to access IBM Quantum Experience (to use e.g. the senseHAT demos) you need an API Token. If you want to update or store your API Token, you need to select D – Quantum Demos first and after that D7 – Update Q Token.
In the terminal you can now enter your new API Token.


Cloning the Git-Repository with the Qiskit-tutorials

By executing the following instructions you clone a repository (https://github.com/Qiskit/qiskit-tutorials) with a collection of jupyter notebooks aimed at teaching people who want to use Qiskit for writing quantum computing programs, and executing them on one of several backends (online quantum processors, online simulators, and local simulators).

If you want to clone the Git Repository to access the with the Qiskit-Tutorials, you need to open the RasQberry Configuration Tool. First select H - HD Demos and second Q1 - Qiskit Tutorials (Jupyter Notebokk starts automatically).
This will take a moment to clone and as the case may be to open the jupyter notebook.


Disable the Bloch Autostart

You can disable the autostart of the BlochSphere Demo in the RasQberry Configuration Tool. First you need to select D – Quantum Demos and then D8 – Disable Bloch Autostart.
The autostart is now disabled.


Changing WIFI Settings

If you got handed an SD-Card where the above described installation already is made and you want to connect the Raspberry with your network you can do this in different ways.

drawing


In this panel you can enter your SSID and your wifi-password and select your Wifi country.
When your boot your Raspberry Pi it should automatically connect to your wifi of choice.



Install VNC Viewer

To remotely access the screen of your Raspberry Pi you need to have a VNC Viewer installed on a different computer. VNC has been tested using the realVNC Viewer (https://www.realvnc.com/de/connect/download/viewer/)
To connect to your Raspberry Pi you need to open your VNC Viewer.
In the VNC Viewer you enter the VNC server-address from your Raspberry. After that you will need to enter a username (default: pi) and a password (default: raspberry).
Your VNC Viewer will now connect to your Raspberry Pi.


Connect a LED Ring-Light to your Raspberry Pi

To connect your LED light, you need three cables (GND, VCC & IN). Put your cables on the Raspberry Pins as follows:

You can check which Pin on your Raspberry is the right one, with

pinout 

in your terminal/ssh window.

drawing drawing

Open your terminal/ssh window and type

sudo python3 .local/bin/rq_LED-test.py -c

Your LED Light should now be turned on. To turn it of press ctl + c.

If this method doesn’t work, you can also open the RasQberry Configuration Tool. Select S – RasQberry Setup, then S7 – Enable LED Light and finally S8 – Toggle LED Light.
Your LED Light should now be turned on. To turn it off again select S8 – Toggle LED Light again.

Go back to: Content
Go back to: Start Page