QCNN Model
This module implements the QCNN
class.
QCNN(n_inputs, n_qubits, depth, operations, entangler=CZ, random_meas=True, fm_basis='Fourier', fm_gate=RX, is_corr=False, **kwargs)
Bases: QNN
Creates a QCNN model.
PARAMETER | DESCRIPTION |
---|---|
n_inputs
|
Number of input features.
TYPE:
|
n_qubits
|
Total number of qubits.
TYPE:
|
depth
|
List defining the depth (repetitions) of each layer.
TYPE:
|
operations
|
List of quantum operations to apply in the gates (e.g., [RX, RZ]).
TYPE:
|
entangler
|
Entangling operation, such as CZ.
TYPE:
|
random_meas
|
If True, applies random weighted measurements.
TYPE:
|
fm_basis
|
feature map basis.
TYPE:
|
fm_gate
|
gate employed in the fm, such as.
TYPE:
|
**kwargs
|
Additional keyword arguments for the parent QNN class.
TYPE:
|
Source code in qadence_model/models/qcnn_model.py
qcnn_circuit(n_inputs, n_qubits, depth, operations, entangler, fm_basis, fm_gate, is_corr)
Defines the QCNN circuit.
Source code in qadence_model/models/qcnn_model.py
qcnn_deferred_obs(n_qubits, random_meas)
Defines the measurements to be performedthe traced out.
and remaining qubits.