2.1.2. filter_functions.basis

This module defines the Basis class, a subclass of NumPy’s ndarray, to represent operator bases.

2.1.2.1. Classes

Basis

The operator basis as an array of shape (d**2, d, d) with d the dimension of the Hilbert space

2.1.2.2. Functions

normalize()

Function to normalize a Basis instance

expand()

Function to expand an array of operators in a given basis

ggm_expand()

Fast function to expand an array of operators in a Generalized Gell-Mann basis

Functions

equivalent_pauli_basis_elements(idx, N)

Get the indices of the equivalent (up to identities tensored to it) basis elements of Pauli bases of qubits at position idx in the total Pauli basis for N qubits.

expand(M, basis[, normalized, hermitian, tidyup])

Expand the array M in the basis given by basis.

ggm_expand(M[, traceless, hermitian, tidyup])

Expand the matrix M in a Generalized Gell-Mann basis [R0112a120aa9b-Bert08].

normalize(b)

Return a copy of the basis b normalized with respect to the Frobenius norm [R262ffa5493c5-Gol85]:

remap_pauli_basis_elements(order, N)

For a N-qubit Pauli basis, transpose the order of the subsystems and return the indices that permute the old basis to the new.

Classes

Basis(basis_array[, traceless, btype, labels])

Class for operator bases.