Addressing¶
The most robust way to address any instrument connected via Ethernet, is to configure it using a static IP address and then use that address directly. As we’ve seen in earlier sections, Pulsars ship with IP address 192.168.0.2 by default, expecting to be in the 192.168.0.0/24 subnet. However, having to remember IP addresses is not very user-friendly, and if the instruments are to be connected through an existing network, static IP addresses may not even be an option: most networks use DHCP to automatically configure the IP addresses of the endpoints connected to it. In the latter case, ask your system administrator to be sure.
If you have to use DHCP, or just don’t want to have to hardcode IP addresses into your notebooks, you have two options, but both put some requirements on your network infrastructure:
Addressing instruments by their name or serial number using Qblox plug & play. This will only work when you are on the same local area network (LAN) as the instruments; it will not work if there is a router or VPN in between.
Addressing instruments by their hostname via (local) DNS. This requires DHCP and a router with local DNS support. Note that most consumer-grade routers don’t support this, but enterprise hardware usually does.
These four types of addresses (IP address, name, serial number, and DNS hostname) are collectively referred to as device identifiers. They are internally resolved via the resolve()
function; refer to its API documentation for the complete syntax supported by it. Both qblox-cfg
and the Pulsar & Cluster instrument drivers in Python support all types of identifiers.
Listing all instruments on a network¶
You can easily determine which instruments are present on a network and what their IP addresses, names, and serial numbers are:
$ qblox-pnp list
Devices:
- 192.168.0.3: Pulsar QRM 0.7.0 with name "test" and serial number 00013_2120_003
Note however that, since this uses Qblox Plug & Play, it will only work if you’re connected to the instrument(s) directly or only via network switches.
Verifying which instrument you’re connected to¶
Once you have a connection, you might want to ensure that you’re actually connected to the right instrument. You can do this with the identify()
method on an instrument connection object: calling this will make the module blink its front-panel LEDs for a few seconds. You can do the same from the command line using qblox-pnp identify <name-or-serial-number>
. Alternatively, if you’re not physically near the instrument but you do know what its name is supposed to be, you can use the get_name()
method to retrieve it from an open connection.
Renaming instruments¶
By default, Pulsar QRMs come programmed with the name and hostname pulsar-qrm, and Pulsar QCMs come programmed with pulsar-qcm. You can change this name using set_name()
in Python, or using the set-name
subcommand of qblox-cfg
(see Updating). Instrument names may be any single line of characters not including backslashes or underscores.
Warning
Instrument names are case sensitive, so be aware that an instrument named A
is different from a instrument named a
.
Hostnames have more stringent requirements. They must be lowercase, at most 63 characters long, and besides letters and numbers only the -
(dash) is allowed. If you want to use local DNS, make sure that you configure a name that complies with these rules to avoid confusion. If you configure a name that isn’t a valid hostname, the instrument will change its hostname to a best-effort representation of the invalid name.
Note
Name changes go into effect immediately for resolution via Qblox plug & play, but the hostname will only change after you reboot the instrument.