qiskit/wrapper/_wrapper.py
def compile(circuits, backend,
            config=None, basis_gates=None, coupling_map=None, initial_layout=None,
            shots=1024, max_credits=10, seed=None, qobj_id=None, hpc=None,
            skip_transpiler=False):
    """Compile a list of circuits into a qobj.

    Args:
        circuits (QuantumCircuit or list[QuantumCircuit]): circuits to compile
        backend (BaseBackend or str): a backend to compile for
        config (dict): dictionary of parameters (e.g. noise) used by runner
        basis_gates (str): comma-separated basis gate set to compile to
        coupling_map (list): coupling map (perhaps custom) to target in mapping
        initial_layout (list): initial layout of qubits in mapping
        shots (int): number of repetitions of each circuit, for sampling
        max_credits (int): maximum credits to use
        seed (int): random seed for simulators
        qobj_id (int): identifier for the generated qobj
        hpc (dict): HPC simulator parameters
        skip_transpiler (bool): skip most of the compile steps and produce qobj directly

    Returns:
        Qobj: the qobj to be run on the backends

    Raises:
        TranspilerError: in case of bad compile options, e.g. the hpc options.

    .. deprecated:: 0.6+
        After 0.6, compile will only take a backend object.
    """
    # pylint: disable=redefined-builtin
    if isinstance(backend, str):
        warnings.warn('compile() no longer takes backend string names.'
                      'Please pass backend objects, obtained via'
                      'IBMQ.get_backend() or Aer.get_backend().', DeprecationWarning)
        try:
            backend = Aer.get_backend(backend)
        except KeyError:
            backend = IBMQ.get_backend(backend)

    pass_manager = None  # default pass manager which executes predetermined passes
    # TODO (jay) why do we need to pass skip and not pass manager directly
    if skip_transpiler:  # empty pass manager which does nothing
        pass_manager = PassManager()

    qobj_standard = transpiler.compile(circuits, backend, config, basis_gates, coupling_map,
                                       initial_layout, shots, max_credits, seed, qobj_id, hpc,
                                       pass_manager)
    return qobj_standard
Compile a list of circuits into a qobj.

    Args:
        circuits (QuantumCircuit or list[QuantumCircuit]): circuits to compile
        backend (BaseBackend or str): a backend to compile for
        config (dict): dictionary of parameters (e.g. noise) used by runner
        basis_gates (str): comma-separated basis gate set to compile to
        coupling_map (list): coupling map (perhaps custom) to target in mapping
        initial_layout (list): initial layout of qubits in mapping
        shots (int): number of repetitions of each circuit, for sampling
        max_credits (int): maximum credits to use
        seed (int): random seed for simulators
        qobj_id (int): identifier for the generated qobj
        hpc (dict): HPC simulator parameters
        skip_transpiler (bool): skip most of the compile steps and produce qobj directly

    Returns:
        Qobj: the qobj to be run on the backends

    Raises:
        TranspilerError: in case of bad compile options, e.g. the hpc options.

    .. deprecated:: 0.6+
        After 0.6, compile will only take a backend object.
    
Compile a list of circuits into a qobj.
Compile a list of circuits into a qobj .
def compile(circuits, backend,
            config=None, basis_gates=None, coupling_map=None, initial_layout=None,
            shots=1024, max_credits=10, seed=None, qobj_id=None, hpc=None,
            skip_transpiler=False):
    if isinstance(backend, str):
        warnings.warn('compile() no longer takes backend string names.'
                      'Please pass backend objects, obtained via'
                      'IBMQ.get_backend() or Aer.get_backend().', DeprecationWarning)
        try:
            backend = Aer.get_backend(backend)
        except KeyError:
            backend = IBMQ.get_backend(backend)
    pass_manager = None  
    if skip_transpiler:  
        pass_manager = PassManager()
    qobj_standard = transpiler.compile(circuits, backend, config, basis_gates, coupling_map,
                                       initial_layout, shots, max_credits, seed, qobj_id, hpc,
                                       pass_manager)
    return qobj_standard
def compile ( circuits , backend , config = None , basis_gates = None , coupling_map = None , initial_layout = None , shots = 1024 , max_credits = 10 , seed = None , qobj_id = None , hpc = None , skip_transpiler = False ) : if isinstance ( backend , str ) : warnings . warn ( 'compile() no longer takes backend string names.' 'Please pass backend objects, obtained via' 'IBMQ.get_backend() or Aer.get_backend().' , DeprecationWarning ) try : backend = Aer . get_backend ( backend ) except KeyError : backend = IBMQ . get_backend ( backend ) pass_manager = None if skip_transpiler : pass_manager = PassManager ( ) qobj_standard = transpiler . compile ( circuits , backend , config , basis_gates , coupling_map , initial_layout , shots , max_credits , seed , qobj_id , hpc , pass_manager ) return qobj_standard
Compile a list of circuits into a qobj.
Compile a list of circuits into a qobj .
"""Compile a list of circuits into a qobj.

    Args:
        circuits (QuantumCircuit or list[QuantumCircuit]): circuits to compile
        backend (BaseBackend or str): a backend to compile for
        config (dict): dictionary of parameters (e.g. noise) used by runner
        basis_gates (str): comma-separated basis gate set to compile to
        coupling_map (list): coupling map (perhaps custom) to target in mapping
        initial_layout (list): initial layout of qubits in mapping
        shots (int): number of repetitions of each circuit, for sampling
        max_credits (int): maximum credits to use
        seed (int): random seed for simulators
        qobj_id (int): identifier for the generated qobj
        hpc (dict): HPC simulator parameters
        skip_transpiler (bool): skip most of the compile steps and produce qobj directly

    Returns:
        Qobj: the qobj to be run on the backends

    Raises:
        TranspilerError: in case of bad compile options, e.g. the hpc options.

    .. deprecated:: 0.6+
        After 0.6, compile will only take a backend object.
    """ # pylint: disable=redefined-builtin # default pass manager which executes predetermined passes # TODO (jay) why do we need to pass skip and not pass manager directly # empty pass manager which does nothing
the qobj to be run on the backends
the qobj to be run on the backends
Qobj
in case of bad compile options, e.g. the hpc options.
in case of bad compile options e . g . the hpc options .
TranspilerError
circuits
circuits to compile
circuits to compile
backend
a backend to compile for
a backend to compile for
config
dictionary of parameters  used by runner
dictionary of parameters used by runner
basis_gates
comma-separated basis gate set to compile to
comma - separated basis gate set to compile to
coupling_map
coupling map (perhaps custom) to target in mapping
coupling map ( perhaps custom ) to target in mapping
initial_layout
initial layout of qubits in mapping
initial layout of qubits in mapping
shots
number of repetitions of each circuit, for sampling
number of repetitions of each circuit for sampling
max_credits
maximum credits to use
maximum credits to use
seed
random seed for simulators
random seed for simulators
qobj_id
identifier for the generated qobj
identifier for the generated qobj
hpc
HPC simulator parameters
HPC simulator parameters
skip_transpiler
skip most of the compile steps and produce qobj directly
skip most of the compile steps and produce qobj directly