Skip to main content

Module prelude

Module prelude 

Source
Expand description

Graph authoring, compilation, and Stim emission, for use bloq::prelude::*.

Advanced compiler controls live in crate::compile; circuit construction and physical IR editing use crate::circuit and crate::ir, including their respective preludes.

Load and compile a module hierarchy from disk:

use bloq::prelude::*;

let graph = BlockGraph::load("input.blog")?;
let config = CompileConfig::try_new(5)?;
let artifacts = CompileContext::new(config).compile(&graph)?;
std::fs::write("out.stim", emit_bloq_stim(&artifacts.bloq)?)?;

Re-exportsยง

pub use bloq_circuit::NoiseModel;
pub use bloq_compile::CompileArtifacts;
pub use bloq_compile::CompileConfig;
pub use bloq_compile::CompileContext;
pub use bloq_compile::CompileError;
pub use bloq_compile::compile;
pub use bloq_compile::compile_with;
pub use bloq_ir::Bloq;
pub use crate::Error;
pub use crate::Result;
pub use crate::compile_to_stim;
pub use glam::IVec3;
pub use bloq_graph::prelude::*;
pub use bloq_stim::prelude::*;