# tensor

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

```python
Graph.tensor(data, *, name=None)
```

Create a real or complex Tensor with the data provided.

### Parameters
* **data** (*number* *or* *np.ndarray* *or* [*Tensor*](https://docs.q-ctrl.com/references/boulder-opal/boulderopal/graph/Tensor.md#boulderopal.graph.Tensor)) – The data to convert to an appropriate tensor.
* **name** (*str* *or* *None* *,* *optional*) – The name of the node.
### Returns
Real or complex Tensor representation of the input data.
### Return type
[Tensor](https://docs.q-ctrl.com/references/boulder-opal/boulderopal/graph/Tensor.md#boulderopal.graph.Tensor)

## Notes

Use this node to create a Tensor from some numeric data. Note that you
can pass numbers or NumPy arrays to operations that accept Tensors.
