FlagQuantum SDK를 사용하여 로컬에서 양자 회로를 빌드, 컴파일, 시뮬레이션 및 내보내기 합니다.
다른 이름 FlagQuantum/mcp-servers, flagquantum-mcp-server
- 스타
- 1
- Tools
- —
- 다운로드, 30일
- 1,051
- 최신 버전
- 0.3.2
- 마지막 커밋
- 2026년 10월 27일
- 라이선스
- Apache-2.0
FlagQuantum MCP란?
FlagQuantum SDK를 사용하여 로컬에서 양자 회로를 빌드, 컴파일, 시뮬레이션 및 내보내기 합니다.
프로젝트 README에서 생성된 요약
FlagQuantum MCP server 정보
FlagQuantum MCP Server는 개발자와 연구자에게 양자 회로 관리를 위한 FlagQuantum SDK의 로컬 액세스 기능을 제공합니다. 사용자는 자신의 하드웨어에서 양자 회로를 빌드, 컴파일, 최적화 및 시뮬레이션할 수 있습니다. 이 서버는 외부 네트워크 접속이나 하드웨어 제출 없이 작동하므로 민감한 연구 워크플로우에 안전한 선택입니다. 작동을 위해 외부 API 키나 인증 정보가 필요하지 않습니다.
서버는 회로 검사 및 파라미터 바인딩부터 토폴로지 라우팅 및 OpenQASM 내보내기에 이르기까지 모든 과정을 처리하는 27개의 도구를 제공합니다. 사용자는 로컬 상태 벡터 시뮬레이션을 실행하거나, Lindblad 역학을 진화시키거나, Pauli-sum Hamiltonian에 대해 파라미터를 학습시킬 수 있습니다. stdio와 streamable HTTP 전송 방식을 모두 지원하여 Claude Desktop, Claude Code, MCP Inspector와 같은 클라이언트와 호환됩니다. 시스템은 회로 구조를 정확하게 표현하기 위해 canonical IR 및 압축된 QIR을 포함한 특정 JSON 형식을 사용합니다.
활용 사례
- 1특정 토폴로지에 최적화엔지니어는 그리드나 링과 같은 다양한 연결 모델에서 회로를 라우팅하는 가장 효율적인 방법을 결정할 수 있습니다.
- 2로컬 양자 시뮬레이션 수행연구자는 로컬 상태 벡터 시뮬레이션을 실행하여 기대값이나 주변 확률을 얻을 수 있습니다.
- 3회로를 OpenQASM으로 변환사용자는 양자 회로를 OpenQASM 2.0 또는 3.0 텍스트 형식으로 내보낼 수 있습니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
FlagQuantum MCP 설치 방법
형식 확인: 2026년 11월 10일Cursor에 추가Goose에 추가Claude Code에 FlagQuantum MCP 설치
$ claude mcp add flagquantum-mcp-server -- uvx flagquantum-mcp-serverCursor에 FlagQuantum MCP 설치
~/.cursor/mcp.json
{
"mcpServers": {
"flagquantum-mcp-server": {
"command": "uvx",
"args": [
"flagquantum-mcp-server"
]
}
}
}VS Code에 FlagQuantum MCP 설치
.vscode/mcp.json
{
"servers": {
"flagquantum-mcp-server": {
"type": "stdio",
"command": "uvx",
"args": [
"flagquantum-mcp-server"
]
}
}
}VS Code CLI에 FlagQuantum MCP 설치
$ code --add-mcp '{"name":"flagquantum-mcp-server","type":"stdio","command":"uvx","args":["flagquantum-mcp-server"]}'Claude Desktop에 FlagQuantum MCP 설치
claude_desktop_config.json
{
"mcpServers": {
"flagquantum-mcp-server": {
"command": "uvx",
"args": [
"flagquantum-mcp-server"
]
}
}
}Codex에 FlagQuantum MCP 설치
$ codex mcp add flagquantum-mcp-server -- uvx flagquantum-mcp-serverCodex config.toml에 FlagQuantum MCP 설치
~/.codex/config.toml
[mcp_servers.flagquantum-mcp-server] command = "uvx" args = ["flagquantum-mcp-server"]
Gemini CLI에 FlagQuantum MCP 설치
$ gemini mcp add -s user flagquantum-mcp-server uvx -- flagquantum-mcp-serverGemini settings.json에 FlagQuantum MCP 설치
~/.gemini/settings.json
{
"mcpServers": {
"flagquantum-mcp-server": {
"command": "uvx",
"args": [
"flagquantum-mcp-server"
]
}
}
}구성
FLAGQUANTUM_MCP_MAX_GATESLargest instruction count the server will process. Defaults to 10000.
FLAGQUANTUM_MCP_MAX_IR_BYTESLargest serialized circuit payload accepted, in bytes. Defaults to 262144.
FLAGQUANTUM_MCP_MAX_QUBITSLargest circuit width the server will process. Defaults to 24.
| 이름 | 설명 | 유형 |
|---|---|---|
| FLAGQUANTUM_MCP_MAX_GATES | Largest instruction count the server will process. Defaults to 10000. | |
| FLAGQUANTUM_MCP_MAX_IR_BYTES | Largest serialized circuit payload accepted, in bytes. Defaults to 262144. | |
| FLAGQUANTUM_MCP_MAX_QUBITS | Largest circuit width the server will process. Defaults to 24. |
자동 검사
2026년 11월 14일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 이는 보안 감사가 아닙니다. 코드를 직접 읽고 서버에 필요한 최소한의 권한만 부여하십시오. 검사 방식
- 소스 저장소 연결 및 접근 가능flagquantum/mcp-servers is public and reachablegithub.com/flagquantum/mcp-servers ↗통과
- 패키지가 이 저장소를 소스로 명시flagquantum-mcp-server names flagquantum/mcp-servers as sourcepypi.org/project/flagquantum-mcp-server/ ↗통과
- 빌드 출처(Sigstore 증명)Sigstore attestation for flagquantum-mcp-serverpypi.org/project/flagquantum-mcp-server/ ↗통과
- 오픈 소스 라이선스 (OSI)Apache-2.0spdx.org/licenses/Apache-2.0.html ↗통과
- 최근 1년 내 커밋 또는 릴리스Last commit or release 2026-10-27github.com/flagquantum/mcp-servers ↗통과
- OpenSSF Scorecard검사되지 않음
- 패키지 이름이 인기 패키지와 유사하지 않음No popular package one edit away from flagquantum-mcp-server통과
- 패키지 및 해당 종속성에 중요한 보안 권고 없음98 resolved dependencies checked; no critical advisoryosv.dev ↗통과
- 모델에 대한 숨겨진 지침 없음0 tool descriptions and the README read; no override phrases, credential paths or hidden characters통과
- 파괴적인 도구에 라벨 표시됨검사되지 않음
- 원격 엔드포인트가 MCP 핸드셰이크에 응답검사되지 않음
README
GitHub에서 보기FlagQuantum MCP Server
An MCP server that gives any MCP-compatible agent local access to the FlagQuantum SDK: build, compile, route, serialize and plan quantum circuits — and run them locally — with no credentials, no outbound network access and no hardware submission.
"Outbound" is the load-bearing word. Every tool here runs in this process and reaches nothing; the server never calls a provider, reads a token or submits a job. It can also listen, so a gateway that connects to its clients rather than launching them can reach it — see Serving over HTTP. An inbound listener is not egress.
Part of FlagQuantum/mcp-servers.
The mcp-name comment above is not decoration: the MCP Registry reads it from
this README to verify that whoever publishes the registry entry also controls
the PyPI package. Removing it breaks registry publishing.
What it does
Twenty-seven tools over stdio or Streamable HTTP. The research tools use the installed FlagQuantum service contract directly; the MCP layer does not reimplement request decoding, estimation, provider routing or scientific validation.
Build and inspect
| Tool | What it answers |
|---|---|
describe_gate_set_tool |
Wire count, parameter names and aliases for named gates — or every gate |
analyze_circuit_tool |
Gate counts, depth, wire usage, two-qubit gate count |
describe_layers_tool |
Which gates run concurrently, and therefore where the depth comes from |
serialize_circuit_tool |
Canonical IR JSON plus its content hash |
deserialize_circuit_tool |
Is this IR valid, and does it round-trip unchanged? |
Parameters
| Tool | What it answers |
|---|---|
inspect_parameters_tool |
Is this circuit parameterized, and where does each symbol sit? |
bind_parameters_tool |
What does this ansatz look like once the symbols are numbers? |
Compile and route
| Tool | What it answers |
|---|---|
optimize_circuit_tool |
What did target-independent optimization change? |
compile_circuit_tool |
What circuit does the complete optimize-and-route pipeline produce? |
route_circuit_tool |
What does this circuit cost on a line / ring / grid / custom topology? |
compare_topologies_tool |
Which connectivity is cheapest for this circuit? |
describe_topology_tool |
What is the connectivity, and how far apart are two wires? |
Export and present
| Tool | What it answers |
|---|---|
emit_openqasm_tool |
OpenQASM 2.0 or 3.0 text |
import_openqasm_tool |
FlagQuantum IR from OpenQASM text — the inverse of emit_openqasm_tool |
emit_qcis_tool |
QCIS text |
draw_circuit_tool |
An ASCII diagram of the circuit |
plan_execution_tool |
How would the SDK execute this — which mode, device, how much memory? |
plan_evolution_tool |
Validate and size a continuous-time Lindblad evolution without running it |
Run
| Tool | What it answers |
|---|---|
simulate_circuit_tool |
Counts, samples, marginal probabilities or an expectation value from a local statevector run |
evolve_dynamics_tool |
Time-resolved populations, observables and optional density matrices from local Lindblad evolution |
train_parameters_tool |
The angles that lower a circuit's energy against a Pauli-sum Hamiltonian |
Research capability workflow
| Tool | What it answers |
|---|---|
search_capabilities_tool |
Which approved local research operations match structured filters? |
describe_capability_tool |
What exact request, result, limitations and validators does one operation declare? |
estimate_capability_tool |
Is this request supported locally, and what bounded resources does FlagQuantum estimate? |
validate_capability_input_tool |
Does the complete typed request pass upstream validation? |
execute_local_capability_tool |
What Evidence Bundle results from explicit local provider execution? |
validate_evidence_tool |
Is the returned Evidence Bundle intact and scientifically accepted by the named validator? |
Four concrete resources include flagquantum://version,
flagquantum://gate-set, flagquantum://ir-schema, and the installed research
catalog at flagquantum://capabilities/index. Two resource templates expose
exact upstream documents without copying them:
flagquantum://capabilities/{capability_id}/{version} and
flagquantum://schemas/{schema_id}.
Three prompts: build_and_analyze_circuit, compile_for_topology,
export_circuit.
These are recipes for the clients that present them to a person — Claude
Desktop, the MCP Inspector, a host that turns them into slash commands. An
autonomous agent may receive none of them: several recorded sessions could not
enumerate them at all, and reported that they could not tell whether prompts
existed. So nothing an agent has to know lives only here. Every constraint the
prompts state is also in a tool summary, or in the server instructions, or in a
resource — the QCIS refusal and the "say what you assumed" rule were the two
exceptions, and they are in emit_qcis_tool and bind_parameters_tool now.
PROMPT_CONSTRAINTS in tests/test_server_contract.py keeps that true.
Install
pip install flagquantum-mcp-server
This pulls flagquantum, which depends on torch.
Claude Code
claude mcp add flagquantum -- uvx flagquantum-mcp-server
Claude Desktop / Cline
{
"mcpServers": {
"flagquantum": {
"command": "uvx",
"args": ["flagquantum-mcp-server"]
}
}
}
MCP Inspector
npx @modelcontextprotocol/inspector uvx flagquantum-mcp-server
Serving over HTTP
A client that launches a process — Claude Code, Claude Desktop, the Inspector — uses the default stdio transport and needs nothing below. A client that instead connects to servers, such as a gateway holding several of them, needs the server to listen:
flagquantum-mcp-server --transport http --host 0.0.0.0 --port 8105 \
--allowed-host quantum-mcp:8105
The endpoint is /mcp on that host and port, and it speaks Streamable HTTP.
| Flag | Default | Meaning |
|---|---|---|
--transport |
stdio |
stdio or http. The default is unchanged, so nothing that already works needs editing |
--host |
127.0.0.1 |
Interface to bind. Loopback by default: the server does not become reachable by accident |
--port |
8105 |
Port to bind |
--allowed-host |
none | A Host header the server will answer, repeatable |
--allowed-origin |
none | A browser Origin the server will answer, repeatable |
Binding a non-loopback interface requires --allowed-host. Without it the
server refuses to start rather than listen on every interface with nothing
checking who reaches it:
$ flagquantum-mcp-server --transport http --host 0.0.0.0
usage: flagquantum-mcp-server [-h] ...
flagquantum-mcp-server: error: --host 0.0.0.0 is not a loopback address, so the
server would answer any Host header that reaches it. Name the hosts it should
answer with --allowed-host HOST[:PORT], or bind 127.0.0.1.
Passing any --allowed-host or --allowed-origin turns host validation on; a
request carrying an unlisted Host is answered 421 Misdirected Request.
Loopback hosts are always answered, so enabling validation cannot lock out a
local client.
Two things worth knowing if you are wiring this up:
- Configure validation through the settings object, not
http_app( allowed_hosts=...). That keyword appends to a list which is only consulted once validation is on, so on its own it reads as a security setting and enforces nothing. Measured on fastmcp 3.4.7: a bogusHostis answered200with the keyword and421through the settings path. --transport httpadds an inbound socket, not an outbound one. No tool gains a network path; rule 4 in AGENTS.md is unchanged.
Circuit formats
Two input formats are accepted, both of them FlagQuantum's own serialization.
ir (canonical) — FlagQuantum IR JSON, as produced by
CircuitIR.to_json(). Versioned, hashable, and rejected if it carries unknown
fields:
{
"kind": "flagquantum.circuit_ir",
"version": "1.0",
"n_wires": 2,
"dtype": "complex64",
"shape": [4],
"instructions": [
{"opcode": "h", "wires": [0], "params": {}, "matrix": null, "metadata": {}},
{"opcode": "cx", "wires": [0, 1], "params": {}, "matrix": null, "metadata": {}}
],
"observables": [],
"measurements": [],
"metadata": {}
}
qir (convenience) — the compact gate list from Circuit.to_qir(), easier
to write by hand:
[{"name": "h", "index": [0]}, {"name": "cx", "index": [0, 1]}]
A gate carries its arguments under parameters, which the example above
never shows because neither gate takes one:
[{"name": "rz", "index": [0], "parameters": {"theta": 0.5}}]
The two formats use different key names, and this is the most common
mistake: the gate list calls a gate name and its wires index, while serialized
IR calls them opcode and wires. Sending IR keys as qir is rejected with a
message that says so by name. An empty gate list is also rejected, because the
wire count is inferred from the highest index — an empty list describes no
circuit. A bare integer is accepted for a single-wire gate
("index": 0 means "index": [0]).
Either format can be passed to any tool; serialize_circuit_tool converts
qir into canonical ir.
One more naming trap: an IR payload's version field is spelled version,
and sending ir_version instead is rejected as an unknown key — but tool
results report that same field as ir_version. The payload key and the reported
key are not spelled the same way.
circuit_format is a closed set — the JSON schema publishes
"enum": ["ir", "qir"], so a wrong value is rejected before any tool body runs.
OpenQASM text is not a supported input. FlagQuantum ships emitters but no
QASM parser, so there is nothing to convert it with; a caller holding OpenQASM
has to load it into FlagQuantum itself and send the resulting IR.
On parameters
A gate parameter is either a number or a symbol, and a symbol is written as a one-key object naming it:
{"name": "ry", "index": [0], "parameters": {"theta": {"$parameter": "theta"}}}
This works in both input formats. A symbol is what makes a circuit an ansatz:
inspect_parameters_tool reports it, and bind_parameters_tool substitutes a
number for it.
A bare string is not a symbol. {"theta": "theta"} is a value, not a
reference; the SDK stores it as one, so the circuit reports itself as
unparameterized. Nothing else complains: draw_circuit_tool prints the value it
was handed, and a string prints as RY(theta) — indistinguishable from a real
symbol — while plan_execution_tool plans the circuit for execution. So the
input boundary rejects it, along with a misspelled marker ({"$unknown": ...})
and a non-string symbol name, naming the gate and the parameter. The other
encodings a parameter may carry are $expression, $complex and $tensor; a
mapping carrying none of those four keys is rejected for the same reason. The
flagquantum://ir-schema resource carries a worked parameter_example.
One rough edge, inherited from the SDK: a real symbol is rendered as the SDK's
repr of it, so RY(theta) appears as RY(Parameter(name='theta')).
FlagQuantum's Parameter defines no __str__, so str() falls through to
__repr__. The symbol is intact — only the diagram's spelling is clumsy — and
it affects both input formats equally.
Binding is needed to export: the emitters write numbers, and refuse an
unbound circuit naming bind_parameters. Nothing else needs it. analyze,
optimize, route, draw, describe_layers and plan_execution_tool all
accept a parameterized circuit as it stands, because none of them reads a
parameter value — a plan is built from the payload's shape and dtype. Bind when
you want the emitted text or a concrete circuit to run, not before.
On an explicit unitary
A gate's matrix travels under a key that differs by format: the gate list
calls it gate, serialized IR calls it matrix.
[{"name": "any", "index": [0], "gate": [[0, 1], [1, 0]]}]
Two things are rejected rather than half-honoured.
The wrong key for the format. Circuit.from_qir reads gate and ignores
matrix entirely, so a gate list spelling it the IR way would be built with no
matrix at all — silently. For a built-in name that means a different circuit
than the caller wrote, so the key mismatch is named.
A matrix on a built-in opcode. A matrix belongs to any, the opcode
FlagQuantum reserves for it. On a built-in name the SDK keeps the matrix in the
payload but lets the built-in's own definition win, which splits the tools:
analyze_circuit_tool reports the gate under the built-in's name while the
emitters refuse to lower it. Name the gate any instead.
On a wire number
Wire numbers must be integers in both formats, and the wires list must be a
list. Both are worth stating because the SDK accepts more: it iterates whatever
it is handed and calls int() on each element, so "1", true, 1.7 and
0.9 are wires, and "01" is wires 0 and 1 while {"0": 1} is wire 0. The last
cases are why this is an error rather than a convenience — a value that means
nothing turns into a circuit that looks fine.
On the envelope's own fields
The same rule, applied to the fields outside instructions. n_wires and the
entries of shape are read with int(), so "2", 2.7 and true are all a
width; dtype is looked up as an attribute on torch, so a value that is not a
string reaches an attribute lookup inside the SDK.
The test for what is refused is whether information is lost, not whether the
JSON type matches the schema exactly. That is why version: 1.0 is accepted —
str(1.0) reproduces it — while n_wires: 2.7 is not: it silently becomes 2,
and n_wires: true silently becomes 1.
dtype is checked for being a string here. Which strings are legal stays with
the SDK, whose own message names the rule (complex_dtype must be complex64 or complex128), so the two cannot drift apart.
On observables and measurements
Both are lists of objects, empty when the circuit has none, and an entry is short — the SDK fills in the rest on load:
{
"observables": [{"name": "ZZ", "wires": [0, 1]}],
"measurements": [{"kind": "counts", "wires": [0, 1], "shots": 1024}]
}
What the SDK stores adds the optional keys and lowercases the observable name,
so "ZZ" comes back as "zz" carrying "coefficient": 1.0. coefficient is
the term's weight, and it may be a symbol exactly as a gate angle may
({"$parameter": "w"}), which is how a Hamiltonian term carries a variational
weight. shots is null when omitted.
An observable is what a VQE ansatz exists to measure, so it is worth knowing
that the shape is reachable without being wrong first — flagquantum://ir-schema
publishes both forms side by side as observable_example.
On emitted text
emit_openqasm_tool measures every wire unless result_wires names the ones you
want, so the emitted program normally carries measurements the source circuit
does not — a Bell circuit with no measurements still emits c = measure q;.
Declaring measurements in the source IR changes nothing: the emitted text is
chosen by result_wires alone. The content_hash in the result identifies the
source circuit, not the emitted text. emit_qcis_tool appends nothing.
On imported text
import_openqasm_tool reads the canonical subset FlagQuantum's own emitters
write, and refuses the rest with UNSUPPORTED_FORMAT and the importer's own
message naming the statement and line. It is not a general OpenQASM front end:
text from another toolchain may be refused rather than approximated, and a
program is never silently rewritten to fit.
The round trip is faithful to the text, not to the source circuit. Because
emit_openqasm_tool adds a measurement the source circuit never had, importing
its output yields a circuit that measures. Its content_hash therefore differs
from the emitter's, which describes the source. Import twice and the hash is
stable; import what you emitted and the gate sequence matches, the measurement
is new.
On content_hash
Every payload carries the SDK's content_hash, which is the SHA-256 of the
canonical JSON including the metadata object. An IR payload that omits
metadata is legal — it defaults to {} — but it hashes differently from the
same circuit carrying its runtime metadata. Treat the hash as identifying the
payload, not the gate sequence alone. The flagquantum://ir-schema resource
says the same thing where an agent will read it.
Limits
Every bound is overridable by environment variable, so a deployment can tighten them without a code change:
| Variable | Default | Bounds |
|---|---|---|
FLAGQUANTUM_MCP_MAX_QUBITS |
24 | Circuit width |
FLAGQUANTUM_MCP_MAX_GATES |
10000 | Instruction count |
FLAGQUANTUM_MCP_MAX_IR_BYTES |
262144 | Serialized circuit payload |
FLAGQUANTUM_MCP_MAX_QASM_CHARS |
1000000 | Emitted program size |
FLAGQUANTUM_MCP_MAX_COMPARE_TOPOLOGIES |
4 | Topologies per comparison |
FLAGQUANTUM_MCP_MAX_TRAIN_SECONDS |
60 | Predicted cost of one training call |
FLAGQUANTUM_MCP_MAX_RESPONSE_VALUES |
65536 | Values one result may carry back |
FLAGQUANTUM_MCP_MAX_HAMILTONIAN_TERMS |
1024 | Pauli terms per expectation request |
The last one is the only bound on what this server returns rather than what it
accepts. A result travels into a model's context rather than into memory, and a
sampled result grows with shots — 200,000 draws is legal by every other bound
here and far more than an answer.
Errors
There are two layers, and which one answers depends on whether the schema could describe the mistake.
Schema violations are caught by the MCP layer before any tool body runs and
come back as a protocol error. That covers a circuit_format outside the enum,
a missing required argument, and an argument of the wrong JSON type.
Everything else comes back as a structured envelope, so a caller can branch on the code instead of parsing prose:
{"status": "error", "error": {"code": "LIMIT_EXCEEDED", "message": "..."}}
Codes: INVALID_INPUT, LIMIT_EXCEEDED, UNSUPPORTED_FORMAT,
SDK_UNAVAILABLE, INTERNAL_ERROR.
Both layers reach the client as an error it can read; only the layer differs.
Nothing escapes as an unhandled exception that would break the transport — a
failed call leaves the session usable for the next one, which
tests/test_server_process.py asserts over a real stdio connection.
What this server deliberately does not do
- No hardware, no credentials, no outbound network. FlagQuantum's own release 0.2.0 ships no remote-submission entry point, and this adapter adds none. The HTTP transport opens a listening socket and changes nothing about what a tool may do once a request arrives.
- No instruction-level
NoiseModelobjects. Those are live SDK objects rather than serializable values. Continuous-time evolution instead accepts closed JSON collapse-operator descriptors with physical rates. - No in-tree coupling. This package must never be imported by the
FlagQuantum repository. That project's long-horizon architecture contract
names "the main repository has no production MCP transport dependency" as a
retirement condition, and its
tests/team/services/test_service_boundaries.pyfails ifmcporfastmcpbecomes importable on the core path. Keeping the gateway out of tree is what that contract asks for.
What it runs, and what that does not prove
plan_evolution_tool and evolve_dynamics_tool use a separate continuous-time
contract. A Hamiltonian and observables are Pauli-term lists, the initial state
is a basis bitstring or dense state, times are explicit and strictly increasing,
and amplitude damping is a physical rate in the Lindblad equation—not a channel
probability. The execution tool returns one population row per requested time,
trace drift, a bounded-population check, and numerical method/order/step-size/
precision provenance. Both tools are deterministic, local CPU operations with
no provider, credentials, hardware, or outbound network access.
simulate_circuit_tool executes circuits in this process: a statevector
simulation on CPU. That is the whole of it — no remote target, no provider, no
token. It was not always here. Until it landed the server planned and never ran,
and the line above used to say so; a real task showed the cost, so the line
moved rather than the tool being smuggled in underneath it.
The result says where it ran, in the SDK's own fields rather than in a summary:
"execution": {
"execution_path": "local_statevector",
"platform_provider": "pytorch_cpu",
"mode": "statevector",
"device": "cpu",
"accuracy": {"metric": "not_measured", "...": "..."}
}
accuracy.metric is not_measured, and plan_execution_tool reports
release_gate_allowed: false for the same circuit. That second field is the
plan's, in its summary — the simulation result above carries execution,
outputs and status, and its accuracy block has five fields (version,
metric, value, tolerance, passed). An ideal simulation of a circuit is a
statement about that circuit, not about any device that would run it — the SDK
declines to license a stronger reading, and this server does not add one.
Three things are refused rather than reinterpreted, each because accepting would produce a plausible-looking answer:
| Input | Why it is refused |
|---|---|
| A circuit with unbound parameters | The SDK's refusal is planned execution failed, which names nothing. The message here names the parameters and points at bind_parameters_tool |
A circuit carrying observables |
The default statevector path never reads the field, so the run would return no expectation value and no error either. Ask for the expectation directly with pauli or terms instead |
outputs alongside the circuit's own measurements |
The SDK accepts one or the other, and says so in vocabulary that names neither field |
The width where a full probability distribution stops being returnable is the
SDK's own contraction limit, and its message points at a setting this server
does not expose. That refusal keeps the SDK's text and adds what a caller can
actually do — name a few wires, or ask for counts, which report only the
outcomes that occurred.
FlagQuantum MCP 질문
FlagQuantum MCP를 Claude Code에 추가하려면 어떻게 하나요?
터미널에서 claude mcp add flagquantum-mcp-server -- uvx flagquantum-mcp-server를 실행합니다. 모든 프로젝트에서 사용할 수 있게 하려면 --scope user를 추가합니다.
FlagQuantum MCP를 Cursor에 추가하려면 어떻게 하나요?
~/.cursor/mcp.json를 열고 mcpServers 아래에 서버를 추가합니다. 위 설치 섹션에 표시된 Cursor 구성을 사용합니다.
OpenQASM 텍스트를 서버로 직접 가져올 수 있나요?
아니요, OpenQASM 텍스트는 지원되는 입력 형식이 아닙니다. 먼저 OpenQASM을 FlagQuantum SDK로 로드한 다음 생성된 IR을 전송해야 합니다.
입력 가능한 회로 형식은 무엇인가요?
서버는 두 가지 FlagQuantum 직렬화 형식인 'ir'(canonical JSON)과 'qir'(압축된 게이트 리스트)를 지원합니다.
네트워크를 통해 서버를 실행할 수 있나요?
--transport http 플래그를 사용하여 HTTP로 서버를 제공할 수 있으며, 이를 통해 게이트웨이가 서버에 연결할 수 있습니다.