You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
…ors (#390)
- Stores the circuit name in the `FuncDefn` operations instead of a
"name" metadata key.
In the future we will decode tket1 circuits into funtion definitions
instead of Dfg blocks, but that currently causes errors due to
CQCL/hugr#1175.
- `Circuit::circuit_signature` returns a `FunctionType` instead of a
`PolyFuncType`, since we (currently) don't allow parametric signatures.
- Improves the errors when constructing and manipulating circuits.
This work is in the path to solving #385 and #389, but we will require
some fixes in hugr (CQCL/hugr#1177) before
fixing the support for non-Dfg rooted circuits.
Followup to #390.
Fixes#389.
Closes#385.
~~Blocked by CQCL/hugr#1175
Fixes support for non-`Dfg` circuits and circuits with a non-root
parent:
Adds a `Circuit::extract_dfg(&self)` function that extracts the circuit
into a new hugr with a DFG operation at the root.
In some cases, like in a CFG DataflowBlock node, this requires some
changes to the definition to eliminate the output sum type.
Here I only implemented it for the kind of blocks produced by guppy. We
could replace the manual implementation once
CQCL/hugr#818 gets implemented.
With this we can now fix#389 by extracting the circuit before using it
as a replacement in `SimpleReplacement::create_simple_replacement`.
Replaces `DfgBuilder` with `FunctionBuilder` where possible, so we can
use named circuits in the tests.
(This failed before due to the bug in CircuitRewrite).
Subcircuit::create_rewrite
andCircuitRewrite::try_new
convert the target circuit to work with the requirements ofhugr::SimpleReplacement
.See CQCL/hugr#1169 CQCL/hugr#1171
The text was updated successfully, but these errors were encountered: