Skip to content

DumpOperation doesn't need its argument to have an adjoint #2341

Closed
@tcNickolas

Description

@tcNickolas

DumpOperation uses only op, not its adjoint, so it should work fine with operations that do not have an adjoint. I ran into a case when I need to print the matrix of a unitary operation that is implemented using mutable variables (so not automatically or easily adjointable) but includes a sequence of gates that has a matrix representation. And, looking at the SingleQ example in https://learn.microsoft.com/en-us/azure/quantum/testing-debugging, dump_operation doesn't have the same restriction.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions