# 使用 Homebrew 安装 staq

查看 staq 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:staq
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install staq
```

  证据: local Homebrew formula metadata

## 软件包事实

- **软件包键:** brew:staq
- **软件包管理器:** Homebrew
- **版本:** 3.5
- **来源摘要:** Full-stack quantum processing toolkit
- **主页:** <https://iopscience.iop.org/article/10.1088/2058-9565/ab9359/pdf>
- **仓库:** <https://github.com/softwareQinc/staq>
- **最后更新:** 2026-07-13T17:31:48+09:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- staq (别名)
- staq_circ (别名)
- staq_desugarer (别名)
- staq_device_generator (别名)
- staq_grid_synth (别名)
- staq_group_qregs (别名)
- staq_inliner (别名)
- staq_ionq (别名)
- staq_lattice_surgery (别名)
- staq_mapper (别名)
- staq_oracle_synthesizer (别名)
- staq_projectq (别名)
- staq_qasm_synth (别名)
- staq_qsharp (别名)
- staq_quil (别名)
- staq_resource_estimator (别名)
- staq_rotation_optimizer (别名)
- staq_simplifier (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 3.5
## 项目历史与用法

staq is a C++ quantum-circuit toolkit distributed as both a library and a collection of command-line tools for OpenQASM-centered circuit synthesis, transformation, optimization, mapping, and translation.

### 项目历史

The project is maintained by softwareQ Inc. Its README describes a modern C++17 library with low external dependencies, usable through binary tools or as a header-only library for parsing and manipulating OpenQASM 2.0 circuits. The linked paper, first posted as an arXiv preprint in December 2019 and later published in Quantum Science and Technology in 2020, frames staq as a full-stack quantum processing toolkit.

staq's design is explicitly source-oriented: the README says it manipulates OpenQASM syntax trees directly, taking inspiration from Clang, rather than lowering immediately to an intermediate representation. That made it useful for source-to-source transformations and translations where preserving the structure of QASM input mattered.

### 采用历史

For package-manager users, staq shows up as a Homebrew formula with many small executables rather than a single monolithic binary. The input package facts list the main `staq` tool alongside specialist tools such as simplifiers, inliners, mappers, resource estimators, and language/library translators.

The project did not become a general-purpose developer utility like a formatter or shell tool; its adoption is concentrated in quantum software workflows, especially scripts and experiments built around OpenQASM.

### 使用方式

The official tool-suite wiki documents a Unix-style workflow where OpenQASM source is passed through individual tools using standard input, standard output, and shell pipes. That style encourages users to compose exactly the circuit passes they need.

Common usage includes desugaring, inlining, simplifying, optimizing rotations, mapping circuits to device constraints, estimating resources, and translating OpenQASM into targets such as Quil, ProjectQ, Q#, and Cirq.

### 为什么软件包爱好者会关心

staq is interesting to package maintainers because it turns a specialized research compiler into a set of ordinary command-line programs. The package exposes many narrowly scoped binaries, which fits the Unix-pipeline culture better than a large GUI or cloud-only quantum SDK.

Its low-dependency C++17 implementation and MIT license also make it relatively straightforward for a package manager to build and ship compared with quantum stacks that pull in larger runtime ecosystems.

### 时间线

- 2019: arXiv preprint describes staq as a full-stack quantum processing toolkit.
- 2020: Paper published in Quantum Science and Technology.
- 2021: Official wiki page documents the separate command-line tools and pipe-based workflow.
- 2024: README lists version 3.5 dated March 8, 2024.

### Related projects

- staq is tied to OpenQASM 2.0 and interoperates conceptually with quantum toolchains such as Quil, ProjectQ, Q#, and Cirq through its translator tools.
- The README credits EPFL logic-synthesis libraries and notes that the OpenQASM parser was adapted from tweedledum.

### 来源

- <https://arxiv.org/abs/1912.06070>
- <https://github.com/softwareQinc/staq#readme>
- <https://github.com/softwareQinc/staq/wiki/The-staq-tool-suite>
- source_facts.executables
- source_facts.package-manager


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals


## Combined YAML source

View the package source record on GitHub. [combined/staq.yml](https://github.com/mxcl/pkgdb/blob/main/combined/staq.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- cross-ecosystem install command graph
