surface_sim.layouts#

Functions

rot_surface_code(distance[, ...])

Generates a rotated surface code layout.

rot_surface_codes(num_layouts, distance)

Returns a list of (square) rotated surface codes of the specified distance that are set up to be used in any logical circuit (i.e. they have all the implemented logical gate attributes).

rot_surface_code_rectangle(distance_x, ...)

Generates a rotated surface code layout.

rot_surface_code_rectangles(num_layouts, ...)

Returns a list of rotated surface codes of the specified distance that are set up to be used in any logical circuit (i.e. they have all the implemented logical gate attributes).

rot_surface_stability_rectangle(stab_type, ...)

Generates a rotated surface layout for stability experiments.

unrot_surface_code(distance[, ...])

Generates an unrotated surface code layout.

unrot_surface_code_rectangle(distance_x, ...)

Generates a rotated surface code layout.

unrot_surface_codes(num_layouts, distance)

Returns a list of unrotated surface codes of the specified distance that are set up to be used in any logical circuit (i.e. they have all the required logical gate attributes).

ssd_code([interaction_order, define_trans_gates])

Returns a layout for the Small Stellated Dodecahedron code.

repetition_code(stab_type, distance[, ...])

Generates a repetition code layout.

repetition_stability(num_stabs, stab_type[, ...])

Generates a repetition layout for stability experiments.

plot(ax, *layouts[, add_labels, ...])

Plots a layout.

set_coords(layout[, override])

Sets the coordinates of the nodes in the layout.

check_overlap_layouts(*layouts)

Checks if the given layouts share any qubits for when doing parallel logical computation with them.

check_code_definition(layout)

Checks if the QEC code defined in the layout satisfies the following properties:

overwrite_interaction_order(layout, schedule)

Overwrites (in place) any existing schedule in a layout with the specified one.

Classes

Layout(setup)

Layout class for a QEC code.