qiskit_torch_connector_vqc
A variational quantum classifier from Qiskit Machine Learning, wrapped as a PyTorch module.
4 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Parameters
- 8
- Operations
- 4
- Framework
- PyTorch
- Recurrent
- No
- Published
- Nature (arXiv 2018)
- Cited by
- 2,537 (as of 22 October 2026)
- Authors
- Vojtech Havlicek, Antonio D. Córcoles, Kristan Temme and others
- License
- Apache-2.0
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m8490
- Graph hash
- 4abd14e0bc0839f26728bc8e3c06cf533b4a74e697e5894f6ec283df73b71f4b
- Skeleton hash
- 4abd14e0bc0839f26728bc8e3c06cf533b4a74e697e5894f6ec283df73b71f4b
- Architecture hash
- 1425cee3f6212446a32dc5b69f0a8f224555a7ac8c340088208c04966bbe6459
- Diagram SHA-256
- 6beaee1c67625212231092ead0e92ddee3ffe6f60de992a275021131431f82a2
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
A variational quantum classifier uses a variational quantum circuit to classify data, in direct analogy to a conventional support vector machine (SVM). The paper behind it represents the feature space of a classification problem by a quantum state, to take advantage of the large dimensionality of quantum Hilbert space. Its experimental device consists of five coupled superconducting transmons, only two of which are used.
The classical input is first mapped to a quantum state by a feature map circuit. A circuit made of layers, with parameters that are optimized during training, is then applied to that state. For a two-label problem the result is read out by measuring in the Z basis and feeding the output bit-string to a chosen boolean function.
This model is built with Qiskit Machine Learning, a Python library that combines elements of quantum computing with traditional machine learning. Its TorchConnector integrates quantum neural networks with PyTorch, so the gradients PyTorch computes during backpropagation take the quantum network into account. In that library, the Variational Quantum Classifier takes a feature map and an ansatz and constructs the underlying quantum neural network automatically.
Key idea. The paper proposed and experimentally implemented a quantum variational classifier and a quantum kernel estimator on a superconducting processor, both using a quantum state as the feature space.
- variational quantum classifier
- vqc
- variational quantum circuit
- quantum neural network
- qnn
- qiskit machine learning
- torchconnector
- quantum machine learning
- quantum feature map
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{havlicek2018supervisedlearningquantumenhanced,
title={Supervised learning with quantum enhanced feature spaces},
author={Vojtech Havlicek and Antonio D. Córcoles and Kristan Temme and Aram W. Harrow and Abhinav Kandala and Jerry M. Chow and Jay M. Gambetta},
year={2018},
eprint={1804.11326},
archivePrefix={arXiv},
primaryClass={quant-ph},
doi={https://doi.org/10.1038/s41586-019-0980-2},
url={https://arxiv.org/abs/1804.11326},
}