How to use the blueqat.qasmparser.QasmBuiltinGate function in blueqat

To help you get started, we’ve selected a few blueqat examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Blueqat / Blueqat / blueqat / qasmparser.py View on Github external
'z': QasmBuiltinGate('z', [], ['t']),
        'h': QasmBuiltinGate('h', [], ['t']),
        't': QasmBuiltinGate('t', [], ['t']),
        'tdg': QasmBuiltinGate('tdg', [], ['t']),
        's': QasmBuiltinGate('s', [], ['t']),
        'sdg': QasmBuiltinGate('sdg', [], ['t']),
        'cx': QasmBuiltinGate('cx', [], ['c', 't']),
        'cz': QasmBuiltinGate('cz', [], ['c', 't']),
        'cnot': QasmBuiltinGate('cnot', [], ['c', 't']),
        'rx': QasmBuiltinGate('rx', ['theta'], ['t']),
        'ry': QasmBuiltinGate('ry', ['theta'], ['t']),
        'rz': QasmBuiltinGate('rz', ['theta'], ['t']),
        'phase': QasmBuiltinGate('rz', ['theta'], ['t']),
        'u1': QasmBuiltinGate('u1', ['lambda'], ['t']),
        'u2': QasmBuiltinGate('u2', ['phi', 'lambda'], ['t']),
        'u3': QasmBuiltinGate('u3', ['theta', 'phi', 'lambda'], ['t']),
        'cu1': QasmBuiltinGate('cu1', ['lambda'], ['c', 't']),
        'cu2': QasmBuiltinGate('cu2', ['phi', 'lambda'], ['c', 't']),
        'cu3': QasmBuiltinGate('cu3', ['theta', 'phi', 'lambda'], ['c', 't']),
        'swap': QasmBuiltinGate('swap', [], ['c', 't']),
        'ccx': QasmBuiltinGate('ccx', [], ['c1', 'c2', 't']),
        'toffoli': QasmBuiltinGate('ccx', [], ['c1', 'c2', 't']),
        # TODO: These gates are not defined in qelib1, but defined in language specifications.
        'U': QasmBuiltinGate('u3', ['theta', 'phi', 'lambda'], ['t']),
        'CX': QasmBuiltinGate('cx', [], ['c', 't'])
    })
github Blueqat / Blueqat / blueqat / qasmparser.py View on Github external
gates.update({
        'x': QasmBuiltinGate('x', [], ['t']),
        'y': QasmBuiltinGate('y', [], ['t']),
        'z': QasmBuiltinGate('z', [], ['t']),
        'h': QasmBuiltinGate('h', [], ['t']),
        't': QasmBuiltinGate('t', [], ['t']),
        'tdg': QasmBuiltinGate('tdg', [], ['t']),
        's': QasmBuiltinGate('s', [], ['t']),
        'sdg': QasmBuiltinGate('sdg', [], ['t']),
        'cx': QasmBuiltinGate('cx', [], ['c', 't']),
        'cz': QasmBuiltinGate('cz', [], ['c', 't']),
        'cnot': QasmBuiltinGate('cnot', [], ['c', 't']),
        'rx': QasmBuiltinGate('rx', ['theta'], ['t']),
        'ry': QasmBuiltinGate('ry', ['theta'], ['t']),
        'rz': QasmBuiltinGate('rz', ['theta'], ['t']),
        'phase': QasmBuiltinGate('rz', ['theta'], ['t']),
        'u1': QasmBuiltinGate('u1', ['lambda'], ['t']),
        'u2': QasmBuiltinGate('u2', ['phi', 'lambda'], ['t']),
        'u3': QasmBuiltinGate('u3', ['theta', 'phi', 'lambda'], ['t']),
        'cu1': QasmBuiltinGate('cu1', ['lambda'], ['c', 't']),
        'cu2': QasmBuiltinGate('cu2', ['phi', 'lambda'], ['c', 't']),
        'cu3': QasmBuiltinGate('cu3', ['theta', 'phi', 'lambda'], ['c', 't']),
        'swap': QasmBuiltinGate('swap', [], ['c', 't']),
        'ccx': QasmBuiltinGate('ccx', [], ['c1', 'c2', 't']),
        'toffoli': QasmBuiltinGate('ccx', [], ['c1', 'c2', 't']),
        # TODO: These gates are not defined in qelib1, but defined in language specifications.
        'U': QasmBuiltinGate('u3', ['theta', 'phi', 'lambda'], ['t']),
        'CX': QasmBuiltinGate('cx', [], ['c', 't'])
    })
github Blueqat / Blueqat / blueqat / qasmparser.py View on Github external
'x': QasmBuiltinGate('x', [], ['t']),
        'y': QasmBuiltinGate('y', [], ['t']),
        'z': QasmBuiltinGate('z', [], ['t']),
        'h': QasmBuiltinGate('h', [], ['t']),
        't': QasmBuiltinGate('t', [], ['t']),
        'tdg': QasmBuiltinGate('tdg', [], ['t']),
        's': QasmBuiltinGate('s', [], ['t']),
        'sdg': QasmBuiltinGate('sdg', [], ['t']),
        'cx': QasmBuiltinGate('cx', [], ['c', 't']),
        'cz': QasmBuiltinGate('cz', [], ['c', 't']),
        'cnot': QasmBuiltinGate('cnot', [], ['c', 't']),
        'rx': QasmBuiltinGate('rx', ['theta'], ['t']),
        'ry': QasmBuiltinGate('ry', ['theta'], ['t']),
        'rz': QasmBuiltinGate('rz', ['theta'], ['t']),
        'phase': QasmBuiltinGate('rz', ['theta'], ['t']),
        'u1': QasmBuiltinGate('u1', ['lambda'], ['t']),
        'u2': QasmBuiltinGate('u2', ['phi', 'lambda'], ['t']),
        'u3': QasmBuiltinGate('u3', ['theta', 'phi', 'lambda'], ['t']),
        'cu1': QasmBuiltinGate('cu1', ['lambda'], ['c', 't']),
        'cu2': QasmBuiltinGate('cu2', ['phi', 'lambda'], ['c', 't']),
        'cu3': QasmBuiltinGate('cu3', ['theta', 'phi', 'lambda'], ['c', 't']),
        'swap': QasmBuiltinGate('swap', [], ['c', 't']),
        'ccx': QasmBuiltinGate('ccx', [], ['c1', 'c2', 't']),
        'toffoli': QasmBuiltinGate('ccx', [], ['c1', 'c2', 't']),
        # TODO: These gates are not defined in qelib1, but defined in language specifications.
        'U': QasmBuiltinGate('u3', ['theta', 'phi', 'lambda'], ['t']),
        'CX': QasmBuiltinGate('cx', [], ['c', 't'])
    })
github Blueqat / Blueqat / blueqat / qasmparser.py View on Github external
def load_qelib1(gates: Dict[str, QasmAbstractGate]) -> None:
    # TODO: Use circuit.GATE_SET.
    gates.update({
        'x': QasmBuiltinGate('x', [], ['t']),
        'y': QasmBuiltinGate('y', [], ['t']),
        'z': QasmBuiltinGate('z', [], ['t']),
        'h': QasmBuiltinGate('h', [], ['t']),
        't': QasmBuiltinGate('t', [], ['t']),
        'tdg': QasmBuiltinGate('tdg', [], ['t']),
        's': QasmBuiltinGate('s', [], ['t']),
        'sdg': QasmBuiltinGate('sdg', [], ['t']),
        'cx': QasmBuiltinGate('cx', [], ['c', 't']),
        'cz': QasmBuiltinGate('cz', [], ['c', 't']),
        'cnot': QasmBuiltinGate('cnot', [], ['c', 't']),
        'rx': QasmBuiltinGate('rx', ['theta'], ['t']),
        'ry': QasmBuiltinGate('ry', ['theta'], ['t']),
        'rz': QasmBuiltinGate('rz', ['theta'], ['t']),
        'phase': QasmBuiltinGate('rz', ['theta'], ['t']),
        'u1': QasmBuiltinGate('u1', ['lambda'], ['t']),
        'u2': QasmBuiltinGate('u2', ['phi', 'lambda'], ['t']),
        'u3': QasmBuiltinGate('u3', ['theta', 'phi', 'lambda'], ['t']),
        'cu1': QasmBuiltinGate('cu1', ['lambda'], ['c', 't']),
        'cu2': QasmBuiltinGate('cu2', ['phi', 'lambda'], ['c', 't']),
        'cu3': QasmBuiltinGate('cu3', ['theta', 'phi', 'lambda'], ['c', 't']),
        'swap': QasmBuiltinGate('swap', [], ['c', 't']),
        'ccx': QasmBuiltinGate('ccx', [], ['c1', 'c2', 't']),
github Blueqat / Blueqat / blueqat / qasmparser.py View on Github external
def load_qelib1(gates: Dict[str, QasmAbstractGate]) -> None:
    # TODO: Use circuit.GATE_SET.
    gates.update({
        'x': QasmBuiltinGate('x', [], ['t']),
        'y': QasmBuiltinGate('y', [], ['t']),
        'z': QasmBuiltinGate('z', [], ['t']),
        'h': QasmBuiltinGate('h', [], ['t']),
        't': QasmBuiltinGate('t', [], ['t']),
        'tdg': QasmBuiltinGate('tdg', [], ['t']),
        's': QasmBuiltinGate('s', [], ['t']),
        'sdg': QasmBuiltinGate('sdg', [], ['t']),
        'cx': QasmBuiltinGate('cx', [], ['c', 't']),
        'cz': QasmBuiltinGate('cz', [], ['c', 't']),
        'cnot': QasmBuiltinGate('cnot', [], ['c', 't']),
        'rx': QasmBuiltinGate('rx', ['theta'], ['t']),
        'ry': QasmBuiltinGate('ry', ['theta'], ['t']),
        'rz': QasmBuiltinGate('rz', ['theta'], ['t']),
        'phase': QasmBuiltinGate('rz', ['theta'], ['t']),
        'u1': QasmBuiltinGate('u1', ['lambda'], ['t']),
        'u2': QasmBuiltinGate('u2', ['phi', 'lambda'], ['t']),
        'u3': QasmBuiltinGate('u3', ['theta', 'phi', 'lambda'], ['t']),
        'cu1': QasmBuiltinGate('cu1', ['lambda'], ['c', 't']),
        'cu2': QasmBuiltinGate('cu2', ['phi', 'lambda'], ['c', 't']),
        'cu3': QasmBuiltinGate('cu3', ['theta', 'phi', 'lambda'], ['c', 't']),
        'swap': QasmBuiltinGate('swap', [], ['c', 't']),
        'ccx': QasmBuiltinGate('ccx', [], ['c1', 'c2', 't']),
        'toffoli': QasmBuiltinGate('ccx', [], ['c1', 'c2', 't']),
        # TODO: These gates are not defined in qelib1, but defined in language specifications.
        'U': QasmBuiltinGate('u3', ['theta', 'phi', 'lambda'], ['t']),
github Blueqat / Blueqat / blueqat / qasmparser.py View on Github external
def load_qelib1(gates: Dict[str, QasmAbstractGate]) -> None:
    # TODO: Use circuit.GATE_SET.
    gates.update({
        'x': QasmBuiltinGate('x', [], ['t']),
        'y': QasmBuiltinGate('y', [], ['t']),
        'z': QasmBuiltinGate('z', [], ['t']),
        'h': QasmBuiltinGate('h', [], ['t']),
        't': QasmBuiltinGate('t', [], ['t']),
        'tdg': QasmBuiltinGate('tdg', [], ['t']),
        's': QasmBuiltinGate('s', [], ['t']),
        'sdg': QasmBuiltinGate('sdg', [], ['t']),
        'cx': QasmBuiltinGate('cx', [], ['c', 't']),
        'cz': QasmBuiltinGate('cz', [], ['c', 't']),
        'cnot': QasmBuiltinGate('cnot', [], ['c', 't']),
        'rx': QasmBuiltinGate('rx', ['theta'], ['t']),
        'ry': QasmBuiltinGate('ry', ['theta'], ['t']),
        'rz': QasmBuiltinGate('rz', ['theta'], ['t']),
        'phase': QasmBuiltinGate('rz', ['theta'], ['t']),
        'u1': QasmBuiltinGate('u1', ['lambda'], ['t']),
        'u2': QasmBuiltinGate('u2', ['phi', 'lambda'], ['t']),
        'u3': QasmBuiltinGate('u3', ['theta', 'phi', 'lambda'], ['t']),
        'cu1': QasmBuiltinGate('cu1', ['lambda'], ['c', 't']),
        'cu2': QasmBuiltinGate('cu2', ['phi', 'lambda'], ['c', 't']),
        'cu3': QasmBuiltinGate('cu3', ['theta', 'phi', 'lambda'], ['c', 't']),
github Blueqat / Blueqat / blueqat / qasmparser.py View on Github external
'y': QasmBuiltinGate('y', [], ['t']),
        'z': QasmBuiltinGate('z', [], ['t']),
        'h': QasmBuiltinGate('h', [], ['t']),
        't': QasmBuiltinGate('t', [], ['t']),
        'tdg': QasmBuiltinGate('tdg', [], ['t']),
        's': QasmBuiltinGate('s', [], ['t']),
        'sdg': QasmBuiltinGate('sdg', [], ['t']),
        'cx': QasmBuiltinGate('cx', [], ['c', 't']),
        'cz': QasmBuiltinGate('cz', [], ['c', 't']),
        'cnot': QasmBuiltinGate('cnot', [], ['c', 't']),
        'rx': QasmBuiltinGate('rx', ['theta'], ['t']),
        'ry': QasmBuiltinGate('ry', ['theta'], ['t']),
        'rz': QasmBuiltinGate('rz', ['theta'], ['t']),
        'phase': QasmBuiltinGate('rz', ['theta'], ['t']),
        'u1': QasmBuiltinGate('u1', ['lambda'], ['t']),
        'u2': QasmBuiltinGate('u2', ['phi', 'lambda'], ['t']),
        'u3': QasmBuiltinGate('u3', ['theta', 'phi', 'lambda'], ['t']),
        'cu1': QasmBuiltinGate('cu1', ['lambda'], ['c', 't']),
        'cu2': QasmBuiltinGate('cu2', ['phi', 'lambda'], ['c', 't']),
        'cu3': QasmBuiltinGate('cu3', ['theta', 'phi', 'lambda'], ['c', 't']),
        'swap': QasmBuiltinGate('swap', [], ['c', 't']),
        'ccx': QasmBuiltinGate('ccx', [], ['c1', 'c2', 't']),
        'toffoli': QasmBuiltinGate('ccx', [], ['c1', 'c2', 't']),
        # TODO: These gates are not defined in qelib1, but defined in language specifications.
        'U': QasmBuiltinGate('u3', ['theta', 'phi', 'lambda'], ['t']),
        'CX': QasmBuiltinGate('cx', [], ['c', 't'])
    })
github Blueqat / Blueqat / blueqat / qasmparser.py View on Github external
def load_qelib1(gates: Dict[str, QasmAbstractGate]) -> None:
    # TODO: Use circuit.GATE_SET.
    gates.update({
        'x': QasmBuiltinGate('x', [], ['t']),
        'y': QasmBuiltinGate('y', [], ['t']),
        'z': QasmBuiltinGate('z', [], ['t']),
        'h': QasmBuiltinGate('h', [], ['t']),
        't': QasmBuiltinGate('t', [], ['t']),
        'tdg': QasmBuiltinGate('tdg', [], ['t']),
        's': QasmBuiltinGate('s', [], ['t']),
        'sdg': QasmBuiltinGate('sdg', [], ['t']),
        'cx': QasmBuiltinGate('cx', [], ['c', 't']),
        'cz': QasmBuiltinGate('cz', [], ['c', 't']),
        'cnot': QasmBuiltinGate('cnot', [], ['c', 't']),
        'rx': QasmBuiltinGate('rx', ['theta'], ['t']),
        'ry': QasmBuiltinGate('ry', ['theta'], ['t']),
        'rz': QasmBuiltinGate('rz', ['theta'], ['t']),
        'phase': QasmBuiltinGate('rz', ['theta'], ['t']),
        'u1': QasmBuiltinGate('u1', ['lambda'], ['t']),
        'u2': QasmBuiltinGate('u2', ['phi', 'lambda'], ['t']),
github Blueqat / Blueqat / blueqat / qasmparser.py View on Github external
def load_qelib1(gates: Dict[str, QasmAbstractGate]) -> None:
    # TODO: Use circuit.GATE_SET.
    gates.update({
        'x': QasmBuiltinGate('x', [], ['t']),
        'y': QasmBuiltinGate('y', [], ['t']),
        'z': QasmBuiltinGate('z', [], ['t']),
        'h': QasmBuiltinGate('h', [], ['t']),
        't': QasmBuiltinGate('t', [], ['t']),
        'tdg': QasmBuiltinGate('tdg', [], ['t']),
        's': QasmBuiltinGate('s', [], ['t']),
        'sdg': QasmBuiltinGate('sdg', [], ['t']),
        'cx': QasmBuiltinGate('cx', [], ['c', 't']),
        'cz': QasmBuiltinGate('cz', [], ['c', 't']),
        'cnot': QasmBuiltinGate('cnot', [], ['c', 't']),
        'rx': QasmBuiltinGate('rx', ['theta'], ['t']),
        'ry': QasmBuiltinGate('ry', ['theta'], ['t']),
        'rz': QasmBuiltinGate('rz', ['theta'], ['t']),
        'phase': QasmBuiltinGate('rz', ['theta'], ['t']),
        'u1': QasmBuiltinGate('u1', ['lambda'], ['t']),
        'u2': QasmBuiltinGate('u2', ['phi', 'lambda'], ['t']),
        'u3': QasmBuiltinGate('u3', ['theta', 'phi', 'lambda'], ['t']),
        'cu1': QasmBuiltinGate('cu1', ['lambda'], ['c', 't']),
        'cu2': QasmBuiltinGate('cu2', ['phi', 'lambda'], ['c', 't']),
        'cu3': QasmBuiltinGate('cu3', ['theta', 'phi', 'lambda'], ['c', 't']),
        'swap': QasmBuiltinGate('swap', [], ['c', 't']),
        'ccx': QasmBuiltinGate('ccx', [], ['c1', 'c2', 't']),
        'toffoli': QasmBuiltinGate('ccx', [], ['c1', 'c2', 't']),
        # TODO: These gates are not defined in qelib1, but defined in language specifications.
github Blueqat / Blueqat / blueqat / qasmparser.py View on Github external
'tdg': QasmBuiltinGate('tdg', [], ['t']),
        's': QasmBuiltinGate('s', [], ['t']),
        'sdg': QasmBuiltinGate('sdg', [], ['t']),
        'cx': QasmBuiltinGate('cx', [], ['c', 't']),
        'cz': QasmBuiltinGate('cz', [], ['c', 't']),
        'cnot': QasmBuiltinGate('cnot', [], ['c', 't']),
        'rx': QasmBuiltinGate('rx', ['theta'], ['t']),
        'ry': QasmBuiltinGate('ry', ['theta'], ['t']),
        'rz': QasmBuiltinGate('rz', ['theta'], ['t']),
        'phase': QasmBuiltinGate('rz', ['theta'], ['t']),
        'u1': QasmBuiltinGate('u1', ['lambda'], ['t']),
        'u2': QasmBuiltinGate('u2', ['phi', 'lambda'], ['t']),
        'u3': QasmBuiltinGate('u3', ['theta', 'phi', 'lambda'], ['t']),
        'cu1': QasmBuiltinGate('cu1', ['lambda'], ['c', 't']),
        'cu2': QasmBuiltinGate('cu2', ['phi', 'lambda'], ['c', 't']),
        'cu3': QasmBuiltinGate('cu3', ['theta', 'phi', 'lambda'], ['c', 't']),
        'swap': QasmBuiltinGate('swap', [], ['c', 't']),
        'ccx': QasmBuiltinGate('ccx', [], ['c1', 'c2', 't']),
        'toffoli': QasmBuiltinGate('ccx', [], ['c1', 'c2', 't']),
        # TODO: These gates are not defined in qelib1, but defined in language specifications.
        'U': QasmBuiltinGate('u3', ['theta', 'phi', 'lambda'], ['t']),
        'CX': QasmBuiltinGate('cx', [], ['c', 't'])
    })