Get started

Boulder Opal at a glance and quickstart

Boulder Opal overview

Boulder Opal is a versatile Python toolset that provides everything a research team needs to automate and optimize quantum hardware performance at scale for quantum computing and quantum sensing.

The challenges of hardware instability, onerous manual tune-up, and increasing complexity with system scaling can dramatically slow down progress. Boulder Opal helps research teams to overcome these challenges and accelerate progress by leveraging five core capabilities based on a powerful discipline called quantum control engineering:

  • Characterize hardware: Identify key system parameters and imperfections for effective calibration, simulation, and optimization.

  • Design error-robust controls: Create control solutions to manipulate quantum systems that are resilient to noise and errors.

  • Simulate quantum dynamics:
    Understand and anticipate the behavior of complex quantum devices under realistic conditions.

  • Automate hardware with AI: Automate and speed up calibration and optimization with closed-loop agents at scale.

  • Verify performance: Evaluate control solutions to gain insights and ensure effectiveness.

If you want to learn more, you can read our Boulder Opal overview topic. In this get started guide, you will run through the steps to get Boulder Opal ready for your calculations.

Setup

1. Sign up for an account

Sign up for a Q-CTRL account to get started with Boulder Opal for free.

2. Install the Boulder Opal Python package

To get started quickly and easily, we recommend Anaconda—a free and open-source distribution of the Python and R programming languages for scientific computing. Boulder Opal requires Python 3.8 or later.

Once you're set up with a valid Python version, install the Boulder Opal Python package using pip on the command line.

pip install boulder-opal

Several of the Boulder Opal user guides and application notes use the Q-CTRL Visualizer and Q-CTRL Open Controls packages. You can also install them using pip.

pip install qctrl-visualizer qctrl-open-controls

If you already have the boulder-opal package installed and wish to update to the latest version, use the upgrade flag in pip.

pip install --upgrade boulder-opal

You can similarly update qctrl-visualizer and qctrl-open-controls.

3. Calculate with Boulder Opal

Import the Boulder Opal client

Import Boulder Opal in your Jupyter notebook or Python script.

import boulderopal as bo

Configure your organization (optional)

If you are a member of multiple organizations, you must specify which organization's compute environment to use by using bouleropal.cloud.set_organization.

bo.cloud.set_organization("organization_slug")

where organization_slug is the unique ID used to identify this organization. You can check organization names and other details by visiting your Q-CTRL account.

Request machines before running calculations (optional)

Before you start processing your calculations, you can request some worker machines to be online with by using boulderopal.cloud.request_machines method,

bo.cloud.request_machines(machine_count)

where machine_count is the number of machines requested to be online (with the maximum set to the number of machines allocated in your plan). This will warmup the machines to minimize queue times for your actual calculations, refer to the Computational resources in Boulder Opal topic for more details. If you skip requesting machines, the system will autoscale based on the number of calculations required.

Submit your first calculation

You are now ready to perform your first calculation using Boulder Opal.

# Run a simple π-pulse simulation and print the resulting infidelity.
import numpy as np

graph = bo.Graph()
amplitude = np.pi * 1e5  # rad/s
duration = 5e-6  # s
pi_pulse = graph.constant_pwc(amplitude, duration)
infidelity = graph.infidelity_pwc(
    hamiltonian=pi_pulse * graph.pauli_matrix("X"),
    target=graph.target(graph.pauli_matrix("X")),
    name="infidelity",
)
result = bo.execute_graph(graph, "infidelity")
print(f"π-pulse infidelity: {result['output']['infidelity']['value']:.3e}")
π-pulse infidelity: 4.441e-16

The first time you run a calculation with Boulder Opal, you'll be asked to authenticate. An authentication link will open up automatically, or be provided for you to copy and open in your browser of choice. You will be asked to enter your credentials if you are not already authenticated on our web app.

It should look something like this:

Authentication URL:

https://id.q-ctrl.com/auth/...

The URL above should be automatically opened in your default web browser.
(Please copy and paste in case it doesn't open automatically)

Authenticate your credentials in your browser...

Finalizing authentication...
Successful authentication!

You are now ready to run your calculations!

You can monitor your calculations and manage your computing resources in the Boulder Opal web app. Check out our tutorials, guiding you through Boulder Opal's core capabilities step by step, and topics, discussing the key concepts surrounding Boulder Opal.

Was this useful?

cta background

New to Boulder Opal?

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