Soquet#
qualtran.Soquet
View source on GitHub
|
One half of a connection.
qualtran.Soquet(
binst, reg, idx=attr_dict['idx'].default
)
Users should not construct these directly. They should be marshalled
by a BloqBuilder.
A Soquet acts as the node type in our quantum compute graph. It is a particular
register (by name and optional index) on a particular Bloq instance.
A Soquet can also be present in an external connection (i.e. represent an unconnected input
or output) by setting the binst attribute to LeftDangle or RightDangle.
Attributes
binstThe BloqInstance to which this soquet belongs.
regThe register that this soquet is an instance of.
idxRegisters with non-empty
shapeattributes are multi-dimensional. A soquet is an explicitly indexed instantiation of one element of the multi-dimensional register.
Methods#
pretty
pretty() -> str
__ne__
__ne__(
other
)
Check equality and either forward a NotImplemented or return the result negated.
__eq__
__eq__(
other
)
Method generated by attrs for class Soquet.
View source on GitHub