joelquantum - Quantum Programming Toolchain
joelquantum is the command-line tool for quantum circuit compilation, simulation, and hardware execution.
Installation
joelquantum is included with JOEL:
joelquantum --versionQuick Start
# Compile quantum circuit
joelquantum compile circuit.joel
# Simulate quantum circuit
joelquantum simulate circuit.joel --shots 1000
# Execute on quantum hardware
joelquantum execute circuit.joel --backend ibmCircuit Compilation
Compile quantum circuits:
# Compile quantum circuit
joelquantum compile circuit.joel
# Compile to Qiskit
joelquantum compile circuit.joel --target qiskit
# Compile to Cirq
joelquantum compile circuit.joel --target cirq
# Compile to Q#
joelquantum compile circuit.joel --target qsharp
# Compile with optimization
joelquantum compile circuit.joel --optimizeQuantum Simulation
Simulate quantum circuits:
# Simulate circuit
joelquantum simulate circuit.joel
# Simulate with shots
joelquantum simulate circuit.joel --shots 1000
# State vector simulation
joelquantum simulate circuit.joel --mode statevector
# Density matrix simulation
joelquantum simulate circuit.joel --mode density
# Simulate with noise
joelquantum simulate circuit.joel --noise noise_model.jsonHardware Execution
Execute on quantum hardware:
# Execute on IBM Quantum
joelquantum execute circuit.joel --backend ibm
# Execute on Google Quantum AI
joelquantum execute circuit.joel --backend cirq
# Execute on IonQ
joelquantum execute circuit.joel --backend ionq
# Execute with specific device
joelquantum execute circuit.joel --backend ibm --device ibmq_lima
# Execute with shots
joelquantum execute circuit.joel --backend ibm --shots 1024Backend Management
Manage quantum backends:
# List available backends
joelquantum backends list
# Show backend info
joelquantum backends info ibm
# Test backend connection
joelquantum backends test ibm
# Configure backend
joelquantum backends configure ibm --api-key <key>Circuit Analysis
Analyze quantum circuits:
# Show circuit depth
joelquantum analyze circuit.joel --depth
# Count gates
joelquantum analyze circuit.joel --gates
# Show circuit diagram
joelquantum visualize circuit.joel
# Export circuit diagram
joelquantum visualize circuit.joel --output circuit.pngQuantum Algorithms
Run quantum algorithms:
# Run Grover's algorithm
joelquantum algorithm grover --n-qubits 3
# Run Shor's algorithm
joelquantum algorithm shor --n 15
# Run QFT
joelquantum algorithm qft --n-qubits 4Examples
Compile and Simulate
# Compile circuit
joelquantum compile bell_state.joel
# Simulate
joelquantum simulate bell_state.joel --shots 1000Input (bell_state.joel):
[Compiled]
quantum_circuit bell_state() -> qubit[2] {
qubit[2] q = [|0⟩, |0⟩]
q[0] = H(q[0])
q[1] = CNOT(q[0], q[1])
return q
}Execute on Hardware
joelquantum execute circuit.joel --backend ibm --shots 1024Command Reference
Compilation Commands
joelquantum compile <file>- Compile quantum circuitjoelquantum compile <file> --target <target>- Compile to specific target
Simulation Commands
joelquantum simulate <file>- Simulate circuitjoelquantum simulate <file> --shots <n>- Simulate with shotsjoelquantum simulate <file> --mode <mode>- Simulation mode
Execution Commands
joelquantum execute <file> --backend <backend>- Execute on hardwarejoelquantum execute <file> --device <device>- Execute on specific device
Analysis Commands
joelquantum analyze <file>- Analyze circuitjoelquantum visualize <file>- Visualize circuit