Misc. Utility Functions and Classes

Matrix Manipulation

qecc.directsum(A, B)

Given two matrices A and B with two indices each, returns the direct sum A \oplus B.

Return type:ndarray, shape (sA[0] + sB[0], sA[1] + sB[1])
Returns:A \oplus B
qecc.parity(bitarray)
Parameters:bitarray (list) – a list containing integers of value 0 or 1.
Returns:True if bitarray is of odd parity, False if it is of even parity.
Return type:bool

Table Of Contents

Previous topic

Predicates and Filters

Next topic

Exceptions and Warnings

This Page