mqt.qudits.quantum_circuit.gate¶
Module Contents¶
- Parameter¶
- class Instruction(name: str)[source]¶
Bases:
abc.ABCHelper class that provides a standard way to create an ABC using inheritance.
- class Gate(circuit: QuantumCircuit, name: str, gate_type: GateTypes, target_qudits: list[int] | int, dimensions: list[int] | int, params: Parameter = None, control_set: ControlData | None = None, label: str | None = None, lev_a: int = 0, lev_b: int = 0, theta: float = 0.0, phi: float = 0.0, qasm_tag: str = '')[source]¶
Bases:
InstructionUnitary gate_matrix.
- dagger = False¶
- parent_circuit¶
- gate_type¶
- is_long_range¶
- qasm_tag = ''¶
- to_matrix(identities: int = 0) numpy.typing.NDArray[numpy.complex128][source]¶
Return a np.ndarray for the gate_matrix unitary parameters.
- Returns:
if the Gate subclass has a parameters definition.
- Return type:
np.ndarray
- Raises:
CircuitError – If a Gate subclass does not implement this method an exception will be raised when this base class method is called.