Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Pooling layer to perform measurements in two of the three adjacent qubits; as mentioned in the referred paper. #9

Closed
SaashaJoshi opened this issue Nov 22, 2023 · 1 comment · Fixed by #27
Labels
enhancement New feature or request
Milestone

Comments

@SaashaJoshi
Copy link
Owner

Currently, the pooling layer considers two adjacent qubits and applies a dynamic circuit. It measures one of the qubits and a controlled phase gate on the other. However, as given in the reference paper, this measurement can also be performed on two adjacent qubits. Two qubits are measured, and corresponding controlled phase gates are applied to the qubit.

https://github.com/SaashaJoshi/quantum-image-processing/blob/2d21202f013546b7894bbbc90f368ae9ab2f87d6/quantum_image_processing/models/neural_networks/convolutional/qcnn.py#L121-L123

This flexibility in the number of qubits to be measured is yet to be implemented. This feature (perhaps) corresponds to the size of strides in a classical pooling layer.

Originally posted by @SaashaJoshi in #6 (comment)

@SaashaJoshi SaashaJoshi changed the title Update Pooling layer to perform measurements in two of the three adjacent qubits; as mentioned in the referred paper.. Update Pooling layer to perform measurements in two of the three adjacent qubits; as mentioned in the referred paper. Nov 22, 2023
@SaashaJoshi SaashaJoshi added the enhancement New feature or request label Nov 29, 2023
@SaashaJoshi SaashaJoshi added this to the v0.0.2 milestone Dec 9, 2023
@SaashaJoshi
Copy link
Owner Author

SaashaJoshi commented Dec 12, 2023

Updating this might require the addition of an argument that asks the user if they want to consider 1 or 2 adjacent qubits for the QuantumPoolingLayer to perform measurements on. Instead, the existing layer can be renamed to QuantumPoolingLayer2 and this new feature could be added as a separate class QuantumPoolingLayer3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant