tqec.compile.compile.compile_block_graph#
- compile_block_graph(block_graph: ~tqec.computation.block_graph.BlockGraph, block_builder: ~tqec.compile.specs.base.BlockBuilder = functools.partial(<function default_compiled_block_builder>, plaquette_builder=<function make_css_surface_code_plaquette>), substitution_builder: ~tqec.compile.specs.base.SubstitutionBuilder = functools.partial(<function default_substitution_builder>, plaquette_builder=<function make_css_surface_code_plaquette>), observables: list[~tqec.computation.abstract_observable.AbstractObservable] | ~typing.Literal['auto'] | None = 'auto') CompiledGraph [source]#
Compile a block graph.
- Parameters:
block_graph – The block graph to compile.
block_builder – A callable that specifies how to build the CompiledBlock from the specified CubeSpecs. Defaults to the block builder for the css type surface code.
substitution_builder – A callable that specifies how to build the substitution plaquettes from the specified PipeSpec. Defaults to the substitution builder for the css type surface code.
observables – The abstract observables to be included in the compiled circuit. If set to “auto”, the observables will be automatically determined from the block graph. If a list of abstract observables is provided, only those observables will be included in the compiled circuit. If set to None, no observables will be included in the compiled circuit.
- Returns:
A CompiledGraph object that can be used to generate a cirq/stim circuit and scale easily.