Transversal Clifford logical circuit generator for color code.
Project description
Tranzor
WARNING: This project is a preliminary mock-up and has not been extensively tested, so it may encounter bugs.
Tranzor is a generator for transversal Clifford logical circuits using the color code.
Given a logical-level circuit represented in stim, tranzor compiles each qubit in the circuit
into a logical qubit encoded with the superdense color code, and each gate into a transversal gate
supported by the color code. A syndrome extraction round is explicitly represented using the I instruction
in the circuit.
Installation
pip install tranzor
Examples
S Gate
import stim
from tranzor import SuperDenseColorCode, compile_circuit
logical_circuit = stim.Circuit("""
QUBIT_COORDS(0, 0) 0
RX 0
TICK
I 0
TICK
S_DAG 0
TICK
I 0
TICK
S 0
TICK
I 0
TICK
MX 0
OBSERVABLE_INCLUDE(0) rec[-1]
""")
color_code = SuperDenseColorCode(d=3)
out = compile_circuit(logical_circuit, color_code)
compiles to the following Crumble circuit.
H and CNOT Gate
import stim
from tranzor import SuperDenseColorCode, compile_circuit
logical_circuit = stim.Circuit("""
QUBIT_COORDS(0, 0) 0
QUBIT_COORDS(1, 0) 1
RZ 0 1
TICK
H 0
TICK
I 0 1
TICK
CX 0 1
TICK
I 0 1
TICK
MZ 0 1
OBSERVABLE_INCLUDE(0) rec[-1] rec[-2]
""")
color_code = SuperDenseColorCode(d=3)
out = compile_circuit(logical_circuit, color_code)
compiles to the following Crumble circuit.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tranzor-0.1.0.tar.gz.
File metadata
- Download URL: tranzor-0.1.0.tar.gz
- Upload date:
- Size: 75.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16af17e15669a259e5a350558c7a42799a9b9113e4cc3a0537db7f7194543d9a
|
|
| MD5 |
d9edd047ce78a6c1c80979acfdaba852
|
|
| BLAKE2b-256 |
fb473124cee02c91c89163bf78428b0a3b1ed4dc08d64c88807103e0b7a9b0e1
|
File details
Details for the file tranzor-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tranzor-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
068dcbdddc068b555f001c6a6a5b310da1e2c65d7f137ff3d5096ea1f4979852
|
|
| MD5 |
4c1582f952ae3a117d034866338f2185
|
|
| BLAKE2b-256 |
018ed3d90ed0275e734acbc5e089066897f47aa5833fdd5bb982e724441bf064
|