Qdit is a Python package for working with qudit (d-dimensional quantum) systems. Built on top of Google's Cirq framework, it provides tools for quantum circuit generation, noise modeling, and randomized benchmarking.
git clone https://github.com/qnl/qdit.git
cd qdit
pip install -e .- Able to generate the complete set of n-qudit Clifford circuits
- Arbitrary single-qudit unitary decomposition into subspace rotations
- Generalized Pauli operators, qudit rotation gates, and other multi-qudit gates
- Efficient n-qudit Clifford circuit generation
- Randomized benchmarking for single and multi-qudit systems
- Native gate decomposition
- Randomized compiling for noise tailoring
- Measurement randomized compiling
- Transpiling cirq to qcal
Noise Models (work in progress)
- Amplitude damping channel for qutrits
- Depolarizing noise
- Trit-flip channel
from qdit.benchmarking import QuditBenchmarking
from cirq import Simulator
# Create a 2-qutrit benchmarking instance
rb = QuditBenchmarking(
num_qudits=2,
dimension=3,
sampler=Simulator()
)
# Generate and run benchmark circuits
circuits = rb.generate_benchmark_circuits(
depths=[5, 10, 15],
num_circuits=10
)
# Run noisy simulation
results = rb.simulate_benchmarking(
depths=[5, 10, 15],
noise_levels=[0.01, 0.05]
)Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.