Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Qamomileドキュメントへようこそ

Qamomile(カモミール、/ˈkæməˌmiːl/)は、カモミールの花にちなんで名付けられました。カモミールは穏やかさと明瞭さの象徴として知られるハーブです。

Qamomileとは?

Qamomileは、量子回路を型付きのPython関数として記述できる量子プログラミングSDKです。作成した量子回路は、Qiskit、CUDA-Q、QURI Parts、qBraidなどの量子SDKで実行できます。また、シンボリックな代数的リソース推定やブラックボックス(オラクル)を含むような直接実行できない回路のリソース推定も可能です。

Pythonによる量子回路記述

型付きのPython関数で量子回路を表現し、通常のコードのように可視化・確認・再利用できます。

多様な量子SDK対応

Qiskit、CUDA-Q、QURI Parts、qBraidなどへ、同じ量子回路をそのまま展開できます。

数理最適化との連携

QUBOやIsingモデルを量子アルゴリズムへつなぎ、最適化問題の実装と実行を一貫して扱えます。


クイックスタート

Qamomileはpipからインストールすることができます。

pip install qamomile

以下は、Qamomileによる量子アルゴリズムの実行例です。詳細は、はじめての量子カーネルを参照してください。

import math

import qamomile.circuit as qmc
from qamomile.qiskit import QiskitTranspiler


@qmc.qkernel
def biased_coin(theta: qmc.Float) -> qmc.Bit:
    q = qmc.qubit(name="q")
    q = qmc.ry(q, theta)
    return qmc.measure(q)


# 実行前に量子カーネルを可視化し、リソースを見積もる
biased_coin.draw(theta=0.6)
est = biased_coin.estimate_resources()
print("qubits:", est.qubits)
print("total gates:", est.gates.total)

# thetaを実行時に指定できるパラメータとして残してトランスパイル
transpiler = QiskitTranspiler()
exe = transpiler.transpile(biased_coin, parameters=["theta"])

# thetaの値を指定して実行
result = exe.sample(
    transpiler.executor(),
    shots=256,
    bindings={"theta": math.pi / 4},
).result()

print(result.results)

はじめに


Qamomileを使う


リファレンス


引用

研究でQamomileを使用する場合は、以下を引用してください。

@INPROCEEDINGS{11249901,
  author={Huang, Wei-Hao and Matsuyama, Hiromichi and Tam, Wai-Hong and Sato, Keisuke and Yamashiro, Yu},
  booktitle={2025 IEEE International Conference on Quantum Computing and Engineering (QCE)},
  title={Qamomile: A Cross-SDK Bridge for Quantum Optimization},
  year={2025},
  volume={02},
  pages={516-517},
  doi={10.1109/QCE65121.2025.10423}
}

リンク