qctrl-fire-opal-riken-client 0.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- qctrl_fire_opal_riken_client-0.0.0/PKG-INFO +84 -0
- qctrl_fire_opal_riken_client-0.0.0/README.md +38 -0
- qctrl_fire_opal_riken_client-0.0.0/__init__.py +12 -0
- qctrl_fire_opal_riken_client-0.0.0/poetry.lock +1887 -0
- qctrl_fire_opal_riken_client-0.0.0/pyproject.toml +107 -0
- qctrl_fire_opal_riken_client-0.0.0/sampler.py +117 -0
- qctrl_fire_opal_riken_client-0.0.0/tests/conftest.py +170 -0
- qctrl_fire_opal_riken_client-0.0.0/tests/test_client.py +227 -0
- qctrl_fire_opal_riken_client-0.0.0/tests/test_job.py +187 -0
- qctrl_fire_opal_riken_client-0.0.0/tests/test_sampler.py +147 -0
- qctrl_fire_opal_riken_client-0.0.0/utils/__init__.py +1 -0
- qctrl_fire_opal_riken_client-0.0.0/utils/client.py +219 -0
- qctrl_fire_opal_riken_client-0.0.0/utils/job.py +164 -0
- qctrl_fire_opal_riken_client-0.0.0/utils/requests.py +126 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: qctrl-fire-opal-riken-client
|
|
3
|
+
Version: 0.0.0
|
|
4
|
+
Summary: Fire Opal RIKEN client
|
|
5
|
+
License: https://q-ctrl.com/terms
|
|
6
|
+
Keywords: black opal,boulder opal,fire opal,ironstone opal,nisq,open controls,q control,q ctrl,q-control,q-ctrl,qcontrol,qctrl,quantum,quantum algorithms,quantum circuits,quantum coding,quantum coding software,quantum computing,quantum control,quantum control software,quantum control theory,quantum engineering,quantum error correction,quantum firmware,quantum fundamentals,quantum navigation,quantum sensing,qubit,qudit,riken
|
|
7
|
+
Author: Q-CTRL
|
|
8
|
+
Author-email: support@q-ctrl.com
|
|
9
|
+
Maintainer: Q-CTRL
|
|
10
|
+
Maintainer-email: support@q-ctrl.com
|
|
11
|
+
Requires-Python: >=3.11,<3.13
|
|
12
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: Education
|
|
16
|
+
Classifier: Intended Audience :: Science/Research
|
|
17
|
+
Classifier: License :: Other/Proprietary License
|
|
18
|
+
Classifier: Natural Language :: English
|
|
19
|
+
Classifier: Operating System :: OS Independent
|
|
20
|
+
Classifier: Programming Language :: Python :: 3
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Classifier: Topic :: Internet :: WWW/HTTP
|
|
24
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
25
|
+
Classifier: Topic :: Scientific/Engineering :: Visualization
|
|
26
|
+
Classifier: Topic :: Software Development :: Embedded Systems
|
|
27
|
+
Classifier: Topic :: System :: Distributed Computing
|
|
28
|
+
Requires-Dist: grpcio (>=1.60.0,<2.0.0)
|
|
29
|
+
Requires-Dist: grpcio-tools (>=1.60.0,<2.0.0)
|
|
30
|
+
Requires-Dist: protobuf (>=5.26.0,<6.0.0)
|
|
31
|
+
Requires-Dist: protovalidate (>=0.7.0,<0.8.0)
|
|
32
|
+
Requires-Dist: qctrl-fire-opal-riken-commons (>=0.0.0,<0.0.1)
|
|
33
|
+
Requires-Dist: qiskit (>=2.1.2)
|
|
34
|
+
Requires-Dist: qiskit-ibm-runtime (>=0.40.0,<0.41.0)
|
|
35
|
+
Requires-Dist: types-protobuf (<4.25.0.20240417)
|
|
36
|
+
Project-URL: Documentation, https://docs.q-ctrl.com
|
|
37
|
+
Project-URL: Facebook, https://www.facebook.com/qctrl
|
|
38
|
+
Project-URL: GitHub, https://github.com/qctrl
|
|
39
|
+
Project-URL: Homepage, https://q-ctrl.com
|
|
40
|
+
Project-URL: LinkedIn, https://www.linkedin.com/company/q-ctrl/
|
|
41
|
+
Project-URL: Source, https://github.com/qctrl/fire-opal-riken-client
|
|
42
|
+
Project-URL: X, https://x.com/qctrlHQ
|
|
43
|
+
Project-URL: YouTube, https://www.youtube.com/qctrl
|
|
44
|
+
Description-Content-Type: text/markdown
|
|
45
|
+
|
|
46
|
+
# Fire Opal RIKEN Client
|
|
47
|
+
|
|
48
|
+
This is the Fire Opal client integration for RIKEN quantum computing infrastructure using a gRPC client.
|
|
49
|
+
|
|
50
|
+
## Architecture Overview
|
|
51
|
+
|
|
52
|
+
- **Client**: Qiskit `SamplerV2` implementation that sends circuits to Fire Opal server for optimization
|
|
53
|
+
- **Server**: gRPC service that performs Fire Opal preprocessing/postprocessing
|
|
54
|
+
|
|
55
|
+
## Usage
|
|
56
|
+
|
|
57
|
+
Here is a small example of how to use the Fire Opal RIKEN client with Qiskit. This will communicate with a gRPC server to perform Fire Opal pre-processing on a quantum circuit before executing it on the `ibm_kobe` backend. Once the job is complete, results post-processed by Fire Opal will be returned from the `job.result()` call.
|
|
58
|
+
|
|
59
|
+
```python
|
|
60
|
+
import os
|
|
61
|
+
from qiskit import QuantumCircuit
|
|
62
|
+
from qiskit.providers import BackendV2
|
|
63
|
+
from fireopalrikenclient.sampler import FireOpalSampler
|
|
64
|
+
from fireopalrikenclient.utils.client import FireOpalClient
|
|
65
|
+
|
|
66
|
+
# Create circuit.
|
|
67
|
+
circuit = QuantumCircuit(2)
|
|
68
|
+
circuit.h(0)
|
|
69
|
+
circuit.cx(0, 1)
|
|
70
|
+
circuit.measure_all()
|
|
71
|
+
|
|
72
|
+
# Create gRPC client with server address stored in an environment variable.
|
|
73
|
+
os.environ["FIRE_OPAL_GRPC_SERVER_ADDRESS"] = "localhost:50051" # Update to server address
|
|
74
|
+
|
|
75
|
+
# Create sampler with Fire Opal preprocessing.
|
|
76
|
+
service = QiskitRuntimeService(token="...", instance="...", channel="ibm_quantum_platform")
|
|
77
|
+
sampler = FireOpalSampler(mode=service.backend("ibm_kobe"))
|
|
78
|
+
|
|
79
|
+
# Run with Fire Opal optimization.
|
|
80
|
+
sampler_pub = (circuit, None, 1024)
|
|
81
|
+
job = sampler.run([sampler_pub])
|
|
82
|
+
result = job.result()
|
|
83
|
+
```
|
|
84
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Fire Opal RIKEN Client
|
|
2
|
+
|
|
3
|
+
This is the Fire Opal client integration for RIKEN quantum computing infrastructure using a gRPC client.
|
|
4
|
+
|
|
5
|
+
## Architecture Overview
|
|
6
|
+
|
|
7
|
+
- **Client**: Qiskit `SamplerV2` implementation that sends circuits to Fire Opal server for optimization
|
|
8
|
+
- **Server**: gRPC service that performs Fire Opal preprocessing/postprocessing
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
Here is a small example of how to use the Fire Opal RIKEN client with Qiskit. This will communicate with a gRPC server to perform Fire Opal pre-processing on a quantum circuit before executing it on the `ibm_kobe` backend. Once the job is complete, results post-processed by Fire Opal will be returned from the `job.result()` call.
|
|
13
|
+
|
|
14
|
+
```python
|
|
15
|
+
import os
|
|
16
|
+
from qiskit import QuantumCircuit
|
|
17
|
+
from qiskit.providers import BackendV2
|
|
18
|
+
from fireopalrikenclient.sampler import FireOpalSampler
|
|
19
|
+
from fireopalrikenclient.utils.client import FireOpalClient
|
|
20
|
+
|
|
21
|
+
# Create circuit.
|
|
22
|
+
circuit = QuantumCircuit(2)
|
|
23
|
+
circuit.h(0)
|
|
24
|
+
circuit.cx(0, 1)
|
|
25
|
+
circuit.measure_all()
|
|
26
|
+
|
|
27
|
+
# Create gRPC client with server address stored in an environment variable.
|
|
28
|
+
os.environ["FIRE_OPAL_GRPC_SERVER_ADDRESS"] = "localhost:50051" # Update to server address
|
|
29
|
+
|
|
30
|
+
# Create sampler with Fire Opal preprocessing.
|
|
31
|
+
service = QiskitRuntimeService(token="...", instance="...", channel="ibm_quantum_platform")
|
|
32
|
+
sampler = FireOpalSampler(mode=service.backend("ibm_kobe"))
|
|
33
|
+
|
|
34
|
+
# Run with Fire Opal optimization.
|
|
35
|
+
sampler_pub = (circuit, None, 1024)
|
|
36
|
+
job = sampler.run([sampler_pub])
|
|
37
|
+
result = job.result()
|
|
38
|
+
```
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Copyright 2025 Q-CTRL. All rights reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Q-CTRL Terms of service (the "License"). Unauthorized
|
|
4
|
+
# copying or use of this file, via any medium, is strictly prohibited.
|
|
5
|
+
# Proprietary and confidential. You may not use this file except in compliance
|
|
6
|
+
# with the License. You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# https://q-ctrl.com/terms
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS. See the
|
|
12
|
+
# License for the specific language.
|