Documentation
¶
Overview ¶
Package local provides a backend.Backend backed by the in-process statevector simulator.
New creates a backend with optional WithMaxQubits (default 28) and WithLogger. Execution is synchronous: Backend.Submit runs the circuit immediately and returns a completed job. Results are cached in memory.
Package local provides a Backend backed by the statevector simulator.
Index ¶
- type Backend
- func (b *Backend) Cancel(_ context.Context, _ string) error
- func (b *Backend) Name() string
- func (b *Backend) Result(_ context.Context, jobID string) (*backend.Result, error)
- func (b *Backend) Status(_ context.Context, jobID string) (*backend.JobStatus, error)
- func (b *Backend) Submit(ctx context.Context, req *backend.SubmitRequest) (*backend.Job, error)
- func (b *Backend) Target() target.Target
- type Option
- type SimFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
Backend runs circuits on the local statevector simulator.
func (*Backend) Status ¶
Status returns the status of a job. All local jobs are immediately completed.
type Option ¶
type Option func(*Backend)
Option configures a local Backend.
func WithLogger ¶
WithLogger sets the structured logger for the local backend.
func WithMaxQubits ¶
WithMaxQubits sets the maximum number of qubits the simulator supports.
func WithSimulator ¶ added in v1.2.0
func WithSimulator(f SimFactory) Option
WithSimulator sets a custom simulator factory. This allows plugging in alternative simulators (e.g., GPU-accelerated) while keeping the same backend API.