Soquet#

qualtran.Soquet

One half of a connection.

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.

binst

The BloqInstance to which this soquet belongs.

reg

The register that this soquet is an instance of.

idx

Registers with non-empty shape attributes are multi-dimensional. A soquet is an explicitly indexed instantiation of one element of the multi-dimensional register.

Methods#

pretty

View source

__ne__

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

__eq__

Method generated by attrs for class Soquet.