After submitting a job to the IBM Quantum channel, you can see an estimation for how much quantum time the job will take to run by using
job.usage_estimation. Alternatively, you can view this information on the IBM Quantum Platform user interface.
Quantum time is the duration, in seconds, a quantum system is committed to fulfilling a user request.
- This only applies to jobs that use primitives.
- This is not yet available on the IBM Qiskit Runtime on Cloud channel.
from qiskit import QuantumCircuit from qiskit_ibm_runtime import QiskitRuntimeService, Sampler service = QiskitRuntimeService() # Create a new circuit with two qubits (first argument) and two classical # bits (second argument) qc = QuantumCircuit(2, 2) # Add a Hadamard gate to qubit 0 qc.h(0) # Perform a controlled-X gate on qubit 1, controlled by qubit 0 qc.cx(0, 1) # Measure qubit 0 to cbit 0, and qubit 1 to cbit 1 qc.measure(0, 0) qc.measure(1, 1) # Run on the least-busy backend you have access to backend = service.least_busy(simulator=False,operational=True) # Create a Sampler object sampler = Sampler(backend) # Submit the circuit to the sampler job = sampler.run(qc) print(job.usage_estimation)
You can view the estimated usage (how much quantum time the job will take to run) in two places on IBM Quantum Platform:
- On the Jobs table (opens in a new tab) in the Usage column. From the Home page, click View all on the Recent jobs table. The Usage column shows the estimated usage for pending jobs, or actual usage for completed jobs.
- On the job's details page. From the Dashboard (opens in a new tab) or Jobs table (opens in a new tab), click the job ID to open the job details page. The estimated usage is shown in the Status Timeline.