Skip to content

Submit Qiskit to Local Neutral Atom Simulator#3026

Open
ScottCarda-MS wants to merge 6 commits intomainfrom
sccarda/QiskitNeutralAtomSim
Open

Submit Qiskit to Local Neutral Atom Simulator#3026
ScottCarda-MS wants to merge 6 commits intomainfrom
sccarda/QiskitNeutralAtomSim

Conversation

@ScottCarda-MS
Copy link
Contributor

@ScottCarda-MS ScottCarda-MS commented Mar 17, 2026

Adds a NeutralAtomBackend to the interop layer of the qsharp package and surfaces that backend via the simulator namespace of the qdk package. The backend opperates off of an added NeutralAtomTarget Qiskit target.
This Qiskit backend lets users run Qiskit jobs on their local Neutral Atom simulator, allowing them to simulator noisy jobs with Qiskit.

Here is an example using the new backend:

from qiskit import QuantumCircuit, transpile
from qiskit.visualization import plot_histogram
from qdk.simulation import NeutralAtomBackend, NoiseConfig

# Create a Quantum circuit that acts on the q register
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])

# Create the backend
local_backend = NeutralAtomBackend()

# Transpile to native gates
native_circuit = transpile(circuit, backend=local_backend)
print(native_circuit.draw())  # will show only rz, sx, cz gates

# Configure loss noise — high probability so we reliably see loss in results
noise = NoiseConfig()
noise.rz.loss = 0.08  # 8% chance of qubit loss on each Rz gate

# Run with skip_transpilation=True since we've already transpiled.
job = local_backend.run(native_circuit, shots=1000, noise=noise, seed=42, skip_transpilation=True)
result = job.result()

data = result.results[0].data

# Qiskit-compatible view: loss shots filtered out
print("Accepted counts (no loss):", data.counts)
print("Accepted memory:", data.memory[:10], "...")

# Raw view: all shots, including those with loss markers ("-")
print("\nRaw counts (includes loss):", data.raw_counts)
print("Raw memory sample:", data.raw_memory[:10], "...")

print(f"\nAccepted shots: {len(data.memory)} / {len(data.raw_memory)} total")

plot_histogram(data.counts, title="Accepted shots (loss excluded)")```
 

@ScottCarda-MS ScottCarda-MS changed the title Sccarda/qiskit neutral atom sim Submit Qiskit to Local Neutral Atom Simulator Mar 17, 2026
@ScottCarda-MS ScottCarda-MS marked this pull request as ready for review March 17, 2026 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant