diff --git a/piqture/neural_networks/quantum_neural_network.py b/piqture/neural_networks/quantum_neural_network.py index 428607c..8a34647 100644 --- a/piqture/neural_networks/quantum_neural_network.py +++ b/piqture/neural_networks/quantum_neural_network.py @@ -39,9 +39,10 @@ def __init__(self, num_qubits: int): raise ValueError("The input num_qubits must be at least 1.") self.num_qubits = num_qubits - self._circuit = QuantumCircuit(self.num_qubits, self.num_qubits) + self._circuit = QuantumCircuit(self.num_qubits) self.qr = self._circuit.qubits - self.cr = self._circuit.clbits + # Remove clbits as Sampler cannot take clbits. + # self.cr = self._circuit.clbits @property def circuit(self): diff --git a/tests/neural_networks/test_qcnn.py b/tests/neural_networks/test_qcnn.py index 24fc5b3..8e7c34f 100644 --- a/tests/neural_networks/test_qcnn.py +++ b/tests/neural_networks/test_qcnn.py @@ -44,7 +44,7 @@ def test_value_num_qubits(self, num_qubits): def test_circuit_property(self, num_qubits): """Tests the QCNN circuit.""" qcnn = QCNN(num_qubits) - assert qcnn.circuit == QuantumCircuit(num_qubits, num_qubits) + assert qcnn.circuit == QuantumCircuit(num_qubits) @pytest.mark.parametrize( "num_qubits, operations",