Skip to content

'IBMQBackend' object has no attribute 'transpile' #2

@rockingcubes

Description

@rockingcubes

I tried to use your notebook file "tutorial_aqcel". When I run all cell, the code below

aqcel_results_cc = icepp.pass_manager(test, level=2, backend=backend, backend_tket=dev_b, shots=1024, measure_type='cc').auto_manager()

gives the error mentioned below

-----> 'IBMQBackend' object has no attribute 'transpile'

Seems like there is a problem in the source code

`def transpile(self):

    if self.level != 0:
        qc = transpile(self.qc, basis_gates=['id','x','sx','rz','cx','reset'])
        tket_qc = qiskit_to_tk(qc)
        # self.backend_tket.compile_circuit(tket_qc, optimisation_level=2)
        self.aer_compiler.compile_circuit(tket_qc, optimisation_level=2)
        
        qc = tk_to_qiskit(tket_qc)
    else:
        qc = self.qc
    
    transpiled_qc = transpile(circuits=qc, backend=self.backend, basis_gates=None, seed_transpiler=1, optimization_level=self.level)
    
    return transpiled_qc`

line self.backend_tket.compile_circuit(tket_qc, optimisation_level=2) gives the above mentioned error. Can you help to resolve the issue?

My qiskit version is

{'qiskit-terra': '0.18.3', 'qiskit-aer': '0.9.1', 'qiskit-ignis': '0.6.0', 'qiskit-ibmq-provider': '0.18.1', 'qiskit-aqua': '0.9.5', 'qiskit': '0.32.1', 'qiskit-nature': None, 'qiskit-finance': None, 'qiskit-optimization': None, 'qiskit-machine-learning': None}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions