LogicalCompiler

class guppyft.encode.LogicalCompiler(*args, **kwargs)[source]
__call__(pkg: Package) Package[source]

Call self as a function.

__init__(*args, **kwargs)
check_may_compile(pkg: Package) UncompilableError | None[source]

Check whether any issues can be detected that would arise when trying to compile the given package, e.g. the package containing unsupported gates.

Note that this function returning without error is not a guarantee that a subsequent call to encode will succeed.

may_compile(pkg: Package) bool[source]

Refer to self.check_may_compile for details.