1
$\begingroup$

I am running a 3-qubit simulation using ionq.simulator in azure-quantum. When I send the task, I get the result from one shot + probability distribution that includes all the possible 8 bitstrings. I am not interested in getting a probability distribution, just the result from 1 shot. This is a big problem when I try to do 29-qubit simulation, because I cannot even retrieve the results from Azure; the results are 12GB!

Here is the 3 qubit example:

from azure.quantum.qiskit import AzureQuantumProvider
from azure.quantum import Workspace
from qiskit import QuantumCircuit

workspace = Workspace(resource_id = "", location = "")
provider = AzureQuantumProvider(workspace)

circuit = QuantumCircuit(3, 3)
circuit.name = "Qiskit Sample - 3-qubit GHZ circuit"
circuit.h(0)
circuit.cx(0, 1)
circuit.cx(1, 2)
circuit.measure([0, 1, 2], [0, 1, 2])

device = provider.get_backend("ionq.simulator")
job = device.run(circuit, shots=1)
res = job.result()

The results are:

Result(backend_name='ionq.simulator', backend_version='1', qobj_id='Qiskit Sample - 3-qubit GHZ circuit', job_id='...', success=True, results=[ExperimentResult(shots=1, success=True, meas_level=2, data=ExperimentResultData(counts={'000': 1}, probabilities=defaultdict(<class 'int'>, {'000': 0.5, '111': 0.5})), header=QobjExperimentHeader(qiskit='True', name='Qiskit Sample - 3-qubit GHZ circuit', num_qubits='3', metadata={}, meas_map='[0, 1, 2]'))], date=None, status=None, header=None, error_data=None)

The troublesome element for me is probabilities=defaultdict(<class 'int'>, {'000': 0.5, '111': 0.5}) since it grows exponentially with system size for an arbitrary circuit.

Then, my question is, how do I avoid Azure computing the probability distribution? Which includes $2^n$ elements, with $n$ being the number of qubits.

$\endgroup$

1 Answer 1

1
$\begingroup$

This is currently unsupported scenario in Azure Quantum. Right now, you always get the complete job results back, which include the probability distribution.

(I forwarded your question to the dev team, I think it's an interesting use case to consider.)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.