qailab.torch.qlayer#
Module with QLayer
Summary#
Classes:
Base quantum layer class. |
Reference#
- class qailab.torch.qlayer.QLayer(circuit: QuantumCircuit, *, backend: QiskitBackend | None = None, shots: int = 1024)[source]#
Bases:
Module
Base quantum layer class.
This layer will output 2^num_measured_qubits features, which represent the distribution of measurements from the underlying quantum circuit.
The bitstring order is [0, 1, 2, …, 2^num_measured_qubits-1]
- theta_trainable: Tensor#