mqt.qudits.compiler.compilation_minitools¶

Common utilities for compilation.

Submodules¶

Package Contents¶

new_mod(a, b=2 * np.pi)[source]¶
phi_cost(theta)[source]¶
pi_mod(a)[source]¶
regulate_theta(angle)[source]¶
rotation_cost_calc(gate, placement)[source]¶
swap_elements(list_nodes, i, j)[source]¶
theta_cost(theta)[source]¶
class UnitaryVerifier(sequence, target, dimensions, nodes=None, initial_map=None, final_map=None)[source]¶

Verifies unitary matrices. sequence is a list of numpy arrays target is a numpy array dimensions is list of ints, equals to the dimensions of the qudits involved in the target operation initial_map is a list representing the mapping of the logic states to the physical ones at the beginning of the computation final_map is a list representing the mapping of the logic states to the physical ones at the end of the computation

get_perm_matrix(nodes, mapping)[source]¶
verify()[source]¶
apply_gate_to_tlines(gate_matrix, circuits_size=2, targets=None, dims=None)[source]¶
gate_expand_to_circuit(gate, circuits_size, target, dims=None)[source]¶
on0(gate, other_size)[source]¶
on1(gate, other_size)[source]¶