Quromorphic.jl is a quantum neuromorphic model prototyping library written in Julia. It combines quantum computing principles with neuromorphic architectures, providing tools for designing, simulating, and evaluating hybrid quantum-neural systems. and is designed to scale efficiently for distributed computing environments.
-
Quromorphic.jl requires Julia 1.12 or later.
-
Clone this repository:
using Pkg
Pkg.add(url="https://github.com/Heterotic-Research/Quromorphic.jl")- Start Julia and instantiate the project:
julia> ] activate . julia> instantiate
Quromorphic ships with a Qiskit.jl frontend so you can define circuits using the familiar builder API and run them through the high-performance QSim back end.
using Quromorphic.QCirc
import Quromorphic.QSim
using Qiskit
qc = QuantumCircuit(2, 2)
qc.h(1)
qc.cx(1, 2)
qc.measure(1, 1)
qc.measure(2, 2)
result = simulate(qc)
println(result.measurements) # Dict with P(0), P(1) for each qubit
QSim.prstate(result.statevector) # Pretty-print the final amplitudes- Pass
method = :density_matrixtosimulateto run decoherence-aware workloads. - Provide an
initial_statevector or density matrix (e.g. fromQSim.statevector) to warm-start simulations.
From the command line, launch the same snippet directly:
julia --project=. -e 'using Quromorphic.QCirc, Quromorphic.QSim, Qiskit; qc = QuantumCircuit(2, 2); qc.h(1); qc.cx(1, 2); display(simulate(qc))'You can bypass the Qiskit frontend and manipulate state vectors or density matrices with the low-level QSim API when you need fine-grained control over simulation primitives.
using Quromorphic.QSim
ψ = QSim.statevector(3, 0) # |000⟩
QSim.h!(ψ, 1)
QSim.cnot!(ψ, 1, 2)
QSim.rz!(ψ, 3, π / 3)
probabilities = abs2.(ψ)For density-matrix workflows:
ρ = QSim.density_matrix(2, 0)
QSim.h!(ρ, 1)
QSim.cz!(ρ, 1, 2)
p0, p1 = QSim.measure_z(ρ, 2)Run the multi-thread scaling benchmarks with the project environment activated:
julia --project benchmarks/multithreading.jlThe driver spawns fresh Julia workers for each thread count listed in QSIM_THREAD_LIST (defaults to 1,2,4,8) and prints a table summarizing gate timings and throughput speedups. Tune the workload with these environment variables:
QSIM_STATE_QUBITS: state-vector qubit count (default7, limited to≤12to avoid huge dense matrices)QSIM_DENSITY_QUBITS: density-matrix qubit count (default6, limited to≤9)QSIM_BENCH_REPEATS: number of timing samples per gate (default5)QSIM_BENCH_EVALS: number of inner evaluations per sample (default1)QSIM_BENCH_SEED: RNG seed for reproducible inputs (default1234)
Example run at a higher thread sweep:
QSIM_THREAD_LIST=1,2,4,8,12 QSIM_STATE_QUBITS=8 julia --project benchmarks/multithreading.jl