Tensor

class qctrl.graphs.Tensor(operation, shape)

A multi-dimensional array of data.

Most functions accepting a Tensor object can alternatively accept a NumPy array.

You can use the arithmetic operators +, -, *, **, /, //, and @ to perform operations between two Tensor objects.

Variables
  • shape (tuple) – The shape of the tensor.

  • name (str) – The name assigned to the node.