# Tensor

Source: https://docs.q-ctrl.com/references/boulder-opal/boulderopal/graph/Tensor

```python
class boulderopal.graph.Tensor(operation, shape)
```

A multi-dimensional array of data.

Most functions accepting a [`Tensor`](#boulderopal.graph.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.

### SEE ALSO
[`Graph.tensor`](https://docs.q-ctrl.com/references/boulder-opal/boulderopal/graph/Graph/tensor.md#boulderopal.graph.Graph.tensor)
: Create a real or complex Tensor with the data provided.

## Notes

The value of a Tensor node can be fetched in a graph calculation
by adding its name in the output_node_names parameter for the function call.
This will add an item to the output dictionary in the calculation result object,
whose key is name. The item’s value will be a dictionary
with the “value” of the Tensor as a NumPy array.
