How to create and manage virtual devices with Boulder Opal

Create, inspect, and snapshot virtual devices that serve as a digital representation of your quantum hardware

A virtual device in Boulder Opal Scale Up acts as a digital representation of your quantum processor. You can create a device from a YAML configuration file, inspect its calibration data, and save or restore snapshots to preserve known-good states.

In this user guide, you will learn how to set up the Scale Up client, create and select virtual devices, inspect device data at both the full-device and component level, and manage snapshots for reproducible calibration states.

You will need an authenticated client (see documentation specific to Qblox and Quantum Machines) and a device configuration YAML file for your quantum processor. If you are starting from scratch, complete the get started tutorial first.

1. Create a new virtual device

Each virtual device corresponds to a digital instance of a physical quantum processor, and you can have multiple virtual devices for each physical quantum processor to support different users or different calibration tasks over time. To create one, supply a unique name and the path to a YAML configuration file that describes the hardware layout. The returned job ID lets you track the creation process.

from pathlib import Path

job_id = await client.create_device(
    device_name="<your-device-name>", device_config=Path("<path-to-your-config>.yaml")
)
await client.set_current_device("<your-device-name>")

2. List and select devices

The get_devices() method returns all virtual devices in your organization. Once you identify the device you want to work with, call set_current_device() to mark it as the active target for all subsequent operations in this session.

devices = await client.get_devices()
client.display(devices)
await client.set_current_device("<your-device-name>")

3. Save a snapshot

Snapshots allow you to persist the current device state, capturing all calibration parameters, gate definitions, and classifier configurations at a single point in time. These device snapshots are specifically for resetting or recreating a virtual device to a given, known state.

await client.save_device_snapshot(output=Path("./snapshot.json"))

4. Restore from snapshot

Loading a previously saved snapshot restores the device to the state recorded in that file. This operation overwrites all current calibration data on the virtual device, so any calibration updates made after the snapshot was taken will be lost.

await client.load_device_snapshot(snapshot=Path("./snapshot.json"))

Next steps

Was this useful?

cta background

New to Boulder Opal?

Get access to everything you need to automate and optimize quantum hardware performance at scale.