deltakit.circuit.Circuit#
- class deltakit.circuit.Circuit(layers: GateLayer | NoiseLayer | Circuit | Detector | Observable | ShiftCoordinates | Iterable[GateLayer | NoiseLayer | Circuit | Detector | Observable | ShiftCoordinates] | None = None, iterations: int = 1)#
Bases:
Generic[T]The deltakit_circuit circuit class. The circuit is implemented as a mutable list of layers where each layer is a gate layer, a noise layer, an annotation or another circuit.
- Parameters:
layers (LayerT | Iterable[LayerT] | None, optional) – The layers to include in this circuit. Circuits are mutable so layers can be added to the circuit after construction. By default, None.
iterations (int, optional) – The number of times this circuit is run. If this circuit specifies a repeat block then iterations should be greater than 1. By default, 1.
Methods#
Append any layers to the end of this circuit. |
|
Apply gate noise according to the noise profile. |
|
Determine whether two circuits are approximately equal within a tolerance. |
|
Returns a stim.DetectorErrorModel describing the error process in the circuit. |
|
Get the equivalent Stim circuit from this deltakit_circuit circuit. |
|
All of the detectors in this circuit. |
|
Return the gates associated with each detector in this circuit, including nested circuits. |
|
Flatten a deltakit_circuit circuit to remove iteration blocks. |
|
Parse a Stim circuit into a deltakit_circuit circuit. |
|
All the gate layers in this circuit. |
|
All the noise layers in this circuit. |
|
Convert this circuit to a Stim circuit and append it to the end of the given circuit. |
|
Remove all noise layers from this circuit and make any noisy measurement gates noiseless. |
|
Reorder the detectors in this circuit according to the given key. |
|
Replace gates in the circuit with other gates. |
|
Transform this circuit's qubits and detectors according to the id mapping. |