braket.circuits.compiler_directives module

class braket.circuits.compiler_directives.StartVerbatimBox[source]

Bases: CompilerDirective

Prevents the compiler from modifying any ensuing instructions until the appearance of a corresponding EndVerbatimBox.

Inits a CompilerDirective.

Parameters:

ascii_symbols (Sequence[str]) – ASCII string symbols for the compiler directiver. These are used when printing a diagram of circuits.

counterpart() CompilerDirective[source]

Returns the “opposite” counterpart to this compiler directive.

For example, the counterpart of a directive that starts a box is the directive that ends the box.

Returns:

CompilerDirective – The counterpart compiler directive

class braket.circuits.compiler_directives.EndVerbatimBox[source]

Bases: CompilerDirective

Marks the end of a portion of code following a StartVerbatimBox that prevents the enclosed instructions from being modified by the compiler.

Inits a CompilerDirective.

Parameters:

ascii_symbols (Sequence[str]) – ASCII string symbols for the compiler directiver. These are used when printing a diagram of circuits.

counterpart() CompilerDirective[source]

Returns the “opposite” counterpart to this compiler directive.

For example, the counterpart of a directive that starts a box is the directive that ends the box.

Returns:

CompilerDirective – The counterpart compiler directive