From a565675ae589cc7abdf7751ca78ad5f8437b9e6f Mon Sep 17 00:00:00 2001 From: Mrhhhhhhx <33475127+Mrhhhhhhx@users.noreply.github.com> Date: Fri, 26 Jun 2026 16:00:41 +0800 Subject: [PATCH] Add files via upload --- .../workflows/ISSUE_TEMPLATE/bug_report.yml | 121 ++++++++++++++++++ .github/workflows/ISSUE_TEMPLATE/config.yml | 11 ++ .../ISSUE_TEMPLATE/feature_request.yml | 85 ++++++++++++ .github/workflows/ISSUE_TEMPLATE/question.yml | 60 +++++++++ .github/workflows/PULL_REQUEST_TEMPLATE.md | 21 +++ 5 files changed, 298 insertions(+) create mode 100644 .github/workflows/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/workflows/ISSUE_TEMPLATE/config.yml create mode 100644 .github/workflows/ISSUE_TEMPLATE/feature_request.yml create mode 100644 .github/workflows/ISSUE_TEMPLATE/question.yml create mode 100644 .github/workflows/PULL_REQUEST_TEMPLATE.md diff --git a/.github/workflows/ISSUE_TEMPLATE/bug_report.yml b/.github/workflows/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..81a3fb6 --- /dev/null +++ b/.github/workflows/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,121 @@ +name: "🐛 Bug Report" +description: "Report a bug or unexpected behavior in cqlib" +title: "[BUG] " +labels: ["bug", "triage"] +body: + - type: markdown + attributes: + value: | + **Thank you for reporting a bug!** + + Before submitting: + - Search [existing issues](https://github.com/cq-lib/cqlib/issues) to avoid duplicates + - Security vulnerabilities → email (see [SECURITY.md](SECURITY.md)) + + - type: input + id: version + attributes: + label: "cqlib version" + description: "Run `pip show cqlib` or check `cargo.toml`" + placeholder: "e.g. 0.1.0, commit a1b2c3d" + validations: + required: true + + - type: dropdown + id: component + attributes: + label: "Which component?" + options: + - "cqlib-core (Rust core)" + - "binding-python (Python bindings)" + - "binding-c (C bindings)" + - "cqlib (public Rust crate)" + - "Other / Not sure" + validations: + required: true + + - type: textarea + id: environment + attributes: + label: "Environment" + description: "OS, architecture, Rust version, Python version" + placeholder: | + - OS: Ubuntu 22.04 / macOS 14 / Windows 11 + - Architecture: x86_64 / ARM64 + - Rust: 1.85.0 + - Python: 3.12.0 + render: markdown + validations: + required: true + + - type: textarea + id: steps + attributes: + label: "Steps to reproduce" + description: "Minimal code to reproduce the bug" + placeholder: | + **Python:** + ```python + from cqlib import Circuit + qc = Circuit(2) + qc.h(0) + qc.cx(0, 1) + # bug happens here + ``` + + **Rust:** + ```rust + use cqlib_core::circuit::{Circuit, Qubit}; + let mut qc = Circuit::new(2); + // bug happens here + ``` + + **C:** + ```c + #include + cqlib_circuit_t *qc = cqlib_circuit_new(2); + // bug happens here + ``` + render: markdown + validations: + required: true + + - type: textarea + id: expected + attributes: + label: "Expected behavior" + placeholder: "What did you expect to happen?" + validations: + required: true + + - type: textarea + id: actual + attributes: + label: "Actual behavior" + placeholder: "What actually happened? Include full error messages, logs, or stack traces." + render: text + validations: + required: true + + - type: textarea + id: quantum_context + attributes: + label: "Quantum-specific context (if applicable)" + description: "For issues related to simulation, noise, or numerical computation" + placeholder: | + - Input circuit / gates + - Parameters used (theta, random seed, etc.) + - Simulator / backend configuration + - Noise model parameters + - Expected vs actual tolerance / precision + render: markdown + validations: + required: false + + - type: textarea + id: additional + attributes: + label: "Additional context" + placeholder: "Screenshots, related issues, workarounds tried, etc." + validations: + required: false diff --git a/.github/workflows/ISSUE_TEMPLATE/config.yml b/.github/workflows/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..3074769 --- /dev/null +++ b/.github/workflows/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,11 @@ +blank_issues_enabled: false +contact_links: + - name: "\uD83D\uDCAC Ask a question in Discussions" + url: https://github.com/cq-lib/cqlib/discussions + about: "Please use Discussions for general questions and community conversation" + - name: "\uD83D\uDCD6 Read the documentation" + url: https://qc.zdxlz.com/ + about: "Check the official cqlib documentation before opening an issue" + - name: "\u270D\uFE0F Contribution guide (\u4E2D\u6587)" + url: https://github.com/cq-lib/cqlib/blob/main/CONTRIBUTING.CN.md + about: "Read the contributing guide before submitting code" diff --git a/.github/workflows/ISSUE_TEMPLATE/feature_request.yml b/.github/workflows/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..29ab7d0 --- /dev/null +++ b/.github/workflows/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,85 @@ +name: "\U0001F680 Feature Request" +description: "Suggest a new feature or enhancement for cqlib" +title: "[FEATURE] " +labels: ["enhancement", "triage"] +body: + - type: markdown + attributes: + value: | + **Thank you for suggesting a feature!** + + Before submitting: + - Search [existing issues](https://github.com/cq-lib/cqlib/issues) to check if this has already been proposed + - Major API changes should be discussed in an Issue first (see [CONTRIBUTING.md](CONTRIBUTING.md)) + + - type: textarea + id: problem + attributes: + label: "Problem statement" + description: "What problem does this feature solve? Describe your use case." + placeholder: "E.g., I want to run VQE on custom Hamiltonians but the current API requires..." + validations: + required: true + + - type: dropdown + id: area + attributes: + label: "Which area does this affect?" + multiple: true + options: + - "Circuit Construction" + - "Intermediate Representation (IR / Optimization)" + - "Compiler Passes (gate decomposition / routing / scheduling)" + - "Device Model (calibration / topology / noise)" + - "Simulation (state vector / noise model)" + - "Error Mitigation (ZNE / Virtual Distillation)" + - "Visualization" + - "Python Bindings" + - "C Bindings" + - "Documentation / Examples" + validations: + required: true + + - type: textarea + id: proposal + attributes: + label: "Proposed solution" + description: "Describe what you would like to see. Code snippets or pseudo-code are welcome." + placeholder: | + ```python + # Example of how the API might look + from cqlib import Circuit, VQE + + qc = Circuit(4) + ... + result = VQE(qc, hamiltonian).run() + ``` + render: markdown + validations: + required: true + + - type: textarea + id: alternatives + attributes: + label: "Alternatives considered" + description: "What workarounds have you tried? Are there existing libraries that solve this?" + validations: + required: false + + - type: checkboxes + id: scope + attributes: + label: "Scope check" + options: + - label: "This is within cqlib's scope (quantum computing SDK: circuits, IR, compilation, simulation, error mitigation)" + required: false + - label: "I am willing to contribute a PR for this feature" + required: false + + - type: textarea + id: additional + attributes: + label: "Additional context" + placeholder: "References, papers, similar features in other frameworks (Qiskit, Cirq, PennyLane, etc.)" + validations: + required: false diff --git a/.github/workflows/ISSUE_TEMPLATE/question.yml b/.github/workflows/ISSUE_TEMPLATE/question.yml new file mode 100644 index 0000000..8153612 --- /dev/null +++ b/.github/workflows/ISSUE_TEMPLATE/question.yml @@ -0,0 +1,60 @@ +name: "\u2753 Question" +description: "Ask a question about using cqlib" +title: "[QUESTION] " +labels: ["question", "triage"] +body: + - type: markdown + attributes: + value: | + **Welcome!** This template is for usage questions, troubleshooting help, and general inquiries. + + Before asking: + - Check the [README](README.md) and [documentation](https://qc.zdxlz.com/) + - Search [existing questions](https://github.com/cq-lib/cqlib/issues?q=label%3Aquestion) + + - type: dropdown + id: topic + attributes: + label: "What is your question about?" + options: + - "Installation / Build" + - "API Usage" + - "Quantum Computing Theory" + - "Performance / Optimization" + - "Documentation" + - "Other" + validations: + required: true + + - type: textarea + id: question + attributes: + label: "Your question" + description: "Describe what you are trying to do and what you need help with." + placeholder: | + I am trying to... + I have read / tried... + I expected..., but got... + validations: + required: true + + - type: textarea + id: code + attributes: + label: "Relevant code (if applicable)" + description: "Paste the code or circuit you are working with." + render: markdown + validations: + required: false + + - type: textarea + id: context + attributes: + label: "Environment" + description: "If relevant: cqlib version, OS, Python/Rust version" + placeholder: | + - cqlib version: 0.1.0 + - Python: 3.12.0 + - OS: Ubuntu 22.04 + validations: + required: false diff --git a/.github/workflows/PULL_REQUEST_TEMPLATE.md b/.github/workflows/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..9b2e5d2 --- /dev/null +++ b/.github/workflows/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,21 @@ + + +## Description + + + +## Related Issues + + + +## Checklist + +- [ ] I have read the [Contributing Guide](CONTRIBUTING.md) +- [ ] Lints and tests pass locally +- [ ] I have added tests that prove my fix/feature works +- [ ] I have updated documentation as needed