qbraid.transpiler.cirq_qasm.QasmGateStatement

class QasmGateStatement(qasm_gate, cirq_gate, num_params, num_args)[source]

Specifies how to convert a call to an OpenQASM gate to a list of cirq.GateOperation’s. Has the responsibility to validate the arguments and parameters of the call and to generate a list of corresponding cirq.GateOperation’s in the ‘on’ method.

Initializes a Qasm gate statement. :type qasm_gate: str :param qasm_gate: The symbol of the QASM gate. :type cirq_gate: Union[Gate, Callable[[List[float]], Gate]] :param cirq_gate: The gate class on the cirq side. :type num_params: int :param num_params: The number of params taken by this gate. :type num_args: int :param num_args: The number of qubits (used in validation) this gate takes.

__init__(qasm_gate, cirq_gate, num_params, num_args)[source]

Initializes a Qasm gate statement. :type qasm_gate: str :param qasm_gate: The symbol of the QASM gate. :type cirq_gate: Union[Gate, Callable[[List[float]], Gate]] :param cirq_gate: The gate class on the cirq side. :type num_params: int :param num_params: The number of params taken by this gate. :type num_args: int :param num_args: The number of qubits (used in validation) this gate takes.

Methods

__init__(qasm_gate, cirq_gate, num_params, ...)

Initializes a Qasm gate statement.

on(params, args, lineno)

rtype:

Iterable[Operation]