Skip to main content

Fire Opal RIKEN Client

This is the Fire Opal client integration for RIKEN quantum computing infrastructure using a gRPC client.

Architecture Overview

  • Client: Qiskit SamplerV2 implementation that sends circuits to Fire Opal server for optimization
  • Server: gRPC service that performs Fire Opal preprocessing/postprocessing

Installation

Choose the version that matches where you are logged in:

  • Fugaku: install the sqc version.
  • R-CCS cloud: install the ibm version.

Fugaku

Complete these steps before you install:

  1. Create a JHPC Quantum account. Sign up here: https://idp.qc.r-ccs.riken.jp/realms/jhpc-quantum/account
  2. Set up and install your CA certificate and JWT token in your Fugaku home directory. The JWT token must be located at $HOME/.sqc_rpc_sched/jwt.token.
  3. Set up your Python environment by following this guide: https://github.com/jhpc-quantum/documents/blob/main/Qiskit_JHPC_Quantum_user_guide.md

After you finish the steps above, install the sqc version:

pip install 'qctrl-fire-opal-riken-client[sqc]'

R-CCS cloud

The steps above are not required for R-CCS cloud. Install the ibm version:

pip install 'qctrl-fire-opal-riken-client[ibm]'

Usage

Here is a small example of how to use the Fire Opal RIKEN client with Qiskit. This communicates with a gRPC server to perform Fire Opal optimizations on a quantum circuit before executing it. Once the job is complete, post-processed results are returned from the job.result() call.

The only difference between Fugaku (sqc) and R-CCS cloud (ibm) is how the QiskitRuntimeService channel and backend are set up, as noted in the comments below.

from qiskit import QuantumCircuit
from fireopalrikenclient.sampler import FireOpalSampler
from qiskit_ibm_runtime import QiskitRuntimeService

# Create circuit.
circuit = QuantumCircuit(2)
circuit.h(0)
circuit.cx(0, 1)
circuit.measure_all()

# Create sampler with Fire Opal preprocessing.
#
# On Fugaku (`sqc`), use the `jhpc_quantum` channel and the `ibm_sqc` backend.
# No `token` or `instance` is needed here, since those are provided by your
# SQC environment setup.
service = QiskitRuntimeService(channel="jhpc_quantum")
sampler = FireOpalSampler(mode=service.backend("ibm_sqc"))
#
# On R-CCS cloud (`ibm`), use the `ibm_quantum_platform` channel and the
# `ibm_kobe` backend. Replace `token` and `instance` with your `ibm_kobe`
# credentials provided by RIKEN.
# service = QiskitRuntimeService(token="...", instance="...", channel="ibm_quantum_platform")
# sampler = FireOpalSampler(mode=service.backend("ibm_kobe"))

# Run circuit with 1024 shots using Fire Opal optimization.
sampler_pub = (circuit, None, 1024)
job = sampler.run([sampler_pub])
result = job.result()

# Access the results
print(f"Number of pub results: {len(result)}")
print(f"Metadata: {result.metadata}")

# Access individual pub results by iterating over the result
for i, pub_result in enumerate(result):
    print(f"Pub {i}: {pub_result}")

# Or access a single pub result directly by index
print(f"First pub result: {result[0]}")

Metadata

Release files for qctrl-fire-opal-riken-client 1.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qctrl-fire-opal-riken-client 1.3.1
File Size Uploaded
qctrl_fire_opal_riken_client-1.3.1.tar.gz 104.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for qctrl-fire-opal-riken-client 1.3.1
File Interpreter ABI Platform
qctrl_fire_opal_riken_client-1.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 220.1 kB

Release files / qctrl_fire_opal_riken_client-1.3.1.tar.gz

Download URL qctrl_fire_opal_riken_client-1.3.1.tar.gz
Size 104.3 kB
Tags Source
SHA-256 checksum
How to use checksums
6eb86540f8ddd004984166ba2a1e9e33f8289438b959c1e1d76e2bcb4c9ea1f1
BLAKE2b-256 checksum
How to use checksums
8767d2af58db8dd9d0caa977cce08d5822562d7199917ed09ea2379e3d4a3236
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.0 CPython/3.11.16 Linux/6.17.0-1022-azure

Release files / qctrl_fire_opal_riken_client-1.3.1-py3-none-any.whl

Download URL qctrl_fire_opal_riken_client-1.3.1-py3-none-any.whl
Size 115.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4ccabb1a97e32f216c25f217658606ec9ca598bcb79aa202c97a5b7a061241f3
BLAKE2b-256 checksum
How to use checksums
e470e4851471e691a04e582b24d839f824ac7fd6c39e5e73033f568b683aace8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.0 CPython/3.11.16 Linux/6.17.0-1022-azure

Release history Release notifications | RSS feed

1.4.1

2 release files

1.4.0

2 release files

This release

1.3.1 This release

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

0.0.2

2 release files

0.0.1

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page