SCQC and BARQ implementation based on JAX.
Project description
If you share our love for curves on the robust quantum control problem, this package will allow you to seamlessly experiment with our formalism and generate your own unique robust quantum control protocols.
If Space Curve Quantum Control (SCQC) already sounds familiar, you can go ahead
and install qurveros. If you haven't seen SCQC before, you can consult
the following papers:
→ An automated geometric space curve approach for designing dynamically corrected gates
→ Dynamically corrected gates from geometric space curves
Suppressing noise with space curves
The best starting point in experimenting with qurveros is to consult
the examples folder in sequence:
circle_constant_pulsebessel_curve_robust_pulsecircle_optimization
The package provides a streamlined flow, from the choice of the curve ansatz up to the extraction of the robust pulses and their simulation. The implementation uses JAX to execute the required differentiation and evaluation of the functions in a discrete set of points.
The curve is defined as a function of the form:
def curve(x, params):
x_comp = f(x, params)
y_comp = g(x, params)
z_comp = h(x, params)
return [x_comp, y_comp, z_comp]
where x is the curve's parameter used to traverse the curve and params
are auxiliary parameters that control its shape or its properties.
The Spacecurve class is the heart of the package. An instance is created as:
from qurveros.spacecurve import SpaceCurve
spacecurve = SpaceCurve(curve=curve,
order=order,
interval=[x_0, x_1],
params=params)
The user can provide either the position vector, which is typically referred to
as "curve" and corresponds to order=0 or the tangent vector with order=1,
in any parametrization. The interval of the curve parameter x
with $x \in [x_0, x_1]$ is used to evaluate all the geometric quantities
in the interval of the given endpoints.
Auxiliary parameters are passed in the last argument.
To perform the required computations, we use:
spacecurve.evaluate_frenet_dict()
spacecurve.evaluate_robustness_properties()
where the frenet_dict contains all the geometric quantities necessary for
SCQC and an instance of the class RobustnessProperties evaluates the
robustness properties of the quantum evolution encoded in the properties of
the curve.
The entries of the frenet dictionary are evaluated at equidistant samples,
with the default number found in qurveros.settings.options['CURVE_POINTS'],
which can be modified at runtime. Alternatively, the number of desired points
can be supplied as an argument when the method is called.
For the quantum control problem, we assume a Hamiltonian of the form:
$$ H_0(t) = \frac{\Omega(t)}{2}[\cos\Phi(t) \sigma_x + \sin\Phi(t) \sigma_y] + \frac{\Delta(t)}{2}\sigma_z. $$
Depending on the control_mode string that specifies the control axes, we use
the instance method:
spacecurve.evaluate_control_dict(control_mode)
where the control_dict attribute contains the control fields based on SCQC.
The available control modes can be found in qurveros.controltools.
For instance, if resonant control is required, we provide
the control_mode as 'XY'.
For easy access to qubit simulation tasks, the helper package qubit_bench
automates some of the experiments commonly used to assess the robustness
properties of the derived pulses. Demonstrations on how to use the
functionalities of the subpackage is found in the examples folder.
Quantum operations and simulations are handled with qutip.
Purpose and vision
While the package's primary purpose is to serve as an implementation of SCQC and BARQ, it also offers a unique opportunity to exist as a guide for the newcomers.
The natural evolution of a package is to expand the set of provided functionalities and grow larger and larger over the years. While the source code of a package constitutes one of the most informative means to draw inspiration from and adopt the best programming practices, in the eyes of the uninitiated, the vast amount of available information can make the process feel intimidating.
Given qurveros' small scale, and inspired from the didactic character of numerous example sections of the existing packages, I deeply hope that this work will provide the learner with a simple use-case to start with.
Contributing
I would be more than happy to receive contributions to this project in any form; with improvements that regard functionality implementations, documentation and adoption of better programming practices.
In your contributions, please keep in mind the package's vision. Like Pikachu, qurveros can still deliver a framework to design robust quantum control protocols using space curves, while maintaining an educational character to inspire the newcomers.
Citation
If you found this repository useful to your work, please consider citing the associated paper:
→ An automated geometric space curve approach for designing dynamically corrected gates
Contact
If you want to provide feedback (which is strongly encouraged, and is of any sign and magnitude), please don't hesitate to reach out!
Email: piliouras[at]vt.edu
Appendix: Preparing your quantum canvas
This section provides the necessary steps to setup qurveros in your system.
Virtual environment
The use of a virtual environment is strongly recommended. Assuming that python
is in the path, you can create your own virtual environment using:
python3 -m venv .venv
which creates a virtual environment .venv.
You can activate it using:
source .venv/bin/activate
For more information with platform-dependent instructions: https://docs.python.org/3/library/venv.html
Note: In case your virtual environment is not detected, you will have to add the interpreter path manually.
Installation
The package is uploaded on PyPI. For the core functionalities, you can use:
pip install qurveros
In order to run the examples, you can add the required packages using:
pip install qurveros[examples]
and in order to reproduce the plots in the paper:
pip install qurveros[results]
For the latest updates, you can install the package by cloning the repository and using the command (assuming the current working directory contains the pyproject.toml file):
pip install ."[dependencies]"
Acknowledgements
I would like to deeply thank Dennis Lucarelli, Hisham Amer and Kyle Sherbert for testing qurveros and providing extremely helpful suggestions for the package.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qurveros-1.0.0.tar.gz.
File metadata
- Download URL: qurveros-1.0.0.tar.gz
- Upload date:
- Size: 409.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ce101ceb43f4accfb27afee3210df25d5353e10a847c6009b4edc895c8e25dc
|
|
| MD5 |
3888452487ed8964a9f123c358b88488
|
|
| BLAKE2b-256 |
a50cb50130a3f618c119b7a44b53aca431542e90619236d3d6996fe69b3da9a7
|
File details
Details for the file qurveros-1.0.0-py3-none-any.whl.
File metadata
- Download URL: qurveros-1.0.0-py3-none-any.whl
- Upload date:
- Size: 36.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
453719b2a87ccc8e1deb113d0c871c49f010ada88fb3d827f9bbb15f8adda79a
|
|
| MD5 |
1b0e3818d2d5daf05d704c15eea07a30
|
|
| BLAKE2b-256 |
147a1f154bb5abd66f0aa16497a3b6559151ebd7aa112210662ad7348016d7cb
|