semvec/pypi-packages huggingface dataset:
goat-quantumcontrol 0.0.6
Python implementation of the quantum optimal control GOAT-algorithm
Keywords: python,quantum-control,goat,quantum-gates,quantum-computer

# goat_quantumcontrol

goat_quantumcontrol is a python library for the optimization of quantum gates using the GOAT algorithm.

The algorithm was developed in 2018 by Machnes et. al. and got published in the following paper:
https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.120.150401

## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install goat_quantumcontrol.

```bash
pip install goat_quantumcontrol
```

## Usage

```python
import goat_quantumcontrol as Qgoat

#-----System parameters------
# define the drift Hamiltonian
H0 = sigmax
# define the control Hamiltonian
Hdrive = sigmaz
# define the target gate
Utarget = X_gate

#-----Pulse parameters------
# define the number of time intervals
n_ts = 1000
# define the evolution time
evo_time = 3
# define the number of amps
num_of_amps = 2

#-----Optimization parameters--
# define the number of maximal iterations
max_iter = 200

# create an instance of the Pulse class to be used
fourier_pulse = Qgoat.FourierPulseWithEnvelope(n_ts=n_ts,
                                               evo_time=evo_time,
                                               num_of_amps=num_of_amps,
                                               window=None)

# create an instance of the Optimizer class
optimizer = Qgoat.Optimizer(H0=H0, Hdrive=Hdrive,
                            target=Utarget,
                            pulse=fourier_pulse,
                            max_iter=max_iter,
                            printProgress=True)

# run the optimization
optimizer.run_optimization()
```

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

