mqt.qudits.compiler.compilation_minitools¶
Common utilities for compilation.
Submodules¶
Package Contents¶
- rotation_cost_calc(gate: R, placement: LevelGraph) float[source]¶
- class UnitaryVerifier(sequence: Sequence[Gate | R | Rz | VirtRz], target: Gate, dimensions: list[int], nodes: list[int] | None = None, initial_map: list[int] | None = None, final_map: list[int] | None = 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.
- decomposition¶
- target¶
- dimension¶
- apply_gate_to_tlines(gate_matrix: numpy.typing.NDArray[numpy.complex128], circuits_size: int = 2, targets: int | list[int] | None = None, dims: list[int] | None = None) numpy.typing.NDArray[numpy.complex128][source]¶
- gate_expand_to_circuit(gate: numpy.typing.NDArray[numpy.complex128], circuits_size: int, target: int, dims: Sequence[int] | None = None) numpy.typing.NDArray[numpy.complex128][source]¶