Naginata-QCS
Описание
Naginata - Quantum Circuit Synthesizer is aimed to assist in development of complex quantum algorithms and circuits
Языки
- OpenQASM67,2%
- Python32,8%
Naginata-QCS
Naginata - Quantum Circuit Synthesizer is aimed to assist in development of complex quantum algorithms and circuits
The program enables users to use pre-difined circuits as components for building more complex circuits
Available functions
Some of these functions could generate reversed forms of their operations by running them with argument qreverse=True. See "qnn_static_test.py" and "qnn_generation_tests.py" for usage examples
- adder - generates an adder for two registers of simmilar size, uses no ancilla qubits
- multiplier - multiplies two registers of simmilar (x) size, outputs result in a register of 2*x size
- multiplier_asymmetric - multiplies two registers of different size (xs - size of smaller register), outputs result in a register of 3*xs size (helps to save size)
- if_equal - checks bit by bit if two registers of simmilar size are equal, returns result into the target register
- multi_control_gate_3cx - generates a gate with more than 3 controls, using 4 qubit Toffoli gates and ancilla qubits
- multi_target_gate - generates a sequence of gates that are controlled by same control qubits, but have different targets
- build_param_network - builds a circuit for training a perceptron of specified topology, see qnn_generation_tests.py for reference
- Toffoli_4q or gate "GName.CCCX" - 4 qubit Toffoli with no ancilla qubits
- export_qasm - export specified circuit to specified file
Example circuits
-
Running "qnn_static_test.py" returns a file with a training circuit for a simple example neural network (perceptron). The purpose of this usage example is to show how circuits could be built using the pre-defined "building blocks" in "naginata.py"
-
Running "qnn_generation_tests.py" returns 3 files with training circuits for 3 simple example neural networks (perceptrons).
Links to papers describing used models and methods
- Pronin CB, Ostroukh AV. Parametric Synthesis of Computational Circuits for Complex Quantum Algorithms. arXiv preprint arXiv:2209.09903. 2022 Sep 20. URL: https://arxiv.org/abs/2209.09903
- Pronin CB, Ostroukh AV. Parametric Synthesis of Quantum Circuits for Training Perceptron Neural Networks. arXiv preprint arXiv:2209.09496. 2022 Sep 20. URL: https://arxiv.org/abs/2209.09496