# transpose

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

```python
Graph.transpose(a, perm=None, *, name=None)
```

Reorder the dimensions of a tensor.

### Parameters
* **a** (*np.ndarray* *or* [*Tensor*](https://docs.q-ctrl.com/references/boulder-opal/boulderopal/graph/Tensor.md#boulderopal.graph.Tensor)) – The tensor whose dimensions you want to permute, $x$.
* **perm** (*list* *[* *int* *] or* *None* *,* *optional*) – The order of the input dimensions for the returned tensor. If you provide it, it must
  be a permutation of all integers between 0 and `N-1`, where N is the rank of a.
  If you don’t provide it, the order of the dimensions is inverted, that is to say,
  it defaults to `[N-1, …, 1, 0]`.
* **name** (*str* *or* *None* *,* *optional*) – The name of the node.
### Returns
The input tensor with its dimensions permuted. The i-th dimension of the
returned tensor corresponds to the perm[i]-th input dimension.
### Return type
[Tensor](https://docs.q-ctrl.com/references/boulder-opal/boulderopal/graph/Tensor.md#boulderopal.graph.Tensor)

### SEE ALSO
[`Graph.adjoint`](https://docs.q-ctrl.com/references/boulder-opal/boulderopal/graph/Graph/adjoint.md#boulderopal.graph.Graph.adjoint)
: Hermitian adjoint of an operator.

[`Graph.einsum`](https://docs.q-ctrl.com/references/boulder-opal/boulderopal/graph/Graph/einsum.md#boulderopal.graph.Graph.einsum)
: Tensor contraction via Einstein summation convention.
