A tensor network based approach to synthesise arbitrary single-qubit unitaries from
extended universal gate sets. Concretely, here we provide the gate set composed of Clifford,
From the root of the project install via pip
pip install -e .For GPU acceleration use
pip install -e ".[cupy-cuda13]" # or [cupy-cuda11] depending on CUDA versionThe CUDA Toolkit version can be found using nvcc --version.
To synthesise a single qubit unitary using Partitioner creates a
a sequence of partitionings of the total cost allowance (if required) into smaller parts so that any
possible sequence of
from synch.src.synthesis import ErgodicPartitioner, Synthesiser
from synch.src.utils import random_unitary_2x2
partitioner = ErgodicPartitioner(
max_partition_value=8,
total_non_clifford_budget=10,
costs={"t": 1.0, "q": 2.5}, # q represents sqrtT
)
synthesiser = Synthesiser(partitioner=partitioner)
target_unitary = random_unitary_2x2()
result = synthesiser.sample_and_synthesize(target_unitary)
error = result.error
sequence_str = result.seqstr