Qompiler¶
graphqomb.qompiler module¶
Quantum Compiler(qompiler) module for Measurement-Based Quantum Computing (MBQC).
note: compile is used in Python built-in functions, so we use qompile instead.
This module provides:
qompile: Compile graph state into a pattern with x/z correction flows.
Qompile Functions¶
- graphqomb.qompiler.qompile(graph, xflow, zflow=None, *, parity_check_group=None, logical_observables=None, scheduler=None)[source]¶
Compile graph state into pattern with x/z correction flows.
- Parameters:
graph (
BaseGraphState) – graph statexflow (
collections.abc.Mapping[int,collections.abc.Set[int]]) – x correction flowzflow (
collections.abc.Mapping[int,collections.abc.Set[int]] |None) – z correction flow ifNone, it is generated from xflow by odd neighborsparity_check_group (
collections.abc.Sequence[collections.abc.Set[int]] |None) – parity check group for FTQClogical_observables (
collections.abc.Mapping[int,collections.abc.Set[int]] |None) – logical observables represented by logical index and seed nodesscheduler (
Scheduler|None, optional) – scheduler to schedule the graph state preparation and measurements, ifNone, aScheduleris constructed internally and solved with the defaultMINIMIZE_TIMEstrategy before compiling the pattern, otherwise the provided scheduler is validated before compiling the pattern, by defaultNone
- Returns:
compiled pattern
- Return type: