qiskit/unroll/_jsonbackend.py
def u(self, arg, qubit, nested_scope=None):
        """Fundamental single-qubit gate.

        arg is 3-tuple of Node expression objects.
        qubit is (regname, idx) tuple.
        nested_scope is a list of dictionaries mapping expression variables
        to Node expression objects in order of increasing nesting depth.
        """
        if self.listen:
            if "U" not in self.basis:
                self.basis.append("U")
            qubit_indices = [self._qubit_order_internal.get(qubit)]
            self.circuit['instructions'].append({
                'name': "U",
                # TODO: keep these real for now, until a later time
                'params': [float(arg[0].real(nested_scope)),
                           float(arg[1].real(nested_scope)),
                           float(arg[2].real(nested_scope))],
                'texparams': [arg[0].latex(prec=8, nested_scope=nested_scope),
                              arg[1].latex(prec=8, nested_scope=nested_scope),
                              arg[2].latex(prec=8, nested_scope=nested_scope)],
                'qubits': qubit_indices
            })
            self._add_condition()
Fundamental single-qubit gate.

        arg is 3-tuple of Node expression objects.
        qubit is (regname, idx) tuple.
        nested_scope is a list of dictionaries mapping expression variables
        to Node expression objects in order of increasing nesting depth.
        
Fundamental single-qubit gate.
arg is 3-tuple of Node expression objects.
qubit is (regname, idx) tuple.
nested_scope is a list of dictionaries mapping expression variables
to Node expression objects in order of increasing nesting depth.
Fundamental single - qubit gate . arg is 3 - tuple of Node expression objects . qubit is ( regname idx ) tuple . nested_scope is a list of dictionaries mapping expression variables to Node expression objects in order of increasing nesting depth .
def u(self, arg, qubit, nested_scope=None):
        if self.listen:
            if "U" not in self.basis:
                self.basis.append("U")
            qubit_indices = [self._qubit_order_internal.get(qubit)]
            self.circuit['instructions'].append({
                'name': "U",
                'params': [float(arg[0].real(nested_scope)),
                           float(arg[1].real(nested_scope)),
                           float(arg[2].real(nested_scope))],
                'texparams': [arg[0].latex(prec=8, nested_scope=nested_scope),
                              arg[1].latex(prec=8, nested_scope=nested_scope),
                              arg[2].latex(prec=8, nested_scope=nested_scope)],
                'qubits': qubit_indices
            })
            self._add_condition()
def u ( self , arg , qubit , nested_scope = None ) : if self . listen : if "U" not in self . basis : self . basis . append ( "U" ) qubit_indices = [ self . _qubit_order_internal . get ( qubit ) ] self . circuit [ 'instructions' ] . append ( { 'name' : "U" , 'params' : [ float ( arg [ 0 ] . real ( nested_scope ) ) , float ( arg [ 1 ] . real ( nested_scope ) ) , float ( arg [ 2 ] . real ( nested_scope ) ) ] , 'texparams' : [ arg [ 0 ] . latex ( prec = 8 , nested_scope = nested_scope ) , arg [ 1 ] . latex ( prec = 8 , nested_scope = nested_scope ) , arg [ 2 ] . latex ( prec = 8 , nested_scope = nested_scope ) ] , 'qubits' : qubit_indices } ) self . _add_condition ( )
Fundamental single-qubit gate.
Fundamental single - qubit gate .
"""Fundamental single-qubit gate.

        arg is 3-tuple of Node expression objects.
        qubit is (regname, idx) tuple.
        nested_scope is a list of dictionaries mapping expression variables
        to Node expression objects in order of increasing nesting depth.
        """ # TODO: keep these real for now, until a later time
self
arg
qubit
nested_scope