|
1 | | -# QuCat Circuit Generator |
2 | 1 |
|
3 | | -A modular and testable project for generating and testing circuits. This application provides a user-friendly GUI to add and manipulate circuit elements like resistors and wires, along with robust testing for the core functionalities. |
| 2 | +<div align="center"> |
| 3 | + <img src="assets/logo.png" alt="QuCat Logo" height="100" style="margin-bottom: 1rem;"> |
| 4 | + |
| 5 | + # JSCircuit |
| 6 | + |
| 7 | + **Start designing quantum circuits in your browser right away with jscircuit for your simulations** |
| 8 | + |
| 9 | + [](https://github.com/jurra/qucat-circuit-generator) |
| 10 | + [](https://jurra.github.io/qucat-circuit-generator/app/jscircuit.html) |
| 11 | + [](https://jurra.github.io/qucat-circuit-generator/tutorial-getting-started.html) |
| 12 | +</div> |
4 | 13 |
|
5 | | ---- |
6 | 14 |
|
7 | | -## **Features** |
8 | | -- Add, delete, and connect circuit elements dynamically via the GUI. |
9 | | -- Modular architecture with clear separation between UI, application logic, and domain layers. |
10 | | -- Unit tests for ensuring functionality and maintainability. |
11 | | -- Bundling with Rollup for optimized builds. |
12 | 15 |
|
13 | 16 | --- |
14 | 17 |
|
15 | | -## **Setup and Usage** |
| 18 | +**JSCircuit** is a lightweight, web-based circuit editor designed to generate netlists for **QuCat** simulations. It runs entirely in the browser, offering a modern alternative to desktop-based editors. |
16 | 19 |
|
17 | | -### **1. Clone the Repository** |
18 | | -```bash |
19 | | -git clone https://github.com/your-repo/qucat-circuit-generator.git |
20 | | -cd qucat-circuit-generator |
21 | | -``` |
| 20 | +### Why JSCircuit? |
22 | 21 |
|
23 | | -### **2. Install Dependencies** |
24 | | -Install all required dependencies using npm: |
25 | | -```bash |
26 | | -npm install |
27 | | -``` |
| 22 | +The project was built to solve two key challenges in the quantum circuit simulation workflow: |
28 | 23 |
|
29 | | -### **3. Build the Project** |
30 | | -Bundle the project with Rollup: |
31 | | -```bash |
32 | | -npm run build |
33 | | -``` |
34 | | -This will generate the bundled JavaScript files in the `dist` folder and copy the `gui.html` file there. |
| 24 | +1. **Accessibility & Portability**: |
| 25 | + Many researchers and students work in **Jupyter Notebooks** hosted on JupyterHubs or HPC clusters. JSCircuit provides a zero-installation editor that can be embedded directly into these environments, or run on any device with a modern browser. |
35 | 26 |
|
36 | | -### **4. Open the Application** |
37 | | -After bundling, open the `gui.html` file in the `dist` folder in your browser: |
38 | | -```bash |
39 | | -open dist/gui.html |
40 | | -``` |
| 27 | +2. **Extensibility**: |
| 28 | + Built with a modular **Hexagonal Architecture**, JSCircuit makes it easy for developers to add custom circuit elements, create new visual renderers, and implement custom commands. |
41 | 29 |
|
42 | | -## **Testing** |
| 30 | +## Key Features |
43 | 31 |
|
44 | | -### **1. Run All Tests** |
45 | | -Run the provided test suite using Mocha: |
46 | | -```bash |
47 | | -npm test |
48 | | -``` |
| 32 | +- **Zero Installation**: Runs instantly in any modern web browser. |
| 33 | +- **QuCat Compatible**: Generates netlist files ready for QuCat simulations. |
| 34 | +- **Embeddable**: Designed to work within Jupyter Notebooks and web applications. |
| 35 | +- **Dependency-Free**: Built with native ES6 JavaScript, requiring no heavy frameworks. |
| 36 | +- **Extensible**: Professional architecture allowing easy addition of new components. |
49 | 37 |
|
50 | | -### **2. Test Coverage** |
51 | | -- **GUIAdapter**: Tests UI bindings and integration with `CircuitService`. |
52 | | -- **CircuitService**: Validates the addition, deletion, and connection of circuit elements. |
| 38 | +## For Developers |
53 | 39 |
|
54 | | ---- |
| 40 | +### Local Installation |
55 | 41 |
|
56 | | -## **Scripts** |
| 42 | +To run the project locally for development: |
57 | 43 |
|
58 | | -- **Build**: Bundles the project with Rollup and copies `gui.html` to the `dist` folder. |
59 | | - ```bash |
60 | | - npm run build |
61 | | - ``` |
| 44 | +1. **Clone the repository**: |
| 45 | + ```bash |
| 46 | + git clone https://github.com/jurra/qucat-circuit-generator.git |
| 47 | + cd qucat-circuit-generator |
| 48 | + ``` |
62 | 49 |
|
63 | | -- **Test**: Runs all tests in the `tests` folder using Mocha. |
64 | | - ```bash |
65 | | - npm test |
66 | | - ``` |
| 50 | +2. **Install dependencies**: |
| 51 | + ```bash |
| 52 | + npm install |
| 53 | + ``` |
67 | 54 |
|
68 | | ---- |
| 55 | +3. **Build and Serve**: |
| 56 | + ```bash |
| 57 | + npm run serve |
| 58 | + ``` |
| 59 | + This will bundle the application and start a local server at `http://127.0.0.1:8080`. |
| 60 | + |
| 61 | +### Documentation |
| 62 | + |
| 63 | +- **[Extension Guide](https://jurra.github.io/qucat-circuit-generator/tutorial-extension-guide.html)**: Learn how to add custom elements. |
| 64 | +- **[Architecture](https://jurra.github.io/qucat-circuit-generator/tutorial-overview.html)**: Understand the system design. |
| 65 | +- **[API Reference](https://jurra.github.io/qucat-circuit-generator/index.html)**: Detailed code documentation. |
| 66 | + |
| 67 | +## Build the documentation locally |
| 68 | +```bash |
| 69 | +npm run docs:serve |
| 70 | +``` |
69 | 71 |
|
70 | | -## **Configuration Details** |
| 72 | +## Licensed under the MIT License. |
71 | 73 |
|
72 | | -### **Rollup Config** |
73 | | -Rollup bundles the project into the `dist` folder for optimized performance. The configuration ensures all dependencies are correctly resolved and minified. |
| 74 | +Technische Universiteit Delft hereby disclaims all copyright interest in the program "JSCircuit" written by the Author(s). |
74 | 75 |
|
75 | | -### **Scripts in `package.json`** |
76 | | -```json |
77 | | -"scripts": { |
78 | | - "test": "mocha 'tests/**/*.test.js'", |
79 | | - "build": "rollup -c && cp gui.html dist/" |
80 | | -} |
81 | | -``` |
| 76 | +— Prof. Paulien Herder, Dean of the faculty of Applied Sciences at TU Delft |
0 commit comments