The popular quantum computing software development kit, Qiskit, now allows developers to build circuits using Fortran and C++ without relying on Python. This shift is enabled by Qiskit v2. 0’s exposed C API, which connects to a high-performance Rust core, and allows interoperability between languages. Explains IBM, as the new interfaces aim to integrate Qiskit into existing workflows for researchers already using these languages in fields like physics and chemistry.
Qiskit C API Enables HPC and Scientific Computing
Since Qiskit version 2. 0, developers can construct quantum circuits without using Python, using a newly exposed C application programming interface (API) connected to a high-performance Rust core. This shift allows integration with languages commonly used in high-performance computing and scientific applications, including Fortran, C++ and Julia, removing the need for a Python interpreter in existing workflows. The core’s architecture means that the same underlying data model powers both the Python SDK and these new language bindings, expanding accessibility for researchers.
A key benefit of this design is interoperability between languages; a circuit initially built in Fortran can, in principle, be passed directly to C++ for execution without modification. This smooth transfer is possible because all language bindings rely on the same Qiskit shared library, ensuring consistent operation across different programming environments.
According to IBM, this capability is vital because quantum computing’s advantages are realized when combined with classical resources, not as a separate entity. The team believes quantum computing will be a paradigm for scientific computing, and this integration is a step towards that goal. The QiskitIBMRuntime. jl package, a lightweight wrapper for the qiskit-ibm-runtime C client, further extends this functionality by enabling the submission of circuits to IBM Quantum hardware directly from Julia.
This allows researchers to run complete quantum workflows within the Julia ecosystem, benefiting from tools like DifferentialEquations. jl and Optimization. The Julia environment also provides resources for validating quantum results, including tensor network simulation tools such as ITensors. jl and TensorNetworkQuantumSimulator. jl.
This approach addresses a common challenge for classical applications researchers, who previously had to integrate a Python interpreter into their existing code to use Qiskit. “Experimenting with quantum computing shouldn’t force classical applications researchers to bolt a Python interpreter onto their existing code,” the team explains, emphasizing the importance of streamlining the integration process.
By offering native Qiskit code access, researchers can more easily explore the potential of quantum computing within their established workflows, regardless of the programming language they prefer. The availability of these interfaces aims to ensure that integrating Qiskit into hybrid quantum-classical workflows is straightforward, encouraging broader adoption and innovation.
Qiskit-Fortran Integrates with Existing Scientific Codes
The Qiskit software development kit now allows developers to construct quantum circuits using Fortran’s standard foreign-function interface, bypassing the need for a Python interpreter. This direct access to Qiskit’s core functionality is achieved through the C API exposed in version 2.0, connecting to a high-performance Rust core that underpins the entire SDK. Rather than requiring translation to Python, Fortran code can now directly interact with quantum circuits, streamlining integration with existing high-performance computing (HPC) workflows.
This approach addresses a long-standing challenge for researchers already invested in languages like Fortran, which remain central to many scientific domains. Decades of investment have cemented Fortran’s position within HPC and scientific computing, with core linear-algebra libraries like BLAS and LAPACK, alongside quantum-chemistry codes such as Gaussian and VASP, all implemented in the language.
Recognizing this, the developers of Qiskit created qiskit-fortran, a dedicated interface designed to fit smoothly into existing Fortran workflows, shaped by direct feedback from the Fortran developer community. The interface uses , allowing direct calls to the Qiskit C API without requiring developers to write custom bindings, and ultimately reaching the Rust core. A QuantumCircuit in qiskit-fortran is designed as a derived type with a FINAL destructor, ensuring efficient memory management as the circuit releases its resources when no longer in scope.
This native integration allows for direct memory access, exemplified by the ability to pass an FCIDUMP active-space Hamiltonian from GAMESS, already resident in Fortran memory, directly to a Qiskit circuit-construction routine as a pointer. Eliminating the need to copy data into Python objects or contend with the global interpreter lock (GIL) creates opportunities for tighter, more performant integration with established Fortran applications.
Detailed examples of these workflows are available in the qiskit-fortran tutorial.
Qiskit-CPP: Header-Only Interface for Performance-Critical Simulation
This approach bypasses the need for separate build processes, streamlining the incorporation of quantum algorithms into established simulation frameworks. The interface allows for direct memory access, enabling developers to work as native C++ objects, and freeing that memory automatically when the object is no longer in scope. The design of Qiskit-CPP uses the underlying Rust core powering the Python-based Qiskit SDK, meaning performance gains achieved in the Rust implementation are immediately available to C++ users.
The result is a quantum computing environment that can be smoothly integrated into applications already using languages like C++ for computationally intensive tasks, such as molecular dynamics simulations with software like LAMMPS and GROMACS. Beyond C++, the Qiskit C API also supports interoperability with Fortran and Julia, extending the reach of quantum algorithms to a wider range of scientific computing environments.
In Julia, the ecosystem offers tools like ITensors. jl and TensorNetworkQuantumSimulator. jl, which can validate quantum results against classical simulations. This is particularly valuable when simulating quantum dynamics on systems of up to 100 qubits, where classical methods begin to struggle with the exponential growth of computational requirements.
“As the dynamics build more entanglement than the tensor network can faithfully represent, its error compounds quickly and the simulation can no longer serve as a reliable reference,” explains the documentation, highlighting the advantage of quantum hardware for complex simulations. The ability to execute circuits through the qiskit-ibm-runtime C client, QRMI, or SQC provides flexibility in deployment, allowing developers to choose the execution environment best suited to their needs.
Qiskit.jl Offers a Native Julia Quantum Workflow
The Qiskit software development kit now enables Julia programmers to construct and execute without interfacing with Python code, a departure from its traditional implementation. Qiskit.jl, a package wrapping the Qiskit C API, exposes native Julia types, eliminating the need for manual memory management typically associated with C pointers during circuit construction. This approach mirrors Python’s syntax while also offering an idiomatic Julia style for developers preferring that language’s conventions.
A quantum call, through this system, becomes a linked subroutine within an existing simulation code, rather than a separate process requiring orchestration. The design allows Fortran, C++ and Julia to each access Qiskit’s Rust core through a direct native call, bypassing any interpreter overhead.
This direct connection enables developers to write custom components, such as novel ansatzes or problem-specific error-mitigation estimators, in the language already used for the majority of their code. The same principle applies across the supported languages; a circuit built in Fortran can, in theory, be passed to C++ and executed without issue, as all language bindings point to the same shared Qiskit library.
Trotterization for Quantum Dynamics Simulation in Julia
Simulating quantum dynamics with up to 100 qubits is now achievable within Julia, using the Qiskit C API to bypass the need for a Python interpreter and directly access a high-performance Rust core. jl and TensorNetworkQuantumSimulator. jl, providing an important benchmark for increasingly complex systems. The approach centers on Trotterization, a method of approximating quantum evolution by breaking it into discrete steps, and demonstrates its effectiveness by applying it to the Schrödinger equation, a fundamental equation describing quantum system evolution.
The utility of this method extends beyond simple validation. At scales exceeding 20 qubits, classical solutions become computationally intractable, and even noiseless tensor-network simulations falter as entanglement increases. The ability to perform these simulations within Julia streamlines the workflow, integrating quantum computations directly into existing classical codebases.
A key design element is the smooth interoperability between languages. The process culminates in extracting physical observables, like site magnetization, from the measured quantum bitstrings using standard Julia code within the same session. This integration allows for a complete quantum workflow, from circuit construction and hardware execution to result analysis, all within a single environment. At smaller scales, the quantum results are cross-validated against exact solutions from OrdinaryDiffEq. jl and noiseless tensor-network simulations, ensuring accuracy and reliability. This combined approach provides a robust framework for exploring quantum dynamics and pushing the boundaries of simulation capabilities.




See today’s quantum computing news on Quantum Zeitgeist for the latest breakthroughs in qubits, hardware, algorithms, and industry deals.
