semvec/pypi-packages huggingface dataset:
pycim-simulator 0.1.4
A Python Framework for the Dynamics of Coherent Ising Machine
Requires Python: >=3.7.7

# PyCIM

PyCIM is the first simulator that can produce the dynamic behavior of CIM. PyCIM effectively capture some characteristic phenomena of DOPO and CIM, including a spontaneous symmetry breaking, threshold behavior, gain saturation, and the process of CIM solving MAX-CUT problems. Additionally, it is built-in time-varying coupling strengths and pump schedules. Moreover, PyCIM can be used for analyzing the impact of parameters on the performance of CIM, and guiding the design and optimization of actual physical systems.

## Requirements

To use the simulator, Python 3.7.7 or above is required.

The following packages are required by the installation:

* matplotlib==3.5.3
* numpy==1.21.5
* scipy==1.7.3
 
#### method 1:

```python
pip install pycim-simulator
```

#### method 2:

The first step is cloning the repository:

```python
git clone https://github.com/shadowforwind/pycim-simulator.git
```

Then, install the following packages:

```python
cd pycim-simulator
pip install -r requirements.txt
```

## Catalog

```
└─simulator
    │  architecture.png
    │  display.ipynb
    │  README.md
    │  requirements.txt
    │
    └─pycim
        │  analyzer.py
        │  competitor.py
        │  sampler.py
        │  __init__.py
        │
        ├─data
        │  │  128.txt
        │  │  20.txt
        │
        ├─simulation
        │  │  device.py
        │  │  setup.py
        │  │  simulate.py
        │  │  solver.py
        │  │  __init__.py
        │  │
        │  ├─model
        │  │  │  c_number.py
        │  │  │  discrete.py
        │  │  │  meanFiled.py
        │  │  │  __init__.py
        │
        ├─utils
        │  │  const.py
        │  │  bias.py
        │  │  file_J.py
        │  │  getIsingEnergy.py
        │  │  __init__.py
```

## Getting started with pycim

The simplest way of familiarize with the pycim-simulator is by exploring the demo case provided in the file ''display.ipynb''. The file ''display.ipynb'' provides step-by-step description of the main commands to: initialize input, transform model, single simulation, result measurement, or solving the Max-Cut problem.

## How to contact us

Thanks for your interest in the project! If you have a question or want to discuss something, feel free to send an email to [Peixiang Li](mailto:peixiangli@quanta.org.cn), [Dongyang Wang](mailto:dongyangwang@quanta.org.cn), or to [Junjie Wu](mailto:junjiewu@nudt.edu.cn).

## How to cite

When using pycim simulator for research projects, please cite:

Li, P., Cheng, H., Liu, Y., Wang, D., Wu, J. (2024). _PyCIM: A Python Framework for the Dynamics of Coherent Ising Machine_. In: Huang, DS., Zhang, C., Guo, J. (eds) Advanced Intelligent Computing Technology and Applications. ICIC 2024. Lecture Notes in Computer Science, vol 14871. Springer, Singapore. https://doi.org/10.1007/978-981-97-5609-4_15
ariai 0.1.0
A flexible chatbot framework supporting multiple AI providers
Requires Python: >=3.8

# AriAI

A flexible chatbot framework that supports multiple AI providers (OpenAI and Hugging Face).

## Features

- Support for both OpenAI (GPT-3.5/4) and Hugging Face models
- Custom system prompts / personalities
- Conversation memory
- Rich terminal UI with colored output
- Easy to use and extend

## Installation

1. Clone this repository:
```bash
git clone https://github.com/username/ariai.git
cd ariai
```

2. Build and install the package:
```bash
python setup.py sdist bdist_wheel
pip install ./dist/ariai-0.1-py3-none-any.whl
```

## Usage

Here's a basic example:

```python
from ariai import AriAI

# Using OpenAI
bot = AriAI(
    provider="openai",
    api_key="YOUR_OPENAI_API_KEY",
    system_prompt="You are a helpful AI assistant."
)

# Or using Hugging Face
bot = AriAI(
    provider="huggingface",
    hf_model="google/flan-t5-base",
    system_prompt="You are a helpful AI assistant."
)

# Start the interactive chat UI
bot.start_ui()
```

You can also use the chat method directly:

```python
response = bot.chat("Hello, how are you?")
print(response)
```

## Configuration

### OpenAI

For OpenAI, you'll need to set your API key. You can either:
1. Pass it directly to the constructor
2. Set it as an environment variable: `OPENAI_API_KEY`

### Hugging Face

For Hugging Face, you can specify any model that supports text generation. The default is "google/flan-t5-base".

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

This project is licensed under the MIT License - see the LICENSE file for details.