IntermediateDataBlock#

qualtran.surface_code.IntermediateDataBlock

The intermediate data block uses a fixed code distance and routing overhead.

Inherits From: DataBlock

The intermediate data block lays \(n\) qubit batches in grid of shape (2, \(2n+2\)) where the data batches are lined in the first row with the second row being an ancilla region.

data_d

The code distance d for protecting the qubits in the data block.

n_steps_to_consume_a_magic_state

The 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_d cycles of error correction.

DataBlock imlpementation must override this method. This method is used by self.n_cycles to report the total number of cycles required.

Methods#

n_tiles

View source

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_qubits

The number of algorithm qubits to compute the number of tiles for.

Returns

__ne__

Check equality and either forward a NotImplemented or return the result negated.

__eq__

Method generated by attrs for class IntermediateDataBlock.