You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,10 @@ TensorCircuit is a **Tensor Network-first**, **Multi-Backend** quantum computing
22
22
-**Pattern**: Avoid Python control flow (if/else) that depends on tensor values. Use `tc.backend.cond` or `tc.backend.switch` if necessary, or structure code to be statically analyzable.
23
23
-**Benefit**: This enables massive speedups on JAX and TensorFlow backends.
24
24
25
+
### Known Issues and Intermittent Failures
26
+
27
+
-**`tests/test_circuit.py::test_qiskit2tc`**: This test may fail intermittently (e.g., in Qiskit 0.46.3+) due to non-deterministic behavior in Qiskit's `UnitaryGate.control()` method during circuit translation. If this test fails while other tests pass, it is likely a framework-level "heisenbug" and not a regression in TensorCircuit core logic.
28
+
25
29
## Repository Structure
26
30
27
31
-`tensorcircuit/`: Core package source code.
@@ -33,6 +37,12 @@ TensorCircuit is a **Tensor Network-first**, **Multi-Backend** quantum computing
33
37
34
38
## Configuration and Dependencies
35
39
40
+
### Python Environment Management
41
+
42
+
-**Rule**: Never install packages in the default system or user Python environment unless explicitly directed by the user.
43
+
-**Protocol**: If a command fails due to a missing package or `ModuleNotFoundError`, **explicitly ask the user** for the correct Python environment to use (e.g., a specific Conda environment name like `2602`).
44
+
-**Workflow**: Once an environment is identified, prefix all Python/pytest/pylint commands with `conda run -n <env_name>` or the appropriate environment activator.
0 commit comments