Skip to main content

Overview

As a platform-agnostic toolkit, Haiqu SDK is connected with QPUs (Quantum Processing Units) available via AWS Braket platform. This integration allows users to execute their algorithms on different hardware modalities and access, among else, devices offered by IQM, IonQ and Rigetti.

Key Features of the Integration

Direct Access to AWS Braket via access tokens: Haiqu SDK users can execute quantum algorithms and experiments on AWS Braket devices without needing extensive configuration.Enhanced Workflow Management: Haiqu SDK offers tools to manage and optimize jobs submitted to AWS Braket QPUs, making the development and execution of quantum programs more efficient.

How to Access AWS Braket QPUs

The integration is designed to be user-friendly, with a focus on simplifying the process of accessing quantum resources. Below is a step-by-step guide to using Haiqu SDK for this purpose.
1

Configure AWS access credentials

Users must have valid access keys and IDs on AWS to run jobs on AWS Braket devices. If you don’t yet have the credentials, please refer to the AWS documentation. After you have acquired the credentials you can do one of the 3 things:
  1. Use aws configure CLI command:
Credentails are then stored in ~/.aws/credentials and ~/.aws/config local files.
  1. Use the save_aws_credentials()function:
haiqu.save_aws_credentials(
	aws_access_key_id: "AKIAIOSFODNN7EXAMPLE",
    aws_secret_access_key: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
    aws_default_region: "us-east-1",
)
  1. Pass explicitly in options dictionary:
options = {
    "aws_access_key_id": "AKIAIOSFODNN7EXAMPLE",
    "aws_secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
    "aws_default_region": "us-east-1",
}
We recommend to issue and use temporary AWS credentails with limited access to AWS resources.
2

Configure Haiqu SDK

Before executing your job on an AWS Braket device you may need to define (or extend) the options dictionary with the relevant properties of the execution (e.g. what optimization level you would like to use in transpilation).
options = {
    "transpilation_options": {
        "optimization_level": 3,
    },
	# if you chose Option 3 in the previous step
    "aws_access_key_id": "AKIAIOSFODNN7EXAMPLE",
    "aws_secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
    "aws_default_region": "us-east-1",
}
3

Submit Quantum Jobs

Once authenticated, users can submit quantum circuits or algorithms to AWS Braket QPUs directly through Haiqu SDK. The SDK handles all backend operations, including job queuing, execution, and result retrieval.
results_qpu = haiqu.run(
    haiqu_circuit,
    shots=1000,
    device_id="aws_ionq_aria_1",
    options=options,
)
4

Monitor and Retrieve Results

Haiqu SDK provides monitoring tools to track the status of quantum jobs in real-time. Once a job is completed, users can retrieve the results and analyze them within the SDK environment.
results_qpu.retrieve_status()

results_qpu.to_json()

Benefits of the Integration

Simplified Access: The integration eliminates complex setup procedures and allows users to focus on quantum application development.Scalability: Whether you are a researcher, developer, or enthusiast, Haiqu SDK enables scalable access to quantum resources tailored to your needs.Flexibility: The SDK supports a wide range of quantum programming libraries, making it a versatile tool for diverse projects.

Conclusion

Haiqu SDK’s integration with AWS Braket QPUs marks an important step in making quantum computing more accessible and practical for a broad audience. Users can securely and efficiently access quantum hardware from different providers, opening new possibilities in research, development, and innovation. Whether you’re an experienced quantum programmer or a curious beginner, Haiqu SDK provides the tools you need to explore the quantum frontier with ease.