0
$\begingroup$

I have built a simple 2 qubit entanglement circuit and wanted to measure using a real quantum device. I ran the below command an dthe have an output that is not what I was expecting.

qiskit.providers.ibmq.least_busy

<function qiskit.providers.ibmq.least_busy(backends: List[Union[qiskit.providers.backend.Backend, qiskit.providers.basebackend.BaseBackend]], reservation_lookahead: Optional[int] = 60) -> Union[qiskit.providers.backend.Backend, qiskit.providers.basebackend.BaseBackend]>

Could you please here.

$\endgroup$

1 Answer 1

2
$\begingroup$

You need to add the parenthesis () like that:

qiskit.providers.ibmq.least_busy()

In python, calling a function with parentheses will execute the function and return its result. On the other hand, calling it without parentheses will return a reference to the function. For more information see here.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.