AWS Quantum Technologies Blog

Amazon Braket launches the Rigetti Ankaa-2 superconducting device

Amazon Braket, the quantum computing service of Amazon Web Services (AWS), enables customers to design and run quantum algorithms and explore applications of quantum computing by providing access to a variety of quantum hardware. Braket’s mission is to reduce technology risk for customers by lowering the barriers to entry to explore quantum computing through a single consistent interface with pay-as-you-go pricing.

Today, we are excited to expand this commitment by onboarding the latest superconducting quantum processor from Rigetti Computing, the 84-qubit Ankaa-2 device, in the US West (N. California) Region. Furthermore, unlike other devices on Amazon Braket which can be limited in availability, Ankaa-2 can execute customer circuits throughout the day. This means that customers in any time zone can run quantum tasks and hybrid jobs at their convenience, opening up new possibilities for uninterrupted experiments and a more efficient use of quantum hardware resources, all on a pay-as-you-go basis. In this post, we will introduce the Rigetti Ankaa-2 device and show some sample code to get you started.

Quantum computing is a rapidly evolving field, with researchers and developers continuously pushing the boundaries of what is possible with current hardware. Compared to the previous Aspen-M-3 family, Ankaa-2 is designed to deliver improved gate operation times and increased median two-qubit gate fidelities. The qubits on the Ankaa-2 chip are arranged in a square lattice (Figure 1) so that each qubit is designed to have four nearest neighbors allowing for a more efficient mapping of applications to the device layout. More information and up-to-date characterization data can be found on the Ankaa-2 device details page in the Amazon Braket Console.

Figure 1:  A Rigetti quantum computer (L) and the 84-qubit Ankaa-2 lattice (R).

Figure 1: A Rigetti quantum computer (L) and the 84-qubit Ankaa-2 lattice (R).

Variational quantum workloads

Quantum workloads are essentially hybrid in nature and involve running a series of quantum circuits on a quantum processing unit with classical subroutines. Due to noise found in today’s quantum processors, improving the runtime of these iterative operations can be done by reducing the overhead associated with time intensive steps such as queue wait times and compilation.

At launch, Ankaa-2 is fully supported by our Braket Hybrid Jobs feature, offering you a quantum-classical runtime environment with priority access to the device during the entire execution of the customer algorithm. Ankaa-2 offers built-in support for parametric compilation, whereby Braket automatically compiles and caches pre-compiled circuits on behalf of customers. Those compiled artifacts are then reused at run time, which can boost performance by removing the overhead associated with repeated compilation steps. Customers interested in exploring the Braket Hybrid Jobs feature can learn more by checking out our hybrid quantum algorithm example notebooks.

Running your first circuit on Ankaa-2

Customers like using Braket for it’s consistent, easy-to-use programming interface to access quantum hardware. To run programs on Ankaa-2, all you need to do is specify the device name before running your circuit, as shown in the code snippet below:

device = AwsDevice(Devices.Rigetti.Ankaa2)

You can run your first circuit with as little as a few lines of code as shown in the π/2 rotation example below:

# run circuit

circuit = Circuit().rx(0, np.pi/2)

result = device.run(circuit, shots=1000).result()

Experiment with pulse control on Rigetti Ankaa-2

Researchers with advanced workloads requiring the use of analog instructions can access the Ankaa-2 device at the pulse-level using Braket Pulse. Here we show how to characterize and construct a single qubit gate directly using pulse access on the Ankaa-2 device.

By taking advantage of the ability to work at the level of pulses, you can customize the analog control signals that are applied to qubits to implement operations on the device. With pulse sequences that have a calibrated length and phase, we can realize single qubit gates. Here, we determine the optimal pulse length to realize a π/2 pulse, an elementary block used to build more complex pulse sequences.

First, let’s import the necessary libraries. When building a pulse sequence, we need the PulseSequence class.

from braket.aws import AwsDevice
from braket.devices import Devices
from braket.pulse import PulseSequence, GaussianWaveform, ErfSquareWaveform
from braket.circuits import FreeParameter
import numpy as np

In this example we plan to execute pulse sequences with different durations and analyze how the final probability of the zero state depends on the duration. The instructions in a pulse sequence are applied to frames. A frame contains a series of pulses which can be sent to or received back from the quantum computer. Before constructing the pulse sequence, let’s start by retrieving the frames. The drive frame is used for applying the pulse, and the readout frame is for measuring the qubit state. In this example, we use the frames of qubit five. For more information about frames, see Roles of frames and ports.

device = AwsDevice(Devices.Rigetti.Ankaa2)
drive_frame = device.frames["Transmon_5_charge_tx"]
readout_frame = device.frames["Transmon_5_readout_rx"]

The pulse sequence applies a waveform to the drive frame followed by a capture instruction on the readout frame. To find the supported pulse instructions and waveforms, you can view the pulse capability in the device properties and the Braket Developer Guide.

waveform = ErfSquareWaveform(
    FreeParameter("length")+20e-9,
    FreeParameter("length"), 
    1.5e-9, 
    amplitude=0.25
)

pulse_sequence = ( 
    PulseSequence()
    .play(drive_frame, waveform)
    .capture_v0(readout_frame)
)

The free parameter defined in the Erf Square waveform allows us to instantiate multiple pulse sequences, each with a different pulse length, from a single parametric pulse.

start_length=12e-9
end_length=2e-7
lengths = np.arange(start_length, end_length, 12e-9)

N_shots = 100

pulse_sequences = [pulse_sequence(length=length) for length in lengths]

With the pulse sequences defined, let’s run them on the Rigetti Ankaa-2 device:

batch = device.run_batch(pulse_sequences, shots=N_shots)
population_of_zero_state = [
    result.measurement_counts['0']/N_shots for result in batch.results()
]

The population of the zero state, shown in Figure 2 below, exhibits the expected Rabi oscillation. From this data, we can extract the frequency of oscillation and fine tune the length of the pulse to implement a particular 1-qubit gate. For example, in Figure 2, the period, which corresponds to a 2π pulse, is about 118 ns; therefore, a π/2 rotation gate will correspond to a pulse sequence with a length of 29.5 ns.

Figure 2: The population of the zero state exhibiting a Rabi oscillation for a given qubit on the Rigetti Ankaa-2 device.

Figure 2: The population of the zero state exhibiting a Rabi oscillation for a given qubit on the Rigetti Ankaa-2 device.

Get Started Today

Ankaa-2 on Braket can execute quantum circuits throughout the day, meaning you can run quantum tasks and hybrid jobs at your convenience. To get started, visit the Amazon Braket console to view the device topology, get up-to-date calibration information about single and two-qubit gate fidelities, native gate support, and to view readout fidelities. If you’re looking for more examples or algorithms, visit our GitHub repository for additional getting started notebooks.