flamingpy.utils.linalg.clifford_vec_to_global

flamingpy.utils.linalg.clifford_vec_to_global(vec)[source]

Convert a local Clifford gate on n qubits to a local Clifford gate on all n qubits.

Take a vector corresponding to a local Clifford gate on n qubits,

(a_1, a_2, …, a_n, b_1, b_2, …, b_n, c_1, c_2, …, c_n, d_1, d_2, …, d_n),

and return a single 2n x 2n array representing a local Clifford acting on all n qubits, given as the block matrix:

[A, B] [C, D]

where each block is a n x n diagonal matrix:

A = diag(a_1, a_2, …, a_n) B = diag(b_1, b_2, …, b_n) C = diag(c_1, c_2, …, c_n) D = diag(d_1, d_2, …, d_n).

Parameters

vec (numpy.array) – a vector of size 4n specifying a local Clifford on n qubits.

Returns

a 2n x 2n numpy array representing a local

Clifford acting on all n qubits.

Return type

numpy.array

Contents

Home

Background

Using FlamingPy

Development

Getting Help

Python API