pyjuice.queries

Probabilistic queries over a compiled TensorCircuit. These cover the common inference tasks: marginals, conditionals, and sampling. All of them are thin wrappers around query(), which exposes the underlying forward/backward machinery for custom queries.

marginal

Compute the marginal probability given the assignment of a subset of variables, i.e., P(e).

conditional

Compute the conditional probability given hard or soft evidence, i.e., P(o|e).

sample

Draw samples from a PC by performing a top-down ancestral sampling pass.

query

A general-purpose entry point for running queries on a PC.