Implementing Adaptive Style Strength Scaling in Quantum Style Transfer : Classiq and Quantum Coalition “Implementation Challenge”
Authors: @ManjulaGandhi, @sgayathridevi, @Deeksha-Shanmugam, @Redhanya34
We propose implementing Adaptive Style Strength Scaling in the QuantArt framework based on the method outlined in QuantArt: Quantizing Image Style Transfer Towards High Visual Fidelity. This improvement introduces content-aware dynamic scaling of style intensity to automate the balance between style fidelity and content preservation, eliminating the need for manual tuning of trade-off parameters (α, β). This implementation is part of the Classiq and Quantum Coalition “Implementation Challenge.”
For the abstract, detailed plan, and implementation approach, please refer to the attached proposal:
Adaptive Style Strength Scaling in Quantum Style Transfer.docx
Hello @Deeksha-Shanmugam !
Please include a summary of your proposal above, focusing on how you plan to implement it using Classiq.
Since this is based on a "classical paper," could you clarify what aspects of the implementation will be quantum? Specifically, how do you intend to leverage quantum computing in this approach?
Thanks!
Hello @NadavClassiq!
Thank you for your feedback! Here’s a summary of the proposal and clarification on how quantum computing will be integrated into the implementation using Classiq’s platform.
Summary of the Proposal The project focuses on Hybrid Quantum-Classical Style Transfer, combining classical and quantum techniques to improve the efficiency and quality of artistic style transfer. The goal is to leverage quantum computing for feature extraction and optimization while relying on classical methods for preprocessing and post-processing. Classiq’s platform will be used to design and optimize the quantum components of this workflow.
Quantum Aspects of the Implementation
- Quantum Feature Extraction:
-
The first step involves encoding classical image features into quantum states using Quantum Feature Maps (such as PauliFeatureMap or ZZFeatureMap). This encoding allows the representation of image data in a way that’s suitable for quantum processing.
-
Next, Variational Quantum Circuits (VQCs) will process and transform these features, with a focus on enhancing texture and pattern recognition, which are critical for style transfer.
- Quantum Optimization:
- A key innovation in this project is the design of a Quantum Fidelity Loss Function to optimize the balance between style and content. This involves measuring the fidelity between quantum states representing style and content features, which is expected to lead to more accurate and visually appealing results.
- Hybrid Workflow:
-
The classical part of the workflow handles preprocessing (e.g., feature extraction using lightweight CNNs and image encoding) and post-processing (e.g., image reconstruction and super-resolution).
-
The quantum part focuses on feature transformation and optimization, bridging the gap between classical and quantum computing.
Using Classiq’s Platform
-
Classiq’s high-level quantum programming tools will be used to design and optimize the quantum circuits for feature extraction and transformation. This approach allows for a focus on the algorithmic aspects while Classiq handles the underlying complexity.
-
The platform’s synthesis capabilities will be leveraged to minimize qubit usage and circuit depth, ensuring feasibility on near-term quantum hardware.
-
The quantum circuits will be seamlessly integrated with the classical preprocessing and post-processing pipelines to create a cohesive hybrid workflow.
Clarification on the Classical Paper The project is inspired by classical style transfer methods but extends them by:
-
Replacing classical feature transformation with quantum feature maps and VQCs.
-
Introducing a quantum-inspired loss function for style-content optimization.
-
Demonstrating how quantum computing can enhance efficiency and scalability in style transfer tasks.
I hope this clarifies the quantum aspects of the implementation and how Classiq’s platform will be utilized. Let me know if you need further details!
Best regards, Deeksha Shanmugam
Hello @Deeksha-Shanmugam!
Thank you for your detailed explanation of integrating quantum computing into Hybrid Quantum-Classical Style Transfer using Classiq.
I recommend reviewing Classiq’s PyTorch integration. Additionally, if you encounter any challenges, feel free to ask questions in our Slack community for further guidance.
Looking forward to your contribution!
Thanks!
Hello @NadavClassiq !
Thank you for your response and for the recommendation to review Classiq’s PyTorch integration! I will explore it to ensure a seamless hybrid implementation.
I appreciate the opportunity to contribute and will reach out on Slack if I need further guidance during development.
Best regards, Deeksha Shanmugam
Adaptive Style Strength Scaling Implementation
I am submitting the partial implementation of Adaptive Style Strength Scaling in Quantum Style Transfer for the Classiq and Quantum Coalition “Implementation Challenge.” This work integrates quantum feature extraction and optimization within a hybrid quantum-classical framework.
However, I have faced challenges in implementing certain aspects due to difficulties with Classiq’s platform and its libraries. Given more time, I can refine the integration and address these challenges to enhance the implementation. If a time extension is possible, I would like to further improve this work.
Please find the attached files containing my current progress. Quantum style transfer
Best regards, Deeksha Shanmugam
Adaptive Style Strength Scaling Implementation
I am submitting the partial implementation of Adaptive Style Strength Scaling in Quantum Style Transfer for the Classiq and Quantum Coalition “Implementation Challenge.” This work integrates quantum feature extraction and optimization within a hybrid quantum-classical framework.
However, I have faced challenges in implementing certain aspects due to difficulties with Classiq’s platform and its libraries. Given more time, I can refine the integration and address these challenges to enhance the implementation. If a time extension is possible, I would like to further improve this work.
Please find the attached files containing my current progress.
Best regards, Deeksha Shanmugam
On Mon, Mar 3, 2025 at 3:25 PM NadavClassiq @.***> wrote:
Assigned #827 https://github.com/Classiq/classiq-library/issues/827 to @Deeksha-Shanmugam https://github.com/Deeksha-Shanmugam.
— Reply to this email directly, view it on GitHub https://github.com/Classiq/classiq-library/issues/827#event-16531495438, or unsubscribe https://github.com/notifications/unsubscribe-auth/BEGV2XIAIKJNBTXGA6UINQD2SQRIVAVCNFSM6AAAAABYCQQQM6VHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJWGUZTCNBZGU2DGOA . You are receiving this because you were assigned.Message ID: @.***>
Hi @Deeksha-Shanmugam, That is fine if you need more time to submit a better implementation. How long would you need?
Hi @TaliCohn! Thank you for the consideration. I would need at least a week to resolve the issues with Classiq’s platform and improve the implementation. I'll do my best to submit a refined version within this time. Please let me know if this timeline works.
Also, I welcome any suggestions or feedback that could help me improve the implementation.
Hi @Deeksha-Shanmugam, a week is fine. Once you submit your PR, we will review it and provide feedback. Good luck!
Hi @Deeksha-Shanmugam, are you still working on this?
Hi @TaliCohn , we almost completed the work. Will create the pull request in a day or two
https://github.com/Classiq/classiq-library/pull/970
Closing this following closing the related PR.