ISATransform Class
Abstract base class for transformations between ISAs (e.g., QEC schemes).
An ISA transform defines a mapping from a required input ISA (e.g., architecture constraints) to a provided output ISA (logical instructions). It supports enumeration of configuration parameters.
Constructor
ISATransform()
Methods
| bind |
Create a BindingNode for this transform. This is a convenience method equivalent to |
| enumerate_isas |
Enumerate all valid ISAs for this transform given implementation ISAs. This method iterates over all instances of the transform class (enumerating hyperparameters) and filters implementation ISAs against requirements. |
| provided_isa |
Yields ISAs provided by this transform given an implementation ISA. |
| q |
Create an ISAQuery node for this transform. |
| required_isa |
Return the requirements that an implementation ISA must satisfy. |
bind
Create a BindingNode for this transform.
This is a convenience method equivalent to cls.q().bind(name, node).
bind(name: str, node: ISAQuery) -> _BindingNode
Parameters
| Name | Description |
|---|---|
|
name
Required
|
The name to bind the transform's output to. |
|
node
Required
|
<xref:qdk.qre.Node>
The child node that can reference this binding. |
Returns
| Type | Description |
|---|---|
|
<xref:BindingNode>
|
A binding node enclosing this transform. |
enumerate_isas
Enumerate all valid ISAs for this transform given implementation ISAs.
This method iterates over all instances of the transform class (enumerating hyperparameters) and filters implementation ISAs against requirements.
enumerate_isas(impl_isa: ISA | Iterable[ISA], ctx: ISAContext, **kwargs) -> Generator[ISA, None, None]
Parameters
| Name | Description |
|---|---|
|
impl_isa
Required
|
<xref:ISA | Iterable>[<xref:ISA>]
One or more implementation ISAs. |
|
ctx
Required
|
The enumeration context. |
|
**kwargs
Required
|
Arguments passed to parameter enumeration. |
provided_isa
Yields ISAs provided by this transform given an implementation ISA.
abstract provided_isa(impl_isa: ISA, ctx: ISAContext) -> Generator[ISA, None, None]
Parameters
| Name | Description |
|---|---|
|
impl_isa
Required
|
The implementation ISA that satisfies requirements. |
|
ctx
Required
|
The enumeration context whose provenance graph stores the instructions. |
q
Create an ISAQuery node for this transform.
q(*, source: ISAQuery | None = None, **kwargs) -> ISAQuery
Parameters
| Name | Description |
|---|---|
|
source
Required
|
<xref:<xref:qdk.qre.Node | None>>
The source node providing implementation ISAs. Defaults to ISA_ROOT. |
|
**kwargs
Required
|
Fixed values or domains for dataclass fields. Keyword-only
fields with a For example, given a transform with a non-keyword-only field
|
Keyword-Only Parameters
| Name | Description |
|---|---|
|
source
|
Default value: None
|
Returns
| Type | Description |
|---|---|
|
An enumeration node representing this transform. |
required_isa
Return the requirements that an implementation ISA must satisfy.
abstract static required_isa() -> ISARequirements
Returns
| Type | Description |
|---|---|
|
The requirements for the underlying ISA. |