ToffoliDecomposer¶
- class guppyft.decompose.ToffoliDecomposer[source]¶
Decomposes Toffoli gates into Clifford+T gates. Each Toffoli uses 7 T gates.
- __delattr__(name)¶
Implement delattr(self, name).
- __eq__(other)¶
Return self==value.
- __repr__()¶
Return repr(self).
- __setattr__(name, value)¶
Implement setattr(self, name, value).
- run(hugr: Hugr[Any], *, inplace: bool = True) PassResult[source]¶
Run the pass to transform a HUGR, returning a PassResult.
See
implement_pass_run()for a helper function to implement this method.
- with_scope(scope: LocalScope | GlobalScope) ComposablePass[source]¶
Set the scope configuration for the pass.
As of hugr 0.14.*, this configuration is only guidance, and may be ignored by the pass.
In the future, passes will be required to respect the scope configuration.