Skip to content

qref

qref

Public API of QREF.

SchemaV1

Bases: BaseModel

Root object in Program schema V1.

verify_topology

verify_topology(routine: RoutineV1) -> TopologyVerificationOutput

Checks whether program has correct topology.

Correct topology cannot include cycles or disconnected ports.

Parameters:

Name Type Description Default
routine RoutineV1

Routine or program to be verified.

required

generate_program_schema

generate_program_schema(version: str = LATEST_SCHEMA_VERSION) -> dict[str, Any]

Generate Program schema of given version.

Parameters:

Name Type Description Default
version str

version identifier of the schema.

LATEST_SCHEMA_VERSION

Returns:

Type Description
dict[str, Any]

A dictionary with JSON schema describing program.

Raises:

Type Description
ValueError

if version does not match any known version schema.