Expand description
PennyLane device backend for QuantRS2.
This module implements a JSON-protocol device that allows PennyLane to execute quantum circuits on QuantRS2’s state-vector simulator.
§Protocol
PennyLane sends a JSON payload to the device:
{
"num_wires": 2,
"operations": [
{"name": "Hadamard", "wires": [0], "params": []},
{"name": "CNOT", "wires": [0, 1], "params": []}
],
"observables": [
{"name": "PauliZ", "wires": [0]}
]
}The device responds with:
{
"state": {"re": [...], "im": [...]},
"probabilities": [...],
"expval": [0.0]
}Structs§
- Penny
Lane Circuit - The circuit payload sent from PennyLane to the device.
- Penny
Lane Observable - An observable for expectation-value computation.
- Penny
Lane Operation - A single gate operation in PennyLane’s JSON protocol.
- Penny
Lane Result - The result returned from the device to PennyLane.
- QuantR
S2Device - The QuantRS2 PennyLane device backend.
Enums§
- Device
Error - Errors that can occur in the PennyLane device backend.