Qiskit JKU Simulator Provider is superseded by JKQ DDSIM
The Qiskit JKU Simulator is superseded by JKQ DDSIM, which uses a reworked implementation of the underlying decision diagrams as well as pybind11 (instead of writing OpenQASM code to files). Existing code can be adapted with minimal changes (import statements and provider name), new code should use the JKQ DDSIM from start. Python wheels are available via PyPI as jkq.ddsim.
The Getting Started example listed below would need the following changes:
pip install qiskit-jku-provider
→pip install jkq.ddsim
from qiskit_jku_provider import JKUProvider
→from jkq import ddsim
JKU = JKUProvider()
→JKU = ddsim.JKQProvider()
- Optional, but recommended: Rename variables containing
jku
to containjkq
instead.
This module contains the Qiskit JKU Simulator Provider, which gives access to the JKU Simulator as a backend. Together, they form a provider/backend pair in the Qiskit backend interface framework.
The JKU Simulator improves the runtime and memory consumption of classically simulated quantum circuits with redundant quantum states by using specially designed decision-diagram data structures. The JKU simulator was written by Alwin Zulehner and Robert Wille from Johannes Kepler Universität Linz.
Install Qiskit and this module with pip, the package installer for Python:
pip install qiskit
pip install qiskit-jku-provider
pip will handle all dependencies automatically.
After installing qiskit
and qiskit-jku-provider
, the simulator can be used as demonstrated below.
# Import tools
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister, execute
from qiskit_jku_provider import JKUProvider
# Create an instance of the JKU Provider
JKU = JKUProvider()
# Create a quantum circuit
qr = QuantumRegister(2)
cr = ClassicalRegister(2)
qc = QuantumCircuit(qr, cr)
# Add quantum gates
qc.h(qr[0])
qc.cx(qr[0], qr[1])
qc.measure(qr, cr)
# Get the JKU backend from the JKU provider
jku_backend = JKU.get_backend('qasm_simulator')
# Simulate the circuit with the JKU Simulator
job = execute(qc, backend=jku_backend)
# Retrieve and display the results
result = job.result()
print(result.get_counts(qc))
If you'd like to contribute to the JKU simulator, please take a look at our contribution guidelines. This project adheres to Qiskit's code of conduct. By participating, you are expect to uphold to this code.
We use GitHub issues for tracking requests and bugs. Please use our slack for discussion and simple questions. To join our Slack community use the link. For questions that are more suited for a forum we use the Qiskit tag in the Stack Exchange.
Beyond running the JKU simulator, you may want to experiment and compare with other Qiskit simulators. You'll find the repository of different simulators at Qiskit-Aer, or start with the Qiskit-Aer tutorials. Once you get the feel, you are welcome to contribute and make the JKU simulator even better. Or you can provide your own simulator and let others examine and contribute to it. For this, see creating a new provider.
The JKU simulator was created by Alwin Zulehner and Robert Wille from the Johannes Kepler University in Linz, Austria. See JKU Quantum for more information on the team, or the full TCAD paper (bibtex) for a presentation of the underlying concepts and algorithm.
The adaptation of the JKU simulator to Qiskit was done by Gadi Aleksandrowicz. If you use parts of Qiskit, please cite as per the included BibTeX file.