I'm trying to run quantum circuit simulations with Qiskit Aer using GPU acceleration (specifically an NVIDIA A100) in Google Colab Pro.
Here's a simplified example I'm running:
from qiskit import QuantumCircuit, transpile
from qiskit_aer import AerSimulator
qc = QuantumCircuit(2)
qc.h(0)
qc.cx(0, 1)
qc.save_statevector()
simulator = AerSimulator(method='statevector', device='GPU')
circ = transpile(qc, simulator)
result = simulator.run(circ).result()
state = result.get_statevector(0)
print(state)
This works when I use device='CPU'
, but when using device='GPU'
, I frequently get the error:
RuntimeError: Simulation device "GPU" is not supported on this system
I'm using Google Colab Pro with a confirmed A100 GPU available (!nvidia-smi
confirms this). I have installed Qiskit Aer with GPU support using:
!pip install qiskit-aer-gpu
Still, I often lose GPU access after reconnecting or restarting the runtime.
Questions:
- How can I ensure that Qiskit AerSimulator consistently uses the GPU (A100) in Google Colab?
- Are there any CUDA or system-level dependencies required beyond the pip package?
- Is there a reliable workaround for this GPU support issue in Colab?
Environment:
- Google Colab Pro
- GPU: NVIDIA A100
- Python: 3.11
- Qiskit: latest (August 2025)
Any insight or working configuration would be greatly appreciated!