CompactDataBlock#
qualtran.surface_code.CompactDataBlock
View source on GitHub
|
The compact data block uses a fixed code distance and one, long access hallway.
Inherits From: DataBlock
qualtran.surface_code.CompactDataBlock(
data_d
)
The compact data block lays \(n\) qubit batches in grid of shape (3, \(n/2\)) where the data batches are lined in the first and last row with the middle row being an ancilla region. This lowers the space footprint of the block at the cost of an increased number of cycles to consume a magic state.
References
Attributes
data_dThe code distance
dfor protecting the qubits in the data block.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 CompactDataBlock.
View source on GitHub