SimpleDataBlock#
qualtran.surface_code.SimpleDataBlock
View source on GitHub
|
A simple data block that uses a fixed code distance and routing overhead.
Inherits From: DataBlock
qualtran.surface_code.SimpleDataBlock(
data_d, routing_overhead=attr_dict['routing_overhead'].default
)
The simple data block approximates the total tile usage by considering one tile per algorithm qubit plus a constant factor overhead presumed to be used for routing.
Note: the spreadsheet from the reference had a 50% overhead hardcoded for some of the cells using this quantity and variable (but set to 50% as default) for others.
References
Attributes
data_dThe code distance
dfor protecting the qubits in the data block.routing_overheadAs an approximation, assume some routing or auxiliary qubits proportional to the number of algorithm qubits.
n_steps_to_consume_a_magic_stateThe number of surface code steps to consume a magic state.
We must teleport in “magic states” to do non-Clifford operations on our algorithmic data qubits. The layout of the data block can limit the number magic states consumed per unit time.
One surface code step is
data_dcycles of error correction.DataBlock imlpementation must override this method. This method is used by
self.n_cyclesto report the total number of cycles required.
Methods#
n_tiles
n_tiles(
n_algo_qubits: int
) -> int
The number of surface code tiles used to store a given number of algorithm qubits.
We define an “algorithm qubit” to be a qubit used in the routing of algorithm-relevant quantum data in a bloq. A physical qubit is a physical system that can encode one qubit, albeit noisily. Specific to the surface code, we define a “tile” to be the minimal area of physical qubits necessary to encode one logical qubit to a particular code distance. A tile can store an algorithm qubit, can be used for ancillary purposes like routing, or can be left idle. A tile is usually a square grid of \(2d^2\) physical qubits.
DataBlock implementations must override this method. This method is used by
self.n_phys_qubits to report the total number of physical qubits.
Args
n_algo_qubitsThe number of algorithm qubits to compute the number of tiles for.
Returns
__ne__
__ne__(
other
)
Check equality and either forward a NotImplemented or return the result negated.
__eq__
__eq__(
other
)
Method generated by attrs for class SimpleDataBlock.
View source on GitHub