Image formation in transmission electron microscopy (TEM) is governed by the coherent evolution of the electron wavefunction through the specimen and the objective lens. This physics maps naturally onto the gate model of quantum computation. We present QuScope, an open-source Python framework that expresses the complete TEM image-formation pipeline as quantum circuits. The $N\times N$ electron wavefunction is amplitude-encoded in $2\log_2 N$ qubits, and every optical element, including phase-grating transmission, Fresnel propagation between specimen slices, and the aberrated objective lens, is implemented as a diagonal unitary conjugated by quantum Fourier transforms. On this foundation, QuScope v0.2.0 implements validated imaging pipelines, covering conventional TEM under the phase-object approximation, full multislice CTEM and STEM for thick specimens. All quantum results reported here come from exact, noise-free statevector simulation of the circuits on classical hardware, and every result is validated against a classical twin implementation. Quantum and classical multislice exit waves agree to unit fidelity, and all physical constants are verified against standard references. We provide transpiled quantum-resource estimates for each algorithm, an analysis of the diagonal-synthesis bottleneck that governs near-term hardware execution, and a fully tested, documented, and pip-installable package. QuScope v0.2.0 is available at https://github.com/QuScope/QuScope.
Comments
v2 - fixes CTF plot. Open-source Python framework for quantum-circuit formulations of CTEM and STEM simulation. Code, documentation, and reproducible examples are available at https://github.com/QuScope/QuScope
Image formation in transmission electron microscopy (TEM) is governed by the coherent evolution of the electron wavefunction through the specimen and the objective lens. This physics maps naturally onto the gate model of quantum computation. We present QuScope, an open-source Python framework that expresses the complete TEM image-formation pipeline as quantum circuits. The N×N electron wavefunction is amplitude-encoded in 2log2N qubits, and every optical element, including phase-grating transmission, Fresnel propagation between specimen slices, and the aberrated objective lens, is implemented as a diagonal unitary conjugated by quantum Fourier transforms. On this foundation, QuScope v0.2.0 implements validated imaging pipelines, covering conventional TEM under the phase-object approximation, full multislice CTEM and STEM for thick specimens. All quantum results reported here come from exact, noise-free statevector simulation of the circuits on classical hardware, and every result is validated against a classical twin implementation. Quantum and classical multislice exit waves agree to unit fidelity, and all physical constants are verified against standard references. We provide transpiled quantum-resource estimates for each algorithm, an analysis of the diagonal-synthesis bottleneck that governs near-term hardware execution, and a fully tested, documented, and pip-installable package. QuScope v0.2.0 is available at https://github.com/QuScope/QuScope.
We present a quantum algorithmic framework for simulating phase-contrast transmission electron microscopy (CTEM) image formation using a fault-tolerant, gate-based quantum circuit model. The electron wavefield on an N×N grid is amplitude-encoded into a 2log2N-qubit register. Free-space propagation and objective-lens aberrations are implemented via two-dimensional quantum Fourier transforms (QFTs) and diagonal phase operators in reciprocal space, while specimen interaction is modeled under the weak phase object approximation (WPOA) as a position-dependent phase grating. We validate projected potentials, contrast transfer function (CTF) behavior, and image contrast trends against classical multislice simulations for MoS2 over experimentally relevant parameters, and provide resource estimates and key assumptions that determine end-to-end runtime. While extracting complete N×N intensity images requires O(N2/ε2) measurements that preclude advantage for full-image reconstruction, the framework enables quantum advantage for tasks requiring Fourier-space queries, global image statistics, or phase-coherent observables inaccessible to classical intensity-only detection. This framework provides a physics-grounded mapping from CTEM theory to quantum circuits and establishes a baseline for extending toward full multislice and inelastic scattering models.
Transmission electron microscopy (TEM) routinely achieves sub-Ångström resolution for imaging atomic structures in materials. Accurate simulations are essential for quantitative microscopy, supporting interpretation of high-resolution phase contrast and multidimensional S/TEM modalities. Classical multislice simulations [1] scale as O(N2log N) per slice on an N × N grid, becoming costly for large fields of view, thick specimens, and systematic parameter sweeps, motivating quantum approaches. We present a quantum algorithmic framework for CTEM image formation using fault-tolerant quantum circuits. Our approach amplitude-encodes the electron wavefield on an N × N grid into a 2log2N-qubit register [2] (Fig. 1a). Free-space propagation and lens aberrations use quantum Fourier transforms (QFTs) and diagonal phase operators, while specimen interaction is modeled under the weak phase object approximation (WPOA) as a diagonal unitary Uobj. The quantum circuit (Fig. 1b) maps each CTEM stage to unitary gates. We validate against classical simulations using abTEM package [3] for MoS2 on a 128 × 128 grid at 80 kV. Fig. 1c-f shows exact agreement at Δf = -80 nm and -10 nm with C3 = 1.3 mm, achieving ρ = 1.000000 and MSE ~10-24. Quantum-computed CTFs match analytical expressions across 80-300 kV, and projected potentials agree with abTEM references to within a few percent. A 256 × 256 circuit requires 58 logical qubits and ~6 × 105 T-gates [4] with polylogarithmic scaling for fixed structures. For the MoS2 benchmark (18 atoms), gate counts increase only 35% from 4 × 4 to 1024 × 1024 grids. However, full N × N image reconstruction requires O(N2/ε2) shots, reaching ~1010 evaluations for 1024 × 1024 images at 1% precision, precluding advantage over GPU-based codes. Quantum advantage lies in three complementary regimes that avoid exhaustive pixel readout: (i) Fourier-space observables - estimating specific structure factors, Bragg peak intensities, or diffraction pattern moments via partial measurement in the QFT basis, requiring O(1) to O(polylog N) samples rather than O(N2); (ii) phase-coherent discriminators - exploiting ancilla-assisted protocols to distinguish structures with classically degenerate intensity signatures by probing the full complex wavefunction ψ = Aeiφ rather than intensity |ψ|2 alone; (iii) extended physics beyond WPOA – simulating inelastic scattering, dynamical diffraction, and many-body correlation effects that scale exponentially for classical tensor-network methods but remain polynomial in system size for quantum circuits. As an additional benchmark, we implemented a 4 × 4 instance of the CTEM circuit on the ibm_torino superconducting quantum processor [5], achieving a classical fidelity of 0.9984 between hardware and ideal simulations after 4096 shots. Figure 2a shows the input projected potential, Fig. 2b the ideal statevector probability distribution, Fig. 2c the measured distribution on IBM hardware, and Fig. 2d the difference map showing sub-1% deviations, demonstrating that small-scale CTEM circuits are already within reach of current NISQ platforms. To demonstrate phase-coherent discrimination, Fig. 2e shows ancilla Y-basis expectation values ⟨Ya⟩ for conjugate ±V phase objects and independent random potentials, while Fig. 2f shows the phase-discrimination signal Δ⟨Ya⟩ = ⟨Ya⟩(+V) – ⟨Ya⟩(–V), achieving robust separation of sign-flipped weak phase objects that produce identical classical intensity images. This framework [7,8] establishes a complete, physics-grounded mapping from established CTEM theory to fault-tolerant quantum circuits with explicit arithmetic circuit constructions for specimen potentials, extending beyond prior oracle-based proposals [6] to gate-level synthesis validated against classical codes. While near-term quantum advantage for full CTEM image reconstruction remains unlikely due to the measurement bottleneck, the framework provides a rigorous baseline for extending toward computationally hard regimes where classical methods struggle, including thick specimens requiring many slices, real-time parameter optimization over high-dimensional microscope settings, and correlation effects in quantum materials [9]. (a) CTEM column and quantum circuit mapping. (b) 4-qubit circuit implementation. (c–f) Quantum vs. classical simulations for 128 × 128 MoS2 at Δf = −80 nm and −10 nm with C3 = 1.3 mm, 80 kV (ρ = 1.000000, MSE ~10−24). Phase discrimination protocol. (a–d) 4 × 4 grid: input potential, ideal and IBM Torino distributions, difference map. (e–f) Ancilla ⟨Ya⟩ values showing robust ±V separation.
We introduce SpinPulse, an open-source python package for simulating spin qubit-based quantum computers at the pulse-level. SpinPulse models the specific physics of spin qubits, particularly through the inclusion of classical non-Markovian noise. This enables realistic simulations of native gates and quantum circuits, in order to support hardware development. In SpinPulse, a quantum circuit is first transpiled into the native gate set of our model and then converted to a pulse sequence. This pulse sequence is subsequently integrated numerically in the presence of a simulated noisy experimental environment. We showcase workflows including transpilation, pulse-level compilation, hardware benchmarking, quantum error mitigation, and large-scale simulations via integration with the tensor-network library quimb. We expect SpinPulse to be a valuable open-source tool for the quantum computing community, fostering efforts to devise high-fidelity quantum circuits and improved strategies for quantum error mitigation and correction.
The multislice method is an important algorithm for electron diffraction and image simulations in transmission electron microscopy (TEM). We have proposed a quantum algorithm of the multislice method based on quantum circuit model previously. In this work, we have developed an improved quantum algorithm. We reconstruct the phase-shifting quantum circuit without using the multi-controlled quantum gates, thereby significantly improve the computation efficiency. The improved quantum circuit also allows further gate count reduction at the cost of a controllable error. We have simulated the quantum circuit on a classical supercomputer and analyzed the result to prove the feasibility and correctness of the improved quantum algorithm. We also provide proper parameter settings through testing, allowing the minimization of the necessary number of quantum gates while limiting the relative error within 1%. This work demonstrates the potential of applying quantum computing to electron diffraction simulations and achieving quantum advantages.
We introduce QFlux, an open-source Python package for simulating quantum dynamics in chemical systems across multiple levels of theory using a unified classical and quantum computational framework. QFlux integrates deterministic wavefunction propagation, Lindblad master equations, generalized quantum master equations (GQMEs), operator-splitting techniques, and variational quantum algorithms within a modular architecture designed for systematic benchmarking and hybrid classical-quantum execution. The framework supports both closed-and open-system dynamics, including Markovian and non-Markovian regimes, and provides explicit mappings between classical propagators and quantum circuit constructions executable on NISQ hardware. Built atop established scientific and quantum software ecosystems, QFlux emphasizes reproducibility, interoperability, and controlled cross-validation between numerical approximations and hardware-oriented algorithms. Part I in this series of papers presents the theoretical foundations, software design principles, and methodological scope of QFlux, and positions it within the broader landscape of classical, tensor-network, and quantum-circuit-based simulation platforms. The series is designed to serve as a teaching reference for graduate students, a practical guide for researchers implementing custom quantum simulations, and a foundational reference for the broader QFlux ecosystem.
We present qlbm , a Python software package designed to facilitate the development, simulation, and analysis of Quantum Lattice Boltzmann Methods (QBMs). qlbm is a modular framework that introduces a quantum component abstraction hierarchy tailored to the implementation of novel QBMs. The framework interfaces with state-of-the-art quantum software infrastructure to enable efficient simulation and validation pipelines, and leverages novel execution and pre-processing techniques that significantly reduce the computational resources required to develop quantum circuits. We demonstrate the versatility of the software by showcasing multiple QBMs in 2D and 3D with complex boundary conditions, integrated within automated benchmarking utilities. Accompanying the source code are extensive test suites, thorough online documentation resources, analysis tools, visualization methods, and demos that aim to increase the accessibility of QBMs while encouraging reproducibility and collaboration. Program summary Program Title: qlbm CPC Library link to program files: https://doi.org/10.17632/28hkvsg7p2.1 Developer's repository link: https://github.com/QCFD-Lab/qlbm Licensing provisions: MPL-2.0 Programming language: Python3 Supplementary material: The documentation of is available at https://qcfd-lab.github.io/qlbm/ . Nature of problem: The advent of quantum algorithms for computational fluid dynamics brings with it challenges that are new to the established field of computational physics. These challenges include the lack of standardized implementations of the still nascent quantum methods, the intense computational demands of developing and simulating quantum algorithms on hardware available today, and the absence of tools that integrate novel developments into established infrastructure. Because of these current limitations, physicists and mathematicians expend superfluous resources on tasks that more mature computational physics branches have surmounted long ago. Solution method: QLBM is a software package that provides an end-to-end development environment for quantum lattice Boltzmann methods. The modular design and flexible quantum circuit library provide a base for extending and generalizing quantum algorithms. Performance enhancements exploit the paradigm of quantum computing simulations to accelerate the speed at which researchers can verify the validity of their methods. Its integration with state-of-the-art quantum computing software and visualization tools increases the algorithms' accesibility. These features allow QLBM to effectively generate, simulate, and analyze quantum circuits for 2D and 3D computational fluid dynamics problems.