Qiskit Practice
kibrahim757 66 questions

Qiskit v2.x mock exam

Select one answer per question. Submit to see the explanation.

Question 36 / 66
Consider the following code that creates a batch with specific time limits
from qiskit_ibm_runtime import Batch, SamplerV2 as Sampler

# Create a batch with 30 minute max_time
with Batch(backend=backend, max_time="30m") as batch:
    sampler = Sampler()
    
    # Submit first job immediately
    job1 = sampler.run([circuit1], shots=1000)
    print(f"Job1 submitted at: {datetime.now()}")
    
    # Wait 2 minutes before submitting second job
    time.sleep(120)
    job2 = sampler.run([circuit2], shots=1000)
    print(f"Job2 submitted at: {datetime.now()}")
    
    # Get results
    result1 = job1.result()
    result2 = job2.result()

Which statement is correct?