Skip to content

Raise an error if non-unitary tketop are found #1735

Description

@nicolaassolini-qntm

Guppy forbid to allocate or measure/consume qubits inside modifier blocks.
However, when tket2 pass find a Measure | MeasureFree | QAlloc | TryQAlloc | QFree | Reset operator, it simply keeps the same operator without doing anything (tket2/tket/src/modifier/modifier_resolver/tket_op_modify.rs#L476).
It is impossible to have a guppy with a modifier applied to a measurement, but it is possible to build an hugr that does that. As far as modifying measurement & co operations in guppy are illegal, I would like to have the same behaviour in tket2, thus I would raise an error during passing instead of doing nothing.

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions