qca-compiler
Compile QCA circuit specifications into Qiskit circuits that use
only the native gate set {Rz, Rx, CZ}.
Built on the gate algebra established in QCA as a Native Quantum Platform:
H = Rz(pi/2) . Rx(pi/2) . Rz(pi/2)-- 3 native gatesS = Rz(pi/2)-- 1 native gateT = Rz(pi/4)-- 1 native gateCNOT = (I tensor H) . CZ . (I tensor H)-- 7 native gates
Install
pip install qca-compiler
CLI usage
qca-compile examples/bell.json -o bell.qasm --estimate
Input JSON format:
{ "n_qubits": 2, "gates": [ {"name": "H", "qubits": [0]}, {"name": "CNOT", "qubits": [0, 1]} ] }
Supported gates: H, S, T, X, Y, Z, CNOT, CZ, Rz(theta), Rx(theta).
Python API
from qca_compiler import parse, map_to_native, emit_qiskit, estimate
circ = parse("examples/bell.json") native = map_to_native(circ) qc = emit_qiskit(native) est = estimate(native)
Resource estimate
The estimate function reports:
- Native 1q and 2q gate counts
- Estimated circuit depth
- Predicted hardware fidelity based on IBM Eagle r3 error rates
Tests
pytest tests/ -v
License
Apache 2.0
Metadata
Release files for qca-compiler 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| qca_compiler-0.1.0.tar.gz | 6.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| qca_compiler-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.0 kB
Release files / qca_compiler-0.1.0.tar.gz
| Download URL | qca_compiler-0.1.0.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2f87b4c753c1d3674ff2179a4a9770109ffbf02b2c0a9ef66db4c00db97b84f1
|
|
BLAKE2b-256 checksum How to use checksums |
9e65649b6d99ab5b8c5dfdb3ea432909c6f94fc42e5685ae368b212f464531f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Release files / qca_compiler-0.1.0-py3-none-any.whl
| Download URL | qca_compiler-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3ea43608f1685ad16d29b438f94d9c7c078bf93fbeca5c151ea68b6a8b5a394c
|
|
BLAKE2b-256 checksum How to use checksums |
17ade61e38469e06cb83aa4ce3da132bb450d09bd6815e7303dcbd65ca597343
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|