Context
CircuitBuilder::barrier() / Gate::barrier() are exposed and serialize a {"type": "barrier"} gate, but bin/python/circuit.py skips it (pass). Braket has no native barrier gate. The methods are currently marked with a @todo.
Options
- Implement as a compiler fence via
Circuit.add_verbatim_box() (the real Braket equivalent). Note this changes semantics — verbatim boxes prevent compilation/optimization across the boundary and have device-support constraints.
- Document explicitly as a logical/no-op separator (visualization aid only) and keep the no-op.
- Remove until a backend supports it.
Acceptance
- Decide on one of the above.
- Behaviour matches the docblock and README (README currently notes "not yet executed on any backend").
- If implemented: tests asserting the verbatim box is emitted; if removed: API + tests + docs cleaned up.
Context
CircuitBuilder::barrier()/Gate::barrier()are exposed and serialize a{"type": "barrier"}gate, butbin/python/circuit.pyskips it (pass). Braket has no native barrier gate. The methods are currently marked with a@todo.Options
Circuit.add_verbatim_box()(the real Braket equivalent). Note this changes semantics — verbatim boxes prevent compilation/optimization across the boundary and have device-support constraints.Acceptance