## License
[MIT](https://choosealicense.com/licenses/mit/)
jsonfield-validation 0.3.0
Validator class for Django model JSON fields.
Requires Python: >=3.6
Keywords: jsonfield_validation

==================================
Django JSON Schema Field Validator
==================================

.. image:: https://app.travis-ci.com/chrislawlor/jsonfield-validation.svg?branch=master
    :target: https://app.travis-ci.com/chrislawlor/jsonfield-validation

.. image:: https://readthedocs.org/projects/jsonfield-validation/badge/?version=latest
    :target: https://jsonfield-validation.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation Status

JSON Schema validation for Django JSONField.


Quickstart
----------

Installation
++++++++++++

.. code:: bash

    pip install jsonfield-validation

Usage
+++++

.. code:: python

    from jsonfield_validation import JsonSchemaValidator


    class MyModel(models.Model):
        items = models.JSONField(
            validators=[
                JsonSchemaValidator({"maxItems": 2})
            ]
        )


Like any Django model field validator, validation happens
when ``clean_fields()`` is called on a model instance:


.. code:: python

    >>> instance = MyModel(items=[1, 2, 3])
    >>> instance.clean_fields()

    django.core.exceptions.ValidationError: {'items': ["[1, 2, 3] is too long"]}


Further documentation is gratiously hosted by `Read the Docs`_

Credits
-------

This package was created with Cookiecutter_ and the `pymetrics/cookiecutter-python-library`_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`pymetrics/cookiecutter-python-library`: https://github.com/pymetrics/cookiecutter-python-library
.. _`Read the Docs`: https://jsonfield-validation.readthedocs.io

=======
History
=======

0.3.0 (2022-06-15)
------------------

* Add path to invalid value to error_list message,

0.2.0 (2022-06-15)
------------------

* Add check method.


0.1.0 (2022-06-14)
------------------

* First release on PyPI.
crystal-tree 0.2
From large, deep trees to short, clear explanations.
Requires Python: >=3.6.0
Keywords: artificial intelligence,explainable artificial intelligencelogic programming,answer set programming

# crystal-tree

The goal of crystal-tree package is to provide simple, crystal-clear, natural language explanations for the predictions from classification Decision Trees. 

This simple python package provides an object for obtaining explanations from a (for now [scikit-learn](https://scikit-learn.org/stable/)'s) Decision Tree Classifier.

The implementations consists in the translation of the Decision Tree into an explainable logic program for [xclingo](https://github.com/bramucas/xclingo).

Given an input, the CrystalTree object will provide the prediction from the original tree, justified by a summarized version of the conditions checked by the tree to ultimately produce the prediction. The explanations are provided as python objects which can be easily represented as text. The text used for the explanations admit some personalization, which allows the user to adapt them particular contexts (different languages, different levels of expertise, etc.)


## Installation

```
python -m pip install crystal-tree
```

## Usage

The following program will train a Decision Tree into the task of predicting types of flowers (throught the well-known Iris dataset), and then it will some explanations as an example.
The program requires the following modules to be installed:
```
python -m pip instll sklearn pandas
```

```python
from sklearn.datasets import load_iris
from sklearn.tree import DecisionTreeClassifier

from crystal_tree import CrystalTree

# Loads dataset
X, y = load_iris(return_X_y=True, as_frame=True)

# Trains decision tree
clf = DecisionTreeClassifier()
clf.fit(X,y)

# Translates the classifier into an explainable logic program
crys_tree = CrystalTree(clf)

# Print explanations of input X (two arbitrary rows)
for e in crys_tree.explain(X.iloc[[0, 54]]):
    print(e.ascii_tree())
```

This will produce the following output.
```
  *
  |__Predicted class 0 for instance 0
  |  |__petal width (cm) <= 0.8

  *
  |__Predicted class 1 for instance 1
  |  |__petal length (cm) <= 4.9
  |  |__petal width (cm) in (0.8,1.6]
```

More examples concerning personalization of explanations can be found in the ```examples/``` directory in this repository.
mb-scripts 0.1.1
Machine Learning scripts that will quicken the modelling and data analysis process
Keywords: python,mb_scripts,machine learning,data science,data analysis,deep learning

![2022-04-25 (3)](https://user-images.githubusercontent.com/86184014/165095198-1f90196a-f4c5-42f5-92ed-60850a8386d5.png)
<br>
Creator : Sathya Krishnan Suresh<br>
## DESCRIPTION
This is a python package to quicken the modelling and data analysis process.<br><br>
PyPi : https://pypi.org/project/mb-scripts/

## Version 0.1.1 additions
1. **feature selection**<br>
Feature selection sub-package has been added which consists of UnivariateFeatureSelection and 
CombinationFeatureSelection.
2. **generate_time_series**<br>
This function can be used to test out new Recurrent Neural Architectures.
3. **Plotting feature importances using RandomForest**<br>
This function helps selecting the features that are most correlated with the target variable with 
the help of RandomForest
4. **Decomposition**<br>
The new model in ðŸ”¥DecompositionðŸ”¥ contains standard decomposition methods that help with 
dimensionality reduction.
5. **metrics update**<br>
A lot of regression metrics have been added along with multiclass precision metrics
variations.


## Installing and using mb_scripts
The package can be downloaded using `pip install mb-scripts==<latest_version>`<br><br>
Latest version : **0.1.0**.<br><br>
Once you have installed mb_scripts you can begin using it.<br><br> Here are some examples for using mb_scripts.<br><br>
`train_validation_curve_for_rf` - used to monitor `RandomForestClassifier`'s overfitting
![2022-05-07](https://user-images.githubusercontent.com/86184014/167239436-a77b2773-072e-4b66-b4ab-2b48089c9606.png)
<br><br>
`plot_decision_boundary` is used to visually look at the decision boundary of classification functions<br><br>
![2022-04-25 (1)](https://user-images.githubusercontent.com/86184014/165075925-daa9cdf5-cbe0-41fe-85fa-39395d4cf027.png)
<br><br>
`classifiers_metrics` returns a dataframe that consists of precision, recall, accuracy_score and f1_score for all the classification models passed.<br><br>
![2022-04-25 (2)](https://user-images.githubusercontent.com/86184014/165077324-b64aeb9f-170e-4630-a17e-5a0a9174a79e.png)
<br><br>

I am writing scripts regularly so the versions will keep changing for the next one month. Stay tuned.