Requests to a finite quantum device #
An existing word-oracle program controls a fixed quantum register through three channels:
elementary gates, coherent oracle queries and single-wire measurements. Classical service
channels are disjoint. DeviceRequest.codec uses the existing phase-code encoding and unary wire
indices. It accepts exactly their canonical encodings. Malformed words receive the existing
OracleCodec rejection answer [], with no state change. Encoded gates with invalid placements
are separately rejected by the device's existing gate decoder.
This is an interface for the existing native oracle machine, not a new program language or efficiency predicate. The partial inverse specifies decoding mathematically; no efficiency of a quantum-state simulation or of this partial inverse is asserted.
Main definitions #
Cslib.Quantum.DeviceOperation: the three elementary quantum operation channels.Cslib.Quantum.DeviceRequest: typed requests with classical service channels.Cslib.Quantum.DeviceRequest.codec: their canonical word interface.Cslib.Quantum.DeviceRequest.operationCost: separate costs for each quantum operation.
Quantum channels of a native controller. Classical service channels use the other summand.
- gate : DeviceOperation
Apply one elementary gate.
- query : DeviceOperation
Apply one coherent query to the fixed oracle.
- measure : DeviceOperation
Measure one active wire in the computational basis.
Instances For
Typed requests on a fixed m-qubit device, alongside classical service requests.
- gate {m : ℕ} {Operation : Type} (code : PhaseGateCode) : DeviceRequest m Operation
The existing elementary gate code, checked by its usual decoder.
- query {m : ℕ} {Operation : Type} : DeviceRequest m Operation
The coherent XOR query on the device's fixed argument and response registers.
- measure {m : ℕ} {Operation : Type} (wire : Fin m) : DeviceRequest m Operation
Read one existing active wire.
- service {m : ℕ} {Operation : Type} (operation : Operation) (word : List Bool) : DeviceRequest m Operation
Send a classical word to the service.
Gate payloads use encPhaseGateCode; query payloads are empty; measurement wires are unary.
Service payloads retain their original word and channel.
The request encoding is injective, including its operation tag.
The canonical typed view of the native word channels. Replies are words already: gates and
queries return [], measurements return one bit, and the service supplies a fixed-width word.
The codec sends exactly the documented gate, query, unary-wire and service payloads.
Typed requests cross the word interface without changing their replies.
One selected quantum operation costs one; all other operations cost zero.
Classical service calls have their own cost, independent of the quantum operations.
The four independent costs partition all requests, including rejected attempts.
Each selected operation count is bounded by the total number of requests.
Service calls are bounded by the total number of requests.