BloqInstance#

qualtran.BloqInstance

A unique instance of a Bloq within a CompositeBloq.

bloq

The Bloq.

i

An arbitrary index to disambiguate this instance from other Bloqs of the same type within a CompositeBloq.

Methods#

bloq_is

View source

Helper method that does isinstance(self.bloq, t).

This is also defined on DanglingT, so using this method on binst is equivalent to:

>>> not isinstance(binst, DanglingT) and isinstance(binst.bloq, t)

__ne__

Check equality and either forward a NotImplemented or return the result negated.

__eq__

Method generated by attrs for class BloqInstance.