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]}")

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qctrl_fire_opal_riken_client-1.2.1.tar.gz (93.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qctrl_fire_opal_riken_client-1.2.1-py3-none-any.whl (104.7 kB view details)

Uploaded Python 3

File details

Details for the file qctrl_fire_opal_riken_client-1.2.1.tar.gz.

File metadata

  • Download URL: qctrl_fire_opal_riken_client-1.2.1.tar.gz
  • Upload date:
  • Size: 93.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.0 CPython/3.11.15 Linux/6.17.0-1020-azure

File hashes

Hashes for qctrl_fire_opal_riken_client-1.2.1.tar.gz
Algorithm Hash digest
SHA256 3c87dc5318557f63c5c2a7c623edd7a7b2a4b38c5cc9d771b36c0b834002b7de
MD5 f646a5bf6bcd66f0854364d543c8d5d8
BLAKE2b-256 f77eb44d63188e6762359221e0c4db5d25ee1cef81a5f75729f367c70d078c6b

See more details on using hashes here.

File details

Details for the file qctrl_fire_opal_riken_client-1.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for qctrl_fire_opal_riken_client-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 904a8c1bc69d9b3feddcb9cbe2a9c3cab1a5f111099fa866e6bd3b8b4a939d09
MD5 e979f890770845c2bed5e58066ba021b
BLAKE2b-256 1de213042a2f72a6062f73181349a679c1525b6da9e45bb444a8284f4d3db3b1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page