This repo provides implementations and performance testings for quantum state preparation circuits using a qubit-efficient protocol (no ancilla qubit required) suitable for circuit simulators.
That is, given an arbitrary list of
The quantum circuit consists of a sequence of multi-control Ry and multi-control Rz gates, using the method described by Mottonen et al. 2004 (https://arxiv.org/pdf/quant-ph/0407010.pdf).
-
You can directly call the QSP function
.construct_circuit()
on aQubitEfficientQSP
object to prepare an arbitrary complex quantum state, as demonstrated inQSP_method_call_demo.ipynb
. -
We also provide a detailed implementation walkthrough in
QSP_detailed_implementation.ipynb
. We recommend first-time readers start with the walk-through inQSP_method_call_demo.ipynb
. -
We compare our implementation performance for dense quantum states against the existing Qiskit's
.initialize
function and the Braket's unitary operation inperformance_benchmark/dense_state_comparisons.ipynb
.
- We provide some performance testings and complexity analysis of sparse state preparation for Braket in
performance_benchmark/braket_sparse_state_cost_benchmark.ipynb
and for Qiskit inperformance_benchmarkqiskit_sparse_state_gate_count.ipynb
.
The Amazon Braket Python SDK can be installed with pip on your local machine as follows:
pip install amazon-braket-sdk
The IBM Qiskit Python SDK can be installed with pip on your local machine as follows:
pip install qiskit
See requirements.txt
for other required Python packages and corresponding versions.
The current QSP operation demonstrated in this repo has the following circuit complexity numbers:
A.
B. No additional ancilla qubits required (total of
(Note that
See https://github.com/guikaiwen/QSP_Paper_Artifact and https://arxiv.org/pdf/2303.02131.pdf for an alternative method that has the following circuit complexity numbers:
A.
B.
Please contact kgui@uchicago.edu if you have any questions.