I am running the IBMQiskit tutorial by referring to the site below.
The source itself has not changed anything.
https://github.com/qulacs/quantum-native-dojo/blob/933f701ecf07ee2d3360be2af70fe7a7c46926c1/notebooks/3.2_Qiskit_IBMQ.ipynb
I'm running it on Google colab, but after running it, I get an error in the following parts:
source code
Choose backend that was #leastbusy
backend_sim=backend_lb
# A quantum circuit qc is executed 4096 times at a designated backend (backend_sim).
result=execute(qc, backend_sim, shots=4096).result()
error message
TranspirerError: 'Number of qubits (2) incircuit 0 is greater than maximum (1) in the coupling_map'
I don't know how to resolve this error, could you tell me?
python quantum-computing
When I try it here, I get the same error.The backend_lb
is ibmq_armonk
.
>>backend_lb =least_busy(provider.backends(simulator=False, operational=True))
>>backend_lb
<IBMQBackend('ibmq_armonk') from IBMQ(hub='ibm-q', group='open', project='main')>
ibmq_armonk
has 1
, so the quantum gate coupling map
is as follows:
>>backend_lb.configuration().n_qubits
1
>>list (map(lambdax:x.coupling_map, backend_lb.configuration().gates))
[[[0]], [[0]], [[0]], [[0]]]
I can't calculate the number of 2 qubits...
TranspirerError: 'Number of qubits (2) incircuit 0 is greater than maximum (1) in the coupling_map'
Therefore, you must choose a backend with 2
or more qubits.
>>>list(map(lambdab:print('{:>20}:{:>2}'
.format(b.name(), b.configuration().n_qubits), provider.backends()))
ibmq_qasm_simulator —32
ibmqx2:5
ibmq_16_melbourne—14
ibmq_vigo —5
ibmq_ourense—5
ibmq_london —5
ibmq_burlington —5
ibmq_essex:5
ibmq_armonk:1
Other than ibmq_qasm_simulator
and ibmq_armonk
, there should be no problem.
© 2024 OneMinuteCode. All rights reserved.