Circuit#
-
class cuquantum.
stabilizer. Circuit( - circuit: str | stim.Circuit,
- stream: int | cp.cuda.Stream | None = None,
- options: Options | None = None,
Represents a quantum circuit for the frame simulator.
This class wraps a circuit defined in Stim-compatible string format. The circuit owns the device buffer where the circuit data is stored.
- Parameters:
circuit_string – Stim-compatible circuit string representation.
stream – Optional CUDA stream.
options – Optional Options object for configuration.
Example
>>> circuit = Circuit("H 0\nCNOT 0 1\nM 0 1") >>> # Or with options >>> options = Options(device_id=0) >>> circuit = Circuit("H 0\nCNOT 0 1", options=options)
Methods
- __init__(
- circuit: str | stim.Circuit,
- stream: int | cp.cuda.Stream | None = None,
- options: Options | None = None,
Initialize a Circuit object.
- Parameters:
circuit_string – Stim-compatible circuit string.
stream – Optional CUDA stream identifier.
options – Optional Options configuration.
Attributes
- circuit#
Return the underlying C circuit object.
- handle#
Return the underlying C handle object.