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('local_statevector_simulator_jku')
# 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))
This project uses the Apache License Version 2.0 software license.