-
|
I am attempting to run the GHZ circuit code in https://docs.nvidia.com/cuda/cuquantum/latest/appliance/cusvaer.html, specifically #!/usr/bin/env python
import sys
from qiskit import QuantumCircuit, transpile
from cusvaer.backends import StatevectorSimulator
# import mpi4py here to call MPI_Init()
from mpi4py import MPI
def create_ghz_circuit(n_qubits):
ghz = QuantumCircuit(n_qubits)
ghz.h(0)
for qubit in range(n_qubits - 1):
ghz.cx(qubit, qubit + 1)
ghz.measure_all()
return ghz
n_qubits = int(sys.argv[2])
#n_qubits = 29
print(f"mpi4py: rank: {MPI.COMM_WORLD.Get_rank()}, size: {MPI.COMM_WORLD.Get_size()}")
circuit = create_ghz_circuit(n_qubits)
simulator = StatevectorSimulator()
simulator.set_options(precision='double')
circuit = transpile(circuit, simulator)
job = simulator.run(circuit, shots=1024)
result = job.result()
print(f"Result: rank: {result.mpi_rank}, size: {result.num_mpi_processes}")
if result.mpi_rank == 0:
print(result.get_counts())With the command What could possible be wrong in this setup? Guidance is appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 22 replies
-
|
Hi @rht, |
Beta Was this translation helpful? Give feedback.
-
|
I am getting this error while running on supercomputer. I need to check if 37 qubit simulation is possible or not: mpiexec -n 16 --bind-to none --map-by node --oversubscribe -x UCX_TLS=^cma --mca coll_hcoll_enable 0 -x OMPI_MCA_coll_hcoll_enable=0 cuquantum-benchmarks circuit --frontend qiskit --backend cusvaer --benchmark quantum_volume --nqubits 36 --precision single --ngpus 1 --cusvaer-global-index-bits 3,1 --cusvaer-p2p-device-bits 3 |
Beta Was this translation helpful? Give feedback.
I think the right network device is not used for UCX. Limiting the network devices may resolve the issue. Could you please try with the followings:
-x UCX_TLS=all -x UCX_NET_DEVICES=ens3,-x UCX_TLS=all -x UCX_NET_DEVICES=docker_gwbridge?Also, by adding
-x UCX_LOG_LEVEL=info, you will be able to see more logs for the network devices.