toqito.states.brauer
- toqito.states.brauer(dim, p_val)[source]
Produce all Brauer states [WikBrauer].
Produce a matrix whose columns are all of the (unnormalized) “Brauer” states: states that are the
p_val-fold tensor product of the standard maximally-entangled pure state ondimlocal dimensions. There are many such states, since there are many different ways to group the2 * p_valparties intop_valpairs (with each pair corresponding to one maximally-entangled state).The exact number of such states is:
``` import numpy as np
np.factorial(2 * p_val) / (np.factorial(p_val) * 2**p_val) ```
which is the number of columns of the returned matrix.
This function has been adapted from QETLAB.
Examples
Generate a matrix whose columns are all Brauer states on 4 qubits.
>>> from toqito.states import brauer >>> brauer(2, 2) [[1. 1. 1.] [0. 0. 0.] [0. 0. 0.] [1. 0. 0.] [0. 0. 0.] [0. 1. 0.] [0. 0. 1.] [0. 0. 0.] [0. 0. 0.] [0. 0. 1.] [0. 1. 0.] [0. 0. 0.] [1. 0. 0.] [0. 0. 0.] [0. 0. 0.] [1. 1. 1.]]
References
[WikBrauer]Wikipedia: Brauer algebra https://en.wikipedia.org/wiki/Brauer_algebra
- Parameters:
dim – Dimension of each local subsystem
p_val – Half of the number of parties (i.e., the state that this function computes will live in \((\mathbb{C}^D)^{\otimes 2 P})\)
- Returns:
Matrix whose columns are all of the unnormalized Brauer states.