qailab.torch.layers.regression#
Attempts at regression compatible layers
Summary#
Classes:
This layer returns the most common bitstring sampled from the underlying quantum circuit. |
|
This layer returns the expected value of a bitstring sampled from the underlying quantum circuit. |
Reference#
- class qailab.torch.layers.regression.ExpectedValueQLayer(circuit: QuantumCircuit, *, backend: QiskitBackend | None = None, shots: int = 1024, rescale_output: tuple[float, float] | None = None)[source]#
Bases:
QLayer
This layer returns the expected value of a bitstring sampled from the underlying quantum circuit. The value is a floating point number in range <0, 2^num_measured_qubits - 1>
- class qailab.torch.layers.regression.ArgmaxQLayer(circuit: QuantumCircuit, *, backend: QiskitBackend | None = None, shots: int = 1024)[source]#
Bases:
QLayer
This layer returns the most common bitstring sampled from the underlying quantum circuit. The value is a whole number in range <0, 2^num_measured_qubits - 1>