Skip to content

Releases

v0.8.0

Choose a tag to compare

@github-actions github-actions released this 22 Nov 04:22

Release Notes

qxide v0.8.0 builds on v0.7.0 by adding a typed IR engine (--engine ir), an optional Cranelift JIT (jit feature, --engine jit), and IBM Quantum submission (qxide run --backend ibm:<device>, with --dry-run; tested only against a local fake server), while keeping ast as the default engine. It also adds the String type and std standard library, desktop apps and Qxide Studio, and editor support through the qxide lsp language server and a VS Code extension. Runtime and registry changes introduce a random default seed, execution budgets (Q0413โ€“Q0418), registry package owners, and security hardening of the package client and registry template. For Rust library users, the public library API is unchanged since 0.7.0; lsp-server joins the default cli feature's dependencies and the new optional jit feature pulls in Cranelift 0.138, so default-features = false still builds the library with no dependencies.

Breaking changes

  • New .qx type name (String): String is now a .qx type name and can no longer be used as a variable or function name.
  • Reserved package name std: std is reserved for the standard library. qxide new, qxide.toml validation, and the registry validator reject a package named std, and qxide new std names the package std-app.
  • String literals as values (Q0204 / Q0214): String literals are now values, so int s = "hi"; reports a type mismatch (Q0204) instead of Q0214. Q0214 now reports a {} placeholder in a string value, as placeholders are only allowed in println's format string.
  • Execution budgets: Programs that exceed the new execution budgets now stop with error codes Q0413-Q0418. Previously, such programs ran (or ran out of memory). See the Added entry for the limit values.
  • Relative path dependencies only: path dependencies in qxide.toml and path+ sources in qxide.lock must now be relative. Values that start with / or \ or contain : are rejected; relative paths, including .., keep working.

Added

  • Typed IR interpreter (--engine ir): Added a --engine ast|ir option to qxide run, qxide qasm, and qxide repl, with the QXIDE_ENGINE environment variable providing its default; ast remains the default engine. Selecting ir lowers the checked program to a typed IR (design record in docs/design/qx-ir.md) and executes it through an IR interpreter that reproduces the tree-walking interpreter's output, OpenQASM, seeded measurement results, diagnostics, and resource-limit behaviour. Also added a benchmark suite of programs in bench/qx/ run by an ignored test (cargo test --release --bin qxide bench_suite -- --ignored --nocapture), with the method and results documented in docs/perf/QX_BENCHMARKS.md.
  • Cranelift JIT (--engine jit): Added an optional jit Cargo feature (off by default; pulls in Cranelift 0.138) that exposes the jit engine for qxide run, qxide qasm, and qxide repl (as well as QXIDE_ENGINE=jit), while builds without the feature reject jit with exit code 2. Build-time classical functions using only int, double, and boolean values and calling only such functions are compiled to native code on their first call, and everything else runs in the typed IR interpreter with the same output, diagnostics, and resource-limit behaviour. The browser playground and desktop app runtime do not include the JIT; see docs/design/qx-jit.md for the design record and docs/perf/QX_BENCHMARKS.md for measurements.
  • Quantum computer submission (qxide run --backend ibm:<device>): Added QPU submission support for IBM Quantum via the Qiskit Runtime REST API, converting the elaborated .qx circuit to the target device's native basis gates and coupled physical qubits and rendering the returned measurement records in the same format as local --shots. API keys are read only from QXIDE_IBM_API_KEY or the OS credential store (read-only) and the instance CRN from QXIDE_IBM_INSTANCE, with all HTTP traffic sent through the system curl via stdin config so secrets never appear in process arguments; real submissions print cost and queue notices, require terminal confirmation (or --yes), and pass a QPU time cap via --max-seconds (default 120), while --dry-run prints the request without touching credentials or the network (--device-config outputs the exact ISA circuit). This flow is tested against a local fake server and has not yet been verified against the live IBM service (design record in docs/design/qx-qpu.md). CI now also validates exported OpenQASM 3 files with the specification's reference parser and checks generated device circuits with the official client's ISA validator against offline IBM device snapshots.
  • String type: Added immutable build-time text supporting + concatenation with numbers and booleans, == and !=, len(s), and printing. String is usable in parameters, returns, final, and var.
  • Standard library (std): Added std.log, std.time, std.fs, std.app, and std.qxide, imported with import std.fs; (called as fs.read_text(...)), import std.fs.read_text;, or import std.fs.*;, with new error codes Q0701โ€“Q0706. Standard library calls run once while the program is elaborated, before any shot. Each host offers modules under permissions: qxide run allows std.log and std.time, and enables std.fs only with the new --allow fs flag (for files under data/ next to qxide.toml, or ./data), qxide qasm refuses file and window effects, and the REPL and browser playground offer only std.log.
  • HTTP client for desktop apps (std.http): Added std.http for desktop apps, providing http.get(url) from import std.http; to return the response body as a String using the system curl. Using it requires the http app permission and an [app] http_hosts list in qxide.toml with exact lowercase host names and no wildcards. Requests are limited to https:// URLs on port 443 without user info, do not follow redirects, have a 30-second timeout, and require UTF-8 response bodies of at most 16 MiB. Added error codes Q0707 (failed request) and Q0708 (disallowed URL); packages used as dependencies cannot import std.http.
  • Desktop apps: Added desktop app support (design in docs/design/qx-app.md) with qxide app new <NAME> (scaffolds an app with .qx logic and an HTML/JS interface), qxide app dev (runs it in a window reading files from disk), qxide app build (writes a portable executable to target/app/ by attaching a bundle of .qx sources, locked packages, and ui/ files to the prebuilt qxide-app runtime without compiling anything), app-level error codes Q0711โ€“Q0715, and the examples/apps/bell-app example (measures a Bell pair and saves results with std.fs). The runtime (crates/qxide-app-runtime, built on wry and tao, the OS webview) serves the page with a strict Content-Security-Policy, accepts calls only from the app's own origin and only for functions listed in [app] commands, and runs each call on a worker thread with cancellation. The runtime is not yet part of the release archives or PyPI wheels and is built separately (cargo build --release --manifest-path crates/qxide-app-runtime/Cargo.toml).
  • App permission checks in qxide check: Running qxide check inside an app project now checks imports against the app's [app] permissions.
  • Qxide Studio: Added Qxide Studio (apps/studio, built with qxide app build apps/studio), a minimal desktop IDE for .qx built with the app framework itself. It includes an editor with highlighting, line numbers, and error markers; Run (shots, seed), Stop, Check, Format, and a QASM view; a distribution chart and a Problems list; the programs from examples/qx; and autosave to the app data folder. It uses the new std.qxide module (check, run, qasm, format, returning JSON; granted with the qxide permission), which runs the edited program like the playground does, with only std.log.
  • Language server (qxide lsp): Added the qxide lsp subcommand (docs/design/lsp.md), which runs a Language Server Protocol server over stdio and accepts an optional --stdio flag. It publishes the same diagnostics and error codes as qxide check at the same lines and columns (using UTF-16 columns for the protocol), including in projects with qxide.toml and importsโ€”errors inside an imported module are shown on the importing file's import lines, and unsaved edits of open modules are seen by the files that import them. Supported features include formatting via qxide fmt, hover (showing the qxide explain entry of the error under the cursor plus the declaration or signature of the name), document symbols, go to definition for locals, parameters, and functions (including across imported modules), and completion of keywords, types, built-in functions, PI, the file's and imported functions, local names in scope, and BitReg methods. Built on the lsp-server crate behind the default cli feature, so the library (default-features = false) still has no dependencies.
  • VS Code extension: Added a VS Code extension in editors/vscode/ (version 0.1.0, publisher qxide-lang, keeping its own version number) providing .qx syntax highlighting through a TextMate grammar, a language configuration, and a client that starts qxide lsp. It includes the qxide.path (defaulting to qxide from PATH) and qxide.trace.server settings and a Qxide: Restart Language Server command, and requires VS Code 1.91 or newer and qxide 0.8.0 or newer (because qxide lsp is new in 0.8.0). The extension is packaged with vsce as qxide-vscode-<version>.vsix by .github/workflows/vscode.yml, which runs after the Release workflow of each qxide release tag (or by hand with a tag), attaches the .vsix to the GitHub release, and publishes to the Visual Studio Marketplace (secr...
Read more

v0.7.0

Choose a tag to compare

@github-actions github-actions released this 21 Nov 01:08

Release Notes

qxide v0.7.0 builds on v0.6.0 by adding modules (import, public), a package manager (qxide.toml, qxide.lock, and registry commands add, remove, install, publish, search), and new CLI commands (qxide fmt, qxide repl, qxide explain, and an updated qxide new project layout). This release also fixes seeded sampling so each shot uses an independent seed, tightens linearity soundness checks (Q0315), and rejects non-finite rotation angles (Q0411). For Rust library users, qxide::shot_seed and Circuit::simulate_shots are new, rx/ry/rz now panic on non-finite angles, and package manager dependencies are gated behind the default cli feature so default-features = false keeps the library dependency-free.

Breaking changes

  • New .qx keywords (import, public): import and public are now keywords in .qx and can no longer be used as identifiers.
  • Non-finite rotation angles in the Rust library: Circuit::rx, Circuit::ry, and Circuit::rz now panic when the angle is NaN or infinite. Previously the state vector silently became NaN, every measurement returned 0, and to_qasm printed rx(NaN), which OpenQASM parsers reject.
  • Stricter .qx linearity checks: Programs that consume a qubit in the right operand of && or ||, or that consume an operand borrowed by the same call or gate (for example rx(q, eat(q))), are now rejected at check time with Q0315 and Q0301. Previously these programs passed check and then failed at run time or leaked a qubit.
  • Nesting limit on .qx operator and index/method chains: Operator chains (a + b + ...) and index/method chains (r[0][0]...) now count toward the 128-level nesting limit (Q0106), so chains longer than about 120 operators are rejected.
  • Package project layout in qxide new: qxide new now creates a package project (qxide.toml, src/main.qx, README.md, and .gitignore) instead of main.qx and README.md. Arguments starting with - are rejected as a usage error.
  • Strict CLI argument checks: qxide bell, --version, and --help now reject extra arguments with exit code 2.

Added

  • Per-shot seeding API: Added qxide::shot_seed(seed, shot) to derive an independent seed for each shot and Circuit::simulate_shots(backend, seed, shots) to iterate over Result<Shot, SimError> using shot_seed. Circuit::simulate and Circuit::simulate_with are unchanged and continue to execute a single shot with the exact seed provided.
  • Modules and imports: Every .qx file is now a module supporting public functions, Java-style import pkg.module.function; and import pkg.module.*; declarations, and import errors Q0501โ€“Q0510. Inside a project, qxide run, qxide check, and qxide qasm without a file argument use src/main.qx.
  • Package manager: Added a package manager (docs/design/qx-packages.md) with qxide.toml manifests, qxide.lock, a GitHub-hosted index registry (template in registry-template/), commands qxide add, remove, install, publish, and search, --offline/QXIDE_OFFLINE=1, --registry/QXIDE_REGISTRY, cache storage in QXIDE_HOME (default ~/.qxide), and package errors Q0601โ€“Q0617. The package manager is gated behind the default cli feature used by the binary, so the library (--no-default-features --lib) still has no dependencies.
  • New CLI commands: Added qxide new <NAME> (project scaffold with the package name derived from the folder name), qxide fmt <FILE> [--check], qxide repl [--seed S], and qxide explain <CODE> (prints the entry from docs/error-codes.md, including Q05xx and Q06xx package errors).
  • New error codes: Added Q0315 (qubit consumed in the right operand of && or ||), Q0411 (non-finite rotation angle), and Q0412 (internal error when the checker and the interpreter disagree; replaces a misleading Q0311).
  • Browser playground: The .qx front end and simulator compile to WebAssembly (crates/qxide-wasm, not published) for the playground at qxide.dev, and CI checks that it prints exactly what the CLI prints.

Fixed

  • Biased and under-dispersed sampling across shots: Shot k of --seed S previously used seed S + k, causing runs with nearby seeds to reuse nearly all of the same shots (over 200 seeds of 1,000-shot Bell runs, 00 counts had a standard deviation of 2.94 instead of ~15.8 for a binomial distribution). Each shot now receives an independent seed mixed from (S, k) via qxide::shot_seed and Circuit::simulate_shots, bringing the 200-seed Bell standard deviation to 16.7 (mean 497.6 vs. 506.1 before). Outputs remain reproducible for any given --seed, though counts and single-shot results differ from 0.6.0 across qxide run, qxide bell, qxide repl, and the browser playground.
  • Non-finite rotation angles: Non-finite rotation angles are now rejected instead of silently corrupting the state vector or producing invalid OpenQASM, with .qx reporting Q0411 at the angle (see Breaking changes).
  • Linearity soundness holes: Fixed check-time gaps that allowed consuming a qubit in the right operand of &&/|| or consuming an operand borrowed by the same call or gate, now caught with Q0315 and Q0301 (see Breaking changes).
  • Stack overflows on long expression chains: Fixed stack overflows where a 4 KB program with a long + chain inside recursion passed check but crashed run/qasm, and where chains of 200,000 terms crashed check.
  • Register size overflow on wasm32: qreg(4294967297) in the browser playground no longer wraps to a 1-qubit register and now fails with Q0409 like the CLI.
  • Remainder of int.MIN % -1: int.MIN % -1 now yields 0 as in Java instead of reporting overflow Q0401.
  • Bare qubit statements: A statement that only names an existing qubit (q;) is now a no-op like x; instead of reporting Q0312.
  • CRLF string literals in qxide fmt: qxide fmt no longer refuses a valid CRLF file containing a line break inside a string literal.
  • Nested return in qxide repl: A return nested in if or for is now rejected like a top-level return instead of silently ending the session.
  • Trailing line comments in qxide repl: A trailing // comment on a REPL expression no longer fails with Q0105 at <repl>:0:1.
  • Unmatched closing brackets in qxide repl: Input closing a bracket it did not open (for example }) is now rejected instead of closing main and breaking the session.
  • UTF-8 BOM in piped REPL input: A UTF-8 byte order mark at the start of piped input is now ignored.
  • REPL diagnostic snippets: REPL diagnostics now show the typed input instead of the internal println("{}", โ€ฆ) wrapper.
  • Flag ordering in qxide run: qxide run now accepts flags before or after the file path (for example qxide run --shots 2 file.qx).
  • Failed scaffold cleanup in qxide new: qxide new no longer leaves an empty folder behind when writing a file fails.
  • Package archive path hardening: Archive entries with trailing dots or spaces, Windows device names (CON, NUL, โ€ฆ), Windows-invalid characters, or case-only duplicates could overwrite a reviewed file on Windows or macOS; they are now rejected before anything is unpacked (Q0610) and refused by qxide publish (Q0614) and registry CI. qxide publish also skips symlinked README*/LICENSE* files.
  • Semver build metadata in package resolution: Versions with build metadata (1.0.0+x) could take over an exact =1.0.0 pin; they are never selected or published, and registry CI rejects same-precedence duplicates.
  • Registry index validation and parsing: Registry CI (validate.py) now matches the client's parser exactly across semver limits, requirements, field types, line splitting, and strict JSON. An index line the client cannot use is skipped instead of breaking every version of the package, reporting Q0609 only when no usable line remains.
  • Registry download failures and temp-file safety: Any non-zero curl exit (including a transfer cut off after HTTP 200) is now reported as Q0608 instead of being accepted and cached. Downloads pass --globoff to prevent {}/[] expansion in URLs and write to an exclusively created file under $QXIDE_HOME/registry/tmp instead of a predictable name in the shared temp directory.
  • Whole-graph lockfile freshness: Lock freshness now checks the whole graph (transitive requirements, path manifests on disk, sources, and unreachable entries), returning Q0612 for a stale lock in qxide run and qxide install --locked.
  • Lockfile package name validation: Package names in qxide.lock are validated (Q0603), preventing a crafted name from pointing cache paths outside QXIDE_HOME.
  • Registry graph and CI checks: Self-dependencies of registry packages are rejected (Q0606), build_search.py orders pre-releases by semver precedence, and validate.py rejects "v": true and changes to config.json in package PRs.

Install qxide 0.7.0

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/qxide-lang/qxide/releases/download/v0.7.0/qxide-installer.sh | sh

Install prebuilt binaries via powershell script

powershell -ExecutionPolicy Bypass -c "irm https://github.com/qxide-lang/qxide/releases/download/v0.7.0/qxide-installer.ps1 | iex"

Download qxide 0.7.0

File Platform Checksum
qxide-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum
[qxide-x86_64-apple-darwin.tar.xz](https://github.com/qxide-lang/qxide/releases/download/v0.7.0/qxide-x86_64-apple-darwin.tar.x...
Read more

v0.6.0

Choose a tag to compare

@github-actions github-actions released this 20 Nov 09:07

Release Notes

qxide v0.6.0 builds on v0.5.0 by extending the .qx language with qubit-passing and qubit-returning functions, gate-only function calls inside if blocks conditioned on a measured Bit, var local type inference for classical scalar types, Java-style numeric casts, and the built-in PI constant. For Rust library users, the public API of the qxide crate is unchanged since v0.5.0, and rustdoc, panic messages, and SimError Display text are now in English.

Breaking changes

All breaking changes in v0.6.0 apply to the .qx language only:

  • var and consume are now keywords and can no longer be used as identifiers.
  • PI is now a built-in double constant. Declaring a variable, parameter, for loop variable, or function named PI fails with Q0217, and assigning to PI fails with Q0207.
  • Type names (int, double, boolean, void, Bit, BitReg, Qubit, QReg) can no longer be used as variable, parameter, or function names (Q0112).

New features

  • Qubit function parameters (consume and default borrowing): Qubit and QReg parameters are borrowed by defaultโ€”the callee may apply gates to them, while measuring, discarding, moving, or passing them to a consume parameter is rejected with Q0313. Marking a qubit parameter with consume transfers ownership to the callee, which must measure or discard it on every path (Q0302), while the caller can no longer reuse it (Q0301). Using consume on a classical parameter is rejected with Q0221.
  • Call-argument aliasing checks: Passing aliased qubits to a function callโ€”including passing a whole QReg together with one of its elementsโ€”is rejected with Q0303. A run-time aliasing check is also performed for run-time register indices.
  • Functions returning Qubit and QReg: Functions can now return Qubit or QReg values (Q0219 is retired). The caller receives ownership and must consume the returned value.
  • Gate-only function calls inside measured-Bit if blocks: Gate-only user functions (supporting borrowed qubits, loops, nested if, recursion, and classical helpers) can now be called inside an if branch on a measured Bit and are lowered to OpenQASM 3 conditional blocks identical to the corresponding inline code. Functions that consume, return qubits, allocate, measure, discard, or printโ€”directly or transitivelyโ€”are rejected in that context with Q0314.
  • var local type inference: Local variables can be declared with var for int, double, and boolean only. Using var for other types fails with Q0222, and using var in parameter or return positions fails with Q0111.
  • Java-style numeric casts: (int) x and (double) n convert between double and int, with (int) truncating toward zero, mapping NaN to 0, and saturating on overflow. Other casts are rejected with Q0223.
  • Built-in PI constant: PI is available as a built-in double constant.
  • New .qx examples: Added examples/qx/functions.qx, examples/qx/rotation.qx, examples/qx/teleport_fn.qx, and examples/qx/conditional_fn.qx. All examples are exported to OpenQASM 3 and parsed by Qiskit in CI.

Documentation

  • Crate rustdoc on docs.rs is now written in English.
  • Added sections 13 and 14 to the language design document (docs/design/qx-language.md).
  • Added a typed IR design draft in docs/design/qx-ir.md (not implemented).
  • Added the Qxide logo to README.md and the website (qxide.dev).
  • Updated README.md to describe the new .qx features.

Rust library

  • The public API of the qxide crate is unchanged since v0.5.0.
  • Rustdoc comments, panic messages, and SimError Display text are now in English instead of Korean. This only affects code that matched the previous Korean message text.

Install qxide 0.6.0

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/qxide-lang/qxide/releases/download/v0.6.0/qxide-installer.sh | sh

Install prebuilt binaries via powershell script

powershell -ExecutionPolicy Bypass -c "irm https://github.com/qxide-lang/qxide/releases/download/v0.6.0/qxide-installer.ps1 | iex"

Download qxide 0.6.0

File Platform Checksum
qxide-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum
qxide-x86_64-apple-darwin.tar.xz Intel macOS checksum
qxide-x86_64-pc-windows-msvc.zip x64 Windows checksum
qxide-aarch64-unknown-linux-gnu.tar.xz ARM64 Linux checksum
qxide-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 20 Nov 05:49

Install qxide 0.5.0

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/qxide-lang/qxide/releases/download/v0.5.0/qxide-installer.sh | sh

Install prebuilt binaries via powershell script

powershell -ExecutionPolicy Bypass -c "irm https://github.com/qxide-lang/qxide/releases/download/v0.5.0/qxide-installer.ps1 | iex"

Download qxide 0.5.0

File Platform Checksum
qxide-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum
qxide-x86_64-apple-darwin.tar.xz Intel macOS checksum
qxide-x86_64-pc-windows-msvc.zip x64 Windows checksum
qxide-aarch64-unknown-linux-gnu.tar.xz ARM64 Linux checksum
qxide-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum

v0.4.1

Choose a tag to compare

@github-actions github-actions released this 20 Nov 02:02

Install qxide 0.4.1

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/qxide-lang/qxide/releases/download/v0.4.1/qxide-installer.sh | sh

Install prebuilt binaries via powershell script

powershell -ExecutionPolicy Bypass -c "irm https://github.com/qxide-lang/qxide/releases/download/v0.4.1/qxide-installer.ps1 | iex"

Download qxide 0.4.1

File Platform Checksum
qxide-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum
qxide-x86_64-apple-darwin.tar.xz Intel macOS checksum
qxide-x86_64-pc-windows-msvc.zip x64 Windows checksum
qxide-aarch64-unknown-linux-gnu.tar.xz ARM64 Linux checksum
qxide-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum

v0.4.0

Choose a tag to compare

@rigelx2b rigelx2b released this 19 Nov 06:09

Release Notes: qxide v0.4.0

๐Ÿš€ Overview & Key Highlights

qxide v0.4.0์€ v0.3.0(ํƒœ๊ทธ 9cf9270) ์ดํ›„์˜ ๋งˆ์ด๋„ˆ ๋ฆด๋ฆฌ์Šค๋กœ, Toffoli(ccx) ๊ฒŒ์ดํŠธ์˜ ์ „ ๊ณ„์ธต ์ง€์›๊ณผ with_ancilla ๋ฒ”์œ„ ๊ธฐ๋ฐ˜ ์ž๋™ ์—ญ๊ณ„์‚ฐ(uncomputation)์˜ ๋Ÿฐํƒ€์ž„ ์•ˆ์ „์„ฑ ๊ฐ•ํ™”์— ์ดˆ์ ์„ ๋งž์ท„์Šต๋‹ˆ๋‹ค. ์ด๋ฒˆ ๋ฆด๋ฆฌ์Šค๋Š” crates.io์—๋„ ํ•จ๊ป˜ ๋ฐฐํฌ๋ฉ๋‹ˆ๋‹ค.

  • Toffoli(ccx) ๊ฒŒ์ดํŠธ ์ถ”๊ฐ€ (959864d): Circuit::ccx, Circuit::ccx_ctrl, ReversibleCircuit::ccx๋ฅผ ๋„์ž…ํ•˜์—ฌ ์ผ๋ฐ˜ ํšŒ๋กœ, with_ancilla์˜ apply ๋‹จ๊ณ„, ๊ทธ๋ฆฌ๊ณ  compute ๋‹จ๊ณ„์˜ ANDํ˜• ๋น„์„ ํ˜• ๋ถˆ(Boolean) ํ•จ์ˆ˜ ๊ณ„์‚ฐ์„ ๋ชจ๋‘ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค. OpenQASM 3 ์ถœ๋ ฅ, CPU ์ƒํƒœ ๋ฒกํ„ฐ ์‹œ๋ฎฌ๋ ˆ์ดํ„ฐ, ์ „์šฉ CubeCL GPU ์ปค๋„, 3ํ๋น„ํŠธ ์–ฝํž˜ ์ถ”์  ๋ฐ ์Šคํƒœ๋นŒ๋ผ์ด์ € ๋น„Clifford ๊ฑฐ๋ถ€๊ฐ€ ์ผ๊ด€๋˜๊ฒŒ ํ†ตํ•ฉ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.
  • with_ancilla ๋Ÿฐํƒ€์ž„ ๊ฐ€๋“œ ๋„์ž… (3022ae5): v0.3.0์—์„œ RefCellยทMutex ๊ฐ™์€ ๋‚ด๋ถ€ ๊ฐ€๋ณ€์„ฑ(interior mutability)์„ ํ†ตํ•ด Rust ๋นŒ๋ฆผ ๊ฒ€์‚ฌ๊ธฐ ๊ทœ์น™์„ ์šฐํšŒํ•  ์ˆ˜ ์žˆ์—ˆ๋˜ ํ—ˆ์ ์„ ์Šฌ๋กฏ๋ณ„ ์ž ๊ธˆ ์นด์šดํ„ฐ๋กœ ์ฐจ๋‹จํ–ˆ์Šต๋‹ˆ๋‹ค. ์ด์ œ apply ๋‹จ๊ณ„์—์„œ compute๊ฐ€ ๊ฑด๋“œ๋ฆฐ ํ๋น„ํŠธ๋ฅผ ์ œ์–ด ๋˜๋Š” ๋Œ€๊ฐ ์œ„์ƒ ๊ฒŒ์ดํŠธ ์™ธ์˜ ์—ฐ์‚ฐ์— ์‚ฌ์šฉํ•˜๋ฉด ์ฆ‰์‹œ ํŒจ๋‹‰ํ•˜์—ฌ ๋น„๋ฌผ๋ฆฌ์ ยท์˜ค์—ผ๋œ ๋ณด์กฐ ํ๋น„ํŠธ ์ƒํƒœ๋ฅผ ๋ฐฉ์ง€ํ•ฉ๋‹ˆ๋‹ค.

๐Ÿ›  Detailed Changelog

โœจ New Features

  • Toffoli(ccx) ๊ฒŒ์ดํŠธ ๋ฐ API ์ถ”๊ฐ€ (959864d)
    • Circuit::ccx(&mut Qubit, &mut Qubit, &mut Qubit): ์„ธ ์ธ์ž๋ฅผ ๋ชจ๋‘ ๊ฐ€๋ณ€ ์ฐธ์กฐ(&mut)๋กœ ๋ฐ›์•„ Rust ๋นŒ๋ฆผ ๊ฒ€์‚ฌ๊ธฐ๊ฐ€ ์ปดํŒŒ์ผ ํƒ€์ž„์— ์ค‘๋ณต ํ๋น„ํŠธ ์ „๋‹ฌ์„ ์ฐจ๋‹จํ•ฉ๋‹ˆ๋‹ค.
    • Circuit::ccx_ctrl(&Qubit, &Qubit, &mut Qubit): with_ancilla์˜ apply ๋‹จ๊ณ„์ฒ˜๋Ÿผ ์ œ์–ด ํ๋น„ํŠธ๋ฅผ ๊ณต์œ  ์ฐธ์กฐ(&Qubit)๋กœ๋งŒ ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ๋Š” ์ƒํ™ฉ์—์„œ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. ๋‘ ์ œ์–ด ํ๋น„ํŠธ์— ๋™์ผํ•œ ํ๋น„ํŠธ๊ฐ€ ์ „๋‹ฌ๋˜๋ฉด OpenQASM ๊ทœ๊ฒฉ์— ๋”ฐ๋ผ ๋Ÿฐํƒ€์ž„์— ํŒจ๋‹‰ํ•ฉ๋‹ˆ๋‹ค.
    • ReversibleCircuit::ccx(&Qubit, &Qubit, &mut Qubit): compute ๋‹จ๊ณ„์—์„œ ๋ณด์กฐ ํ๋น„ํŠธ์— ANDํ˜• ํ•จ์ˆ˜๋ฅผ ๊ณ„์‚ฐํ•  ์ˆ˜ ์žˆ๋„๋ก ์ถ”๊ฐ€๋˜์—ˆ์œผ๋ฉฐ, ์ž๊ธฐ ์—ญ์›(self-inverse) ์„ฑ์งˆ์„ ์ด์šฉํ•ด uncompute ์‹œ ์—ญ์ˆœ์œผ๋กœ ์žฌ์ƒ๋ฉ๋‹ˆ๋‹ค. ๊ณต์œ  ์ฐธ์กฐ ๊ธฐ๋ฐ˜ ์ œ์–ด์ด๋ฏ€๋กœ ๋‘ ์ œ์–ด ํ๋น„ํŠธ๊ฐ€ ๊ฐ™์œผ๋ฉด ๋Ÿฐํƒ€์ž„์— ํŒจ๋‹‰ํ•ฉ๋‹ˆ๋‹ค.
    • OpenQASM 3 ์ถœ๋ ฅ: ccx q[a], q[b], q[t]; ํ˜•์‹์œผ๋กœ ์ถœ๋ ฅ๋ฉ๋‹ˆ๋‹ค.
    • ์‹œ๋ฎฌ๋ ˆ์ดํ„ฐ ๋ฐ ๋ฐฑ์—”๋“œ ์ง€์›:
      • CPU ์ƒํƒœ ๋ฒกํ„ฐ(src/statevector.rs): Op::Ccx ์ง์ ‘ ์ง„ํญ ์Šค์™‘ ๊ตฌํ˜„.
      • ์Šคํƒœ๋นŒ๋ผ์ด์ € ๋ฐฑ์—”๋“œ(src/stabilizer.rs): if_one/if_zero ๋ถ„๊ธฐ ๋‚ด๋ถ€๋ฅผ ํฌํ•จํ•ด SimError::NotClifford { gate: "ccx" }๋กœ ๊ฑฐ๋ถ€ํ•˜๋ฉฐ, Circuit::is_clifford๋Š” false๋ฅผ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.
  • ๋Ÿฐํƒ€์ž„ with_ancilla ๊ณ„์•ฝ ๊ฒ€์ฆ ๊ฐ€๋“œ (3022ae5)
    • with_ancilla ๋ฐ with_ancillas์˜ apply ๋‹จ๊ณ„ ๋™์•ˆ ๋ชจ๋“  ๋ณด์กฐ ํ๋น„ํŠธ์™€ compute ๋‹จ๊ณ„๊ฐ€ ์ ‘๊ทผํ•œ ๋ชจ๋“  ํ๋น„ํŠธ๋ฅผ ์ž ๊ธˆ ์ƒํƒœ๋กœ ์œ ์ง€ํ•ฉ๋‹ˆ๋‹ค.
    • ์ž ๊ธด ํ๋น„ํŠธ๋ฅผ ์ œ์–ด ํ๋น„ํŠธ ๋˜๋Š” ๋Œ€๊ฐ ์œ„์ƒ ๊ฒŒ์ดํŠธ(z, s, sdg, t, tdg, rz) ์™ธ์˜ ์šฉ๋„(h, x, rx, ry, cx/ccx์˜ ํƒ€๊นƒ, measure, reset, ํ˜น์€ ์ค‘์ฒฉ๋œ ๋ฒ”์œ„์˜ compute ์“ฐ๊ธฐ ๋“ฑ)๋กœ ์‚ฌ์šฉํ•˜๋ฉด with_ancilla ๋ฌธ์ž์—ด์„ ํฌํ•จํ•œ ๋ฉ”์‹œ์ง€์™€ ํ•จ๊ป˜ ํŒจ๋‹‰ํ•ฉ๋‹ˆ๋‹ค.

๐Ÿ› Bug Fixes & Stability

  • ๋‚ด๋ถ€ ๊ฐ€๋ณ€์„ฑ ์šฐํšŒ๋กœ ์ธํ•œ ๋ณด์กฐ ํ๋น„ํŠธ ์˜ค์—ผ ๋ฐฉ์ง€ (3022ae5): RefCellยทMutex ๋“ฑ์œผ๋กœ ๊ฐ์‹ผ ํ๋น„ํŠธ๋ฅผ with_ancilla์˜ apply ๋‹จ๊ณ„์—์„œ ์ˆ˜์ •ยท์ธก์ •ยท์ดˆ๊ธฐํ™”ํ•  ๊ฒฝ์šฐ ๋ณด์กฐ ํ๋น„ํŠธ๊ฐ€ |0โŸฉ์œผ๋กœ ๋ณต์›๋˜์ง€ ์•Š๊ณ  Circuit::may_be_entangled ๊ฒฐ๊ณผ๊นŒ์ง€ ์™œ๊ณก๋˜๋˜ ๋ฌธ์ œ๋ฅผ ๋Ÿฐํƒ€์ž„ ์ž ๊ธˆ ๊ฒ€์‚ฌ๋กœ ์ฐจ๋‹จํ–ˆ์Šต๋‹ˆ๋‹ค.
  • ์ค‘๋ณต ์ œ์–ด ํ๋น„ํŠธ ์กฐ๊ธฐ ๊ฒ€์ถœ (959864d): ๊ณต์œ  ์ฐธ์กฐ(&Qubit)๋ฅผ ๋ฐ›๋Š” Circuit::ccx_ctrl ๋ฐ ReversibleCircuit::ccx์—์„œ ๋‘ ์ œ์–ด ํ๋น„ํŠธ๊ฐ€ ๋™์ผํ•œ ์Šฌ๋กฏ์„ ๊ฐ€๋ฆฌํ‚ค๋Š” ๊ฒฝ์šฐ OpenQASM 3์—์„œ ๊ฑฐ๋ถ€๋˜๋Š” ์ž˜๋ชป๋œ ๊ฒŒ์ดํŠธ๊ฐ€ ์ƒ์„ฑ๋˜์ง€ ์•Š๋„๋ก check_distinct_controls๋กœ ์ฆ‰์‹œ ํŒจ๋‹‰ํ•ฉ๋‹ˆ๋‹ค.
  • ๊ฒ€์ฆ ํ…Œ์ŠคํŠธ ํ™•์ถฉ (959864d, 3022ae5):
    • tests/circuits.rs, tests/backends.rs, tests/entanglement.rs, tests/gpu.rs: CPU ๋ฐ GPU ํ™˜๊ฒฝ์—์„œ 6๊ฐ€์ง€ ์—ญํ•  ์ˆœ์„œ ร— 8๊ฐ€์ง€ ๊ธฐ์ € ์ž…๋ ฅ(ccx ์ง„๋ฆฌํ‘œ) ์ „์ˆ˜ ๊ฒ€์ฆ, ์Šคํƒœ๋นŒ๋ผ์ด์ € ๊ฑฐ๋ถ€, ์–ฝํž˜ ๊ทธ๋ฃน ๋ณ‘ํ•ฉ, ๋ฌด์ž‘์œ„ ํšŒ๋กœ ํ…Œ์ŠคํŠธ์— ccx ์ถ”๊ฐ€.
    • src/uncompute.rs, tests/uncompute.rs: ๊ฑฐ๋ถ€๋˜๋Š” ๋ชจ๋“  ์—ฐ์‚ฐ๋ณ„ #[should_panic(expected = "with_ancilla")] ํ…Œ์ŠคํŠธ, ํ—ˆ์šฉ๋˜๋Š” ์ œ์–ด/๋Œ€๊ฐ ์œ„์ƒ/์ค‘์ฒฉ ์Šค์ฝ”ํ”„ ํ†ต๊ณผ ํ…Œ์ŠคํŠธ, ๋ฒ”์œ„ ์ข…๋ฃŒ ํ›„ ๋ณด์กฐ ํ๋น„ํŠธ๊ฐ€ |0โŸฉ ์ƒํƒœ๋ฅผ ์œ ์ง€ํ•จ์„ ํ™•์ธํ•˜๋Š” ์ง„ํญ ํ…Œ์ŠคํŠธ ์ถ”๊ฐ€.

โšก Performance & Architectural Improvements

  • ์ „์šฉ CubeCL GPU ccx ์ปค๋„ (src/gpu.rs, 959864d): ccx ์‹คํ–‰ ์‹œ CPU ํด๋ฐฑ ์—†์ด ์œ ๋‹ˆํƒ€๋ฆฌ ํ”„๋ฆฌํ”ฝ์Šค ๋‚ด์—์„œ ์ง์ ‘ ์‹คํ–‰๋˜๋Š” ์ „์šฉ CubeCL ccx ์ปค๋„์„ ๊ตฌํ˜„ํ–ˆ์Šต๋‹ˆ๋‹ค. ์ •๋ ฌ๋œ 3๊ฐœ ํ๋น„ํŠธ ๋น„ํŠธ ์œ„์น˜๋ฅผ ๊ธฐ์ค€์œผ๋กœ ์ง„ํญ 8๊ฐœ ๋ฌถ์Œ๋‹น ์Šค๋ ˆ๋“œ 1๊ฐœ๋ฅผ ํ• ๋‹นํ•ฉ๋‹ˆ๋‹ค.
  • ์Šฌ๋กฏ๋ณ„ ์ž ๊ธˆ ์นด์šดํ„ฐ ๋ฐ ๊ฒŒ์ดํŠธ ๊ฒฝ๋กœ ํ†ตํ•ฉ (src/lib.rs, src/uncompute.rs, 3022ae5): Circuit์— locked: Vec<u32> ์นด์šดํ„ฐ๋ฅผ ๋„์ž…ํ•˜์—ฌ ๋™์ผํ•œ ์ž…๋ ฅ ํ๋น„ํŠธ๋ฅผ ๊ณต์œ ํ•˜๋Š” ์ค‘์ฒฉ with_ancilla ์Šค์ฝ”ํ”„๋ฅผ ์ง€์›ํ•˜๊ณ , ๊ฐ€์—ญ ํšŒ๋กœ์˜ Op::Gate ๊ธฐ๋ก๋„ Circuit::push_gate๋ฅผ ๊ฑฐ์น˜๋„๋ก ํ†ตํ•ฉํ•˜์—ฌ ์ค‘์ฒฉ ๊ณ„์‚ฐ ๋‹จ๊ณ„์™€ ๋ถ„๊ธฐ๊นŒ์ง€ ์ผ๊ด€๋˜๊ฒŒ ๊ฒ€์‚ฌํ•ฉ๋‹ˆ๋‹ค.
  • 3ํ๋น„ํŠธ ์–ฝํž˜ ๊ทธ๋ฃน ๋ณ‘ํ•ฉ (src/groups.rs, src/lib.rs, 959864d): push_ccx์—์„œ ๋‘ ์ œ์–ด ํ๋น„ํŠธ์™€ ํƒ€๊นƒ ํ๋น„ํŠธ ์„ธ ์Šฌ๋กฏ์„ ๋ชจ๋‘ ์œ ๋‹ˆ์˜จ ํŒŒ์ธ๋“œ(self.groups)๋กœ ๋ณ‘ํ•ฉํ•˜์—ฌ may_be_entangled๊ฐ€ 3ํ๋น„ํŠธ ์–ฝํž˜ ๊ฐ€๋Šฅ์„ฑ์„ ์ถ”์ ํ•˜๋„๋ก ํ™•์žฅํ–ˆ์Šต๋‹ˆ๋‹ค.

๐Ÿ“š Documentation & Tooling

  • ์„ค๊ณ„ ๋ฌธ์„œ ๋ฐ ๊ฐ€์ด๋“œ ์—…๋ฐ์ดํŠธ (687e242, 3022ae5):
    • docs/design/uncomputation.md: ์„น์…˜ 9์— ccx ๋ฐ ์Šฌ๋กฏ๋ณ„ ๋Ÿฐํƒ€์ž„ ์ž ๊ธˆ ์นด์šดํ„ฐ ์„ค๊ณ„๋ฅผ ๋ฐ˜์˜ํ•˜๊ณ , ๊ธฐ์กด ์„น์…˜ 5ยท6 ์ƒํ˜ธ ์ฐธ์กฐ์™€ ๊ฒ€์ฆ ์„น์…˜์„ ์ตœ์‹ ํ™”ํ–ˆ์Šต๋‹ˆ๋‹ค.
    • docs/gpu.md: ์„ธ ๋ฒˆ์งธ ์ปค๋„์ธ ccx ์ปค๋„(8์ง„ํญ๋‹น 1์Šค๋ ˆ๋“œ), ์œ ๋‹ˆํƒ€๋ฆฌ ํ”„๋ฆฌํ”ฝ์Šค ์ง€์›, 3ํ๋น„ํŠธ ์ด์ƒ ๋ฌด์ž‘์œ„ ํšŒ๋กœ ๋ฐ ์ง„๋ฆฌํ‘œ ๊ฒ€์ฆ ํ•ญ๋ชฉ์„ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.
    • README.md: ๋‹ค๋ฅธ ์–‘์ž ์–ธ์–ด์™€์˜ ๋น„๊ต ํ‘œ์—์„œ qxide์˜ ccx ์ง€์› ๋ฐ ๋Ÿฐํƒ€์ž„(RefCell ๋“ฑ) ๊ฒ€์ฆ ๋‚ด์šฉ์„ ๋ฐ˜์˜ํ–ˆ์Šต๋‹ˆ๋‹ค.
  • ์˜ˆ์ œ ๋ฐ ๋ฆด๋ฆฌ์Šค ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ (959864d, 2962709):
    • examples/qasm_dump.rs์— ccx ์ถœ๋ ฅ ์˜ˆ์ œ๋ฅผ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.
    • Cargo.toml์˜ ํŒจํ‚ค์ง€ ๋ฒ„์ „์„ 0.4.0์œผ๋กœ ์ƒํ–ฅํ–ˆ์Šต๋‹ˆ๋‹ค.

โš ๏ธ Breaking Changes & Migration Guide

๊ณต๊ฐœ API ์‹œ๊ทธ๋‹ˆ์ฒ˜ ๋ณ€๊ฒฝ ์‚ฌํ•ญ์€ ์—†์Šต๋‹ˆ๋‹ค. (Circuit::ccx, Circuit::ccx_ctrl, ReversibleCircuit::ccx ๋“ฑ ์‹ ๊ทœ API๋งŒ ์ถ”๊ฐ€๋˜์—ˆ์Šต๋‹ˆ๋‹ค.)

๋‹ค๋งŒ ๋‹ค์Œ๊ณผ ๊ฐ™์€ **๋Ÿฐํƒ€์ž„ ๋™์ž‘ ๋ณ€๊ฒฝ(Behavioral Breaking Change)**์ด ํฌํ•จ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.

  • ๋ณ€๊ฒฝ ๋‚ด์šฉ: v0.3.0์—์„œ RefCellยทMutex ๊ฐ™์€ ๋‚ด๋ถ€ ๊ฐ€๋ณ€์„ฑ์„ ์ด์šฉํ•ด with_ancilla / with_ancillas์˜ apply ๋‹จ๊ณ„ ๋‚ด๋ถ€์—์„œ compute๊ฐ€ ์‚ฌ์šฉํ•œ ํ๋น„ํŠธ๋ฅผ ์ˆ˜์ •(h, x, rx, ry, cx/ccx ํƒ€๊นƒ ๋“ฑ)ยท์ธก์ •(measure)ยท์ดˆ๊ธฐํ™”(reset)ํ•˜๊ฑฐ๋‚˜ ์ค‘์ฒฉ๋œ compute์— ์“ฐ๋˜ ์ฝ”๋“œ๋Š” ์ด์ œ with_ancilla ๋ฉ”์‹œ์ง€๋ฅผ ํฌํ•จํ•œ ํŒจ๋‹‰์„ ๋ฐœ์ƒ์‹œํ‚ต๋‹ˆ๋‹ค.
  • ๋ณ€๊ฒฝ ์ด์œ : ํ•ด๋‹น ํŒจํ„ด์€ ๊ธฐ์กด์—๋„ ๋ณด์กฐ ํ๋น„ํŠธ๊ฐ€ |0โŸฉ์œผ๋กœ ๋˜๋Œ์•„๊ฐ€์ง€ ์•Š๊ณ  may_be_entangled๊ฐ€ ์ž˜๋ชป๋œ ๊ฐ’์„ ๋ณด๊ณ ํ•˜๋Š” ๋“ฑ ์ž˜๋ชป๋œ ์‹œ๋ฎฌ๋ ˆ์ด์…˜ ๊ฒฐ๊ณผ๋ฅผ ๋งŒ๋“ค์–ด ๋‚ด๋˜ ๋น„๊ฑด์ „ํ•œ ์‚ฌ์šฉ ๋ฐฉ์‹์ด์—ˆ์Šต๋‹ˆ๋‹ค.
  • ๋งˆ์ด๊ทธ๋ ˆ์ด์…˜ ๋ฐฉ๋ฒ•:
    1. apply ๋‹จ๊ณ„ ๋‚ด๋ถ€์—์„œ๋Š” compute๊ฐ€ ๊ฑด๋“œ๋ฆฐ ํ๋น„ํŠธ๋ฅผ cx_ctrlยทccx_ctrl์˜ ์ œ์–ด ํ๋น„ํŠธ๋‚˜ ๋Œ€๊ฐ ์œ„์ƒ ๊ฒŒ์ดํŠธ(z, s, sdg, t, tdg, rz)๋กœ๋งŒ ์‚ฌ์šฉํ•˜์„ธ์š”.
    2. ๊ธฐ์ € ๋ณ€ํ™˜, ํƒ€๊นƒ ์ง€์ •, measure, reset ๋“ฑ ์ƒํƒœ ๋ณ€ํ˜• ์—ฐ์‚ฐ์ด ํ•„์š”ํ•˜๋‹ค๋ฉด ํ•ด๋‹น ์—ฐ์‚ฐ์„ with_ancilla ์Šค์ฝ”ํ”„ ๋ฐ–์œผ๋กœ ์ด๋™ํ•˜์„ธ์š”.

๐Ÿ“ฆ Installation & Verification

์„ค์น˜

crates.io์—์„œ qxide v0.4.0์„ ์„ค์น˜ํ•˜๊ฑฐ๋‚˜ Cargo.toml์— ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

cargo add qxide

Cargo.toml ์ง์ ‘ ์ง€์ • ์‹œ:

[dependencies]
qxide = "0.4.0"

GPU ํ”„๋กœํ† ํƒ€์ž… ๋ฐฑ์—”๋“œ(gpu ํ”ผ์ฒ˜)๋ฅผ ํ•จ๊ป˜ ์‚ฌ์šฉํ•˜๋ ค๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.

[dependencies]
qxide = { version = "0.4.0", features = ["gpu"] }

๊ฒ€์ฆ ๋ช…๋ น ๋ฐ ์ƒํƒœ

v0.4.0 ๋ฆด๋ฆฌ์Šค ๊ธฐ์ค€์œผ๋กœ CI(ubuntu-latest, windows-latest)์—์„œ ๋‹ค์Œ ํ•ญ๋ชฉ๋“ค์ด ๋ชจ๋‘ ํ†ต๊ณผํ–ˆ์œผ๋ฉฐ, GPU ํ…Œ์ŠคํŠธ๋Š” ๋กœ์ปฌ ํ™˜๊ฒฝ์—์„œ ๊ฒ€์ฆ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

# ํฌ๋งท ๋ฐ ๋ฆฐํŠธ ๊ฒ€์‚ฌ (fmt ๋ฐ ๊ธฐ๋ณธ clippy๋Š” CI ubuntu-latest / windows-latest ํ†ต๊ณผ, --features gpu clippy๋Š” CI ubuntu-latest์—์„œ๋งŒ ์‹คํ–‰)
cargo fmt --check
cargo clippy --all-targets -- -D warnings
cargo clippy --all-targets --features gpu -- -D warnings

# ์ „์ฒด ๋‹จ์œ„ยทํ†ตํ•ฉ ํ…Œ์ŠคํŠธ (CI: ubuntu-latest / windows-latest ํ†ต๊ณผ)
cargo test

# GPU ๋ฐฑ์—”๋“œ ํ…Œ์ŠคํŠธ (๋กœ์ปฌ GPU ํ™˜๊ฒฝ์—์„œ ํ†ต๊ณผ; CI์—์„œ๋Š” ๋นŒ๋“œ ๋ฐ clippy๋งŒ ์‹คํ–‰)
cargo test --features gpu

# OpenQASM 3 ์ถœ๋ ฅ ๋ฐ Qiskit 2.6.2 (qiskit-qasm3-import) ํŒŒ์‹ฑ ๊ฒ€์ฆ (CI ํ†ต๊ณผ)
cargo run --example qasm_dump -- qasm-out
python ci/check_qasm.py qasm-out

v0.3.0

Choose a tag to compare

@rigelx2b rigelx2b released this 19 Nov 05:14

Release Notes: qxide v0.3.0

๐Ÿš€ Overview & Key Highlights

qxide v0.3.0์€ ์–‘์ž ํšŒ๋กœ์˜ ์•ˆ์ „์„ฑ๊ณผ ํ‘œํ˜„๋ ฅ์„ ๋†’์ด๋Š” ์„ธ ๊ฐ€์ง€ ํ•ต์‹ฌ ๊ธฐ๋Šฅโ€”์—ญ์œ„์ƒ ๊ฒŒ์ดํŠธ(sdg/tdg), ๋Ÿฐํƒ€์ž„ ์–ฝํž˜ ์ถ”์ (Circuit::may_be_entangled), ์Šค์ฝ”ํ”„ ๊ธฐ๋ฐ˜ ์ž๋™ ์—ญ๊ณ„์‚ฐ(Circuit::with_ancilla)โ€”์„ ์ถ”๊ฐ€ํ•˜๋Š” ๋งˆ์ด๋„ˆ ๋ฆด๋ฆฌ์Šค์ž…๋‹ˆ๋‹ค.

์ด๋ฒˆ ๋ฆด๋ฆฌ์Šค๋Š” ๋ณ„๋„์˜ ์ปค์Šคํ…€ ์ปดํŒŒ์ผ๋Ÿฌ ์—†์ด๋„ Rust์˜ ์†Œ์œ ๊ถŒยท๋นŒ๋ฆผ ๊ฒ€์‚ฌ๊ธฐ(borrow checker)๋ฅผ ํ™œ์šฉํ•ด ๋น„๋ฌผ๋ฆฌ์ ์ด๊ฑฐ๋‚˜ ๋ถˆ์•ˆ์ „ํ•œ ์—ญ๊ณ„์‚ฐ ํŒจํ„ด์„ ์ปดํŒŒ์ผ ํƒ€์ž„์— ์ฐจ๋‹จํ•˜๋Š” ๋ฐ ์ดˆ์ ์„ ๋งž์ท„์Šต๋‹ˆ๋‹ค. ๋˜ํ•œ ํšŒ๋กœ๋ฅผ ์‹ค์ œ๋กœ ์‹œ๋ฎฌ๋ ˆ์ด์…˜ํ•˜์ง€ ์•Š๊ณ ๋„ ๋‘ ํ๋น„ํŠธ ๊ฐ„ ์–ฝํž˜ ๊ฐ€๋Šฅ์„ฑ์„ ๋ณด์ˆ˜์ ์œผ๋กœ ํŒ๋ณ„ํ•  ์ˆ˜ ์žˆ๋Š” ๊ธฐ๋ฐ˜์„ ๋งˆ๋ จํ–ˆ์œผ๋ฉฐ, v0.2.0(bd76031) ๋Œ€๋น„ ํ•˜์œ„ ํ˜ธํ™˜์„ฑ์„ ๊นจ๋Š” API ๋ณ€๊ฒฝ ์—†์ด crates.io์— ํ•จ๊ป˜ ๋ฐฐํฌ๋ฉ๋‹ˆ๋‹ค.

  • ์—ญ์œ„์ƒ ๊ฒŒ์ดํŠธ ์ถ”๊ฐ€: Circuit::sdg ๋ฐ Circuit::tdg๋ฅผ ์ง€์›ํ•˜๋ฉฐ CPU ์ƒํƒœ ๋ฒกํ„ฐ, ์Šคํƒœ๋นŒ๋ผ์ด์ €(sdg), GPU ๋ฐฑ์—”๋“œ ๋ฐ OpenQASM 3 ์ถœ๋ ฅ์„ ๋ชจ๋‘ ํฌ๊ด„ํ•ฉ๋‹ˆ๋‹ค.
  • ๋Ÿฐํƒ€์ž„ ์–ฝํž˜ ์ถ”์ : src/groups.rs์˜ ๋น„๊ณต๊ฐœ union-find ๊ตฌ์กฐ๋ฅผ ํ†ตํ•ด ๊ณฑ ์ƒํƒœ(product state) ์—ฌ๋ถ€๋ฅผ ๋ณด์ˆ˜์ ์œผ๋กœ ๋ณด์žฅํ•˜๋Š” Circuit::may_be_entangled(&a, &b)๋ฅผ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.
  • ์Šค์ฝ”ํ”„ ๊ธฐ๋ฐ˜ ์ž๋™ ์—ญ๊ณ„์‚ฐ: Circuit::with_ancilla, Circuit::with_ancillas::<N>, ReversibleCircuit, Circuit::cx_ctrl์„ ํ†ตํ•ด ๋ณด์กฐ ํ๋น„ํŠธ(ancilla)์˜ ํ• ๋‹นยท์—ฐ์‚ฐยท์—ญ๊ณ„์‚ฐยทํ•ด์ œ ๋ฐ ์Šฌ๋กฏ ์žฌ์‚ฌ์šฉ์„ ์ž๋™ํ™”ํ•ฉ๋‹ˆ๋‹ค.

๐Ÿ›  Detailed Changelog

โœจ New Features

  • ์—ญ์œ„์ƒ ๊ฒŒ์ดํŠธ Circuit::sdg / Circuit::tdg ์ถ”๊ฐ€ (9eb5dd3)

    • Circuit::sdg ๋ฐ Circuit::tdg(Gate::Sdg, Gate::Tdg)๋ฅผ ๋„์ž…ํ•˜๊ณ  OpenQASM 3 ๊ฒŒ์ดํŠธ ์ด๋ฆ„ sdg, tdg ์ถœ๋ ฅ์„ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค.
    • sdg๋Š” Clifford ๊ฒŒ์ดํŠธ๋กœ, Backend::Stabilizer(src/stabilizer.rs)์—์„œ ๋ณ„๋„ ํƒœ๋ธ”๋กœ ์—ฐ์‚ฐ์„ ์ถ”๊ฐ€ํ•˜์ง€ ์•Š๊ณ  S^3๋กœ ๋ถ„ํ•ดํ•ด ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค(Circuit::is_clifford ์ง€์›).
    • tdg๋Š” non-Clifford ๊ฒŒ์ดํŠธ๋กœ, Backend::Auto ์‹คํ–‰ ์‹œ ์ƒํƒœ ๋ฒกํ„ฐ ๋ฐฑ์—”๋“œ๋กœ ์ž๋™ ๋ผ์šฐํŒ…๋˜๋ฉฐ Backend::Stabilizer๋กœ ๊ฐ•์ œ ์‹คํ–‰ํ•  ๊ฒฝ์šฐ SimError::NotClifford { gate: "tdg" } ์˜ค๋ฅ˜๋ฅผ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.
    • src/statevector.rs์˜ 2ร—2 ์œ ๋‹ˆํ„ฐ๋ฆฌ ํ–‰๋ ฌ ๊ฒฝ๋กœ๋ฅผ ํ†ตํ•ด CPU ์ƒํƒœ ๋ฒกํ„ฐ์™€ GPU ๋ฐฑ์—”๋“œ ๋ชจ๋‘์—์„œ ๋™์ž‘ํ•˜๋ฉฐ, tests/circuits.rs, tests/backends.rs, tests/gpu.rs, examples/qasm_dump.rs์— ๊ฒ€์ฆ ์ผ€์ด์Šค๋ฅผ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.
  • ๋Ÿฐํƒ€์ž„ ์–ฝํž˜ ์ถ”์  Circuit::may_be_entangled ์ถ”๊ฐ€ (7b9447f)

    • ์‹œ๋ฎฌ๋ ˆ์ด์…˜์„ ์ˆ˜ํ–‰ํ•˜์ง€ ์•Š๊ณ ๋„ ๋‘ ํ๋น„ํŠธ์˜ ์–ฝํž˜ ๊ฐ€๋Šฅ์„ฑ์„ ์งˆ์˜ํ•  ์ˆ˜ ์žˆ๋Š” Circuit::may_be_entangled(&self, a: &Qubit, b: &Qubit) -> bool์„ src/lib.rs์— ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.
    • ๋น„๊ณต๊ฐœ src/groups.rs์˜ union-find(Groups) ๊ธฐ๋ฐ˜ ๋ณด์ˆ˜์  ๊ณผ๋Œ€ ๊ทผ์‚ฌ(conservative over-approximation) ๋กœ ๊ตฌํ˜„๋˜์–ด, ๋ฐ˜ํ™˜๊ฐ’์ด false์ด๋ฉด ๋‘ ํ๋น„ํŠธ๊ฐ€ ๋ฐ˜๋“œ์‹œ ๊ณฑ ์ƒํƒœ(product state)์ž„์„ ๋ณด์žฅํ•˜๊ณ  true์ด๋ฉด ์–ฝํ˜€ ์žˆ์„ ๊ฐ€๋Šฅ์„ฑ์ด ์žˆ์Œ์„ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค.
    • cx(Circuit::push_cx)๋Š” ์กฐ๊ฑด๋ถ€ ๋ถ„๊ธฐ(if_one / if_zero) ๋‚ด๋ถ€๋ฅผ ํฌํ•จํ•ด ์ œ์–ดยทํƒ€๊นƒ ํ๋น„ํŠธ ๊ทธ๋ฃน์„ ๋ณ‘ํ•ฉํ•˜๋ฉฐ, measure์™€ ์ตœ์ƒ์œ„(depth == 0) reset์€ ํ•ด๋‹น ์Šฌ๋กฏ์„ ๋ถ„๋ฆฌ(detach)ํ•ฉ๋‹ˆ๋‹ค. ๋ฐ˜๋ฉด ๋ถ„๊ธฐ ๋‚ด๋ถ€์˜ reset์€ ์‹คํ–‰๋˜์ง€ ์•Š์„ ์ˆ˜ ์žˆ์œผ๋ฏ€๋กœ ๊ทธ๋ฃน์—์„œ ๋ถ„๋ฆฌํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.
    • tests/entanglement.rs์˜ ์ „์ด์„ฑยท์Šฌ๋กฏ ์žฌ์‚ฌ์šฉยท๋ถ„๊ธฐ ๋™์ž‘ ํ…Œ์ŠคํŠธ์™€ src/groups.rs์˜ ๋ฌด์ž‘์œ„ ์ถ•์†Œ ๋ฐ€๋„ ํ–‰๋ ฌ(reduced density matrix) ๊ธฐ๋ฐ˜ ๊ฑด์ „์„ฑ ํ…Œ์ŠคํŠธ๋กœ ๊ฒ€์ฆํ–ˆ์Šต๋‹ˆ๋‹ค.
  • ์Šค์ฝ”ํ”„ ๊ธฐ๋ฐ˜ ์ž๋™ ์—ญ๊ณ„์‚ฐ Circuit::with_ancilla ์ถ”๊ฐ€ (2610c09)

    • src/uncompute.rs์— Circuit::with_ancilla(compute, apply) -> R, Circuit::with_ancillas::<N>, Circuit::cx_ctrl(&Qubit, &mut Qubit) ๋ฐ x, cx(&Qubit, &mut Qubit) ์—ฐ์‚ฐ๋งŒ ํ—ˆ์šฉํ•˜๋Š” ๊ณต๊ฐœ ํƒ€์ž… ReversibleCircuit์„ ๊ตฌํ˜„ํ–ˆ์Šต๋‹ˆ๋‹ค.
    • ์‹คํ–‰ ์‹œ compute ํด๋กœ์ €์˜ ์—ฐ์‚ฐ์„ ๋จผ์ € ๊ธฐ๋กํ•œ ๋’ค, ํ• ๋‹น๋œ ๋ณด์กฐ ํ๋น„ํŠธ๋ฅผ &Qubit(์ œ์–ด ์ „์šฉ) ํ˜•ํƒœ๋กœ ๋„˜๊ฒจ apply ํด๋กœ์ €๋ฅผ ์‹คํ–‰ํ•˜๊ณ , ์Šค์ฝ”ํ”„ ์ข…๋ฃŒ ์‹œ compute ์—ฐ์‚ฐ์„ ์—ญ์ˆœ์œผ๋กœ ๋‹ค์‹œ ๋ฐฉ์ถœํ•ฉ๋‹ˆ๋‹ค. ์ดํ›„ ๋ณด์กฐ ํ๋น„ํŠธ ์Šฌ๋กฏ์€ ์žฌ์‚ฌ์šฉ ํ’€๋กœ ๋ฐ˜ํ™˜๋˜๋ฉฐ ์–ฝํž˜ ๊ทธ๋ฃน์—์„œ๋„ ๋ถ„๋ฆฌ๋ฉ๋‹ˆ๋‹ค.
    • ReversibleCircuit์— h ๋ฉ”์„œ๋“œ๊ฐ€ ์—†๋Š” ํƒ€์ž… ์ œ์•ฝ์œผ๋กœ compute ๋‚ด๋ถ€์˜ h ํ˜ธ์ถœ์„, ํƒ€์ž… ๋ฐ ๋นŒ๋ฆผ ๊ฒ€์‚ฌ๊ธฐ๋กœ apply ๋‚ด๋ถ€์˜ ๋ณด์กฐ ํ๋น„ํŠธ ๋ณ€๊ฒฝ๊ณผ compute๊ฐ€ ์ฝ์€ ์ž…๋ ฅ ํ๋น„ํŠธ ๋ณ€๊ฒฝ์„ ์ปดํŒŒ์ผ ํƒ€์ž„ ์˜ค๋ฅ˜๋กœ ์ฐจ๋‹จํ•ฉ๋‹ˆ๋‹ค(src/lib.rs์˜ compile_fail doctest ๋ฐ tests/uncompute.rs๋กœ ๊ฒ€์ฆ).
    • ์„ค๊ณ„ ๋ฌธ์„œ ๋Œ€๋น„ ๊ตฌํ˜„ ๋ฒ”์œ„: h/rx/ry ๋“ฑ์˜ ๊ฒŒ์ดํŠธ๋Š” ์—ญ๊ณ„์‚ฐ ์‹œ ๋ณด์กฐ ํ๋น„ํŠธ๋ฅผ |0โŸฉ ์ƒํƒœ๋กœ ๋ณต์›ํ•˜์ง€ ๋ชปํ•˜๋ฏ€๋กœ compute์—์„œ ํ—ˆ์šฉํ•˜๋Š” ์—ฐ์‚ฐ์„ x/cx๋กœ ์ œํ•œํ–ˆ์Šต๋‹ˆ๋‹ค. ccx ๊ฒŒ์ดํŠธ๋Š” ์•„์ง ์ง€์›ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

๐Ÿ› Bug Fixes & Stability

์ด๋ฒˆ ๋ฆด๋ฆฌ์Šค์—๋Š” ๋ณ„๋„์˜ ๋ฒ„๊ทธ ์ˆ˜์ • ์ปค๋ฐ‹์€ ์—†์œผ๋ฉฐ, ์‹ ๊ทœ ๊ธฐ๋Šฅ์˜ ๊ฑด์ „์„ฑ(soundness) ๋ณด์žฅ๊ณผ ์•Œ๋ ค์ง„ ํ•œ๊ณ„ ๋ช…ํ™•ํ™”์— ์ง‘์ค‘ํ–ˆ์Šต๋‹ˆ๋‹ค.

  • ๋‚ด๋ถ€ ๊ฐ€๋ณ€์„ฑ(Interior Mutability) ์šฐํšŒ ํ•œ๊ณ„ ๋ฌธ์„œํ™” (3f3152b)
    • RefCell, Mutex ๋“ฑ ๋‚ด๋ถ€ ๊ฐ€๋ณ€์„ฑ ์ปจํ…Œ์ด๋„ˆ ๋’ค์— ๋ฐฐ์น˜๋œ ํ๋น„ํŠธ๋Š” ์ผ๋ฐ˜ ๋ถˆ๋ณ€ ๋นŒ๋ฆผ์— ์˜์กดํ•˜๋Š” Circuit::with_ancilla์˜ ์ปดํŒŒ์ผ ํƒ€์ž„ ๋ณด์žฅ์„ ์šฐํšŒํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
    • apply ๋‹จ๊ณ„์—์„œ ์ด๋Ÿฌํ•œ ํ๋น„ํŠธ๋ฅผ ๋ณ€๊ฒฝํ•˜๋ฉด ๋ณด์กฐ ํ๋น„ํŠธ๊ฐ€ |0โŸฉ์œผ๋กœ ๋ณต์›๋˜์ง€ ์•Š์„ ์ˆ˜ ์žˆ๊ณ , ์Šค์ฝ”ํ”„ ์ข…๋ฃŒ ํ›„ Circuit::may_be_entangled๊ฐ€ ๊ฑฐ์ง“์œผ๋กœ ๋ฏธ์–ฝํž˜(false)์„ ๋ณด๊ณ ํ•  ์ˆ˜ ์žˆ์Œ์„ src/uncompute.rs์˜ rustdoc๊ณผ docs/design/uncomputation.md์— ๋ช…์‹œํ–ˆ์Šต๋‹ˆ๋‹ค.

โšก Performance & Architectural Improvements

  • ๋ฌผ๋ฆฌ ์Šฌ๋กฏ ์žฌ์‚ฌ์šฉ ๋ฐ ์‹ฑ๊ธ€ํ„ด ์žฌํ• ๋‹น ๊ธฐ๋ฐ˜ ๊ทธ๋ฃน ๋ถ„๋ฆฌ (7b9447f, 2610c09)
    • src/groups.rs์˜ Groups๋Š” ๋ฌผ๋ฆฌ ํ๋น„ํŠธ ์Šฌ๋กฏ์„ ๊ฐ„์ ‘ ๋…ธ๋“œ(indirection node)์— ๋งคํ•‘ํ•˜๊ณ  detach ์‹œ ํŠธ๋ฆฌ์—์„œ ๋…ธ๋“œ๋ฅผ ์‚ญ์ œํ•˜๋Š” ๋Œ€์‹  ์ƒˆ ์‹ฑ๊ธ€ํ„ด ๋…ธ๋“œ๋กœ ์žฌํ• ๋‹นํ•ฉ๋‹ˆ๋‹ค. ์ด๋ฅผ ํ†ตํ•ด ๊ธฐ์กด ๊ทธ๋ฃน ๋ฉค๋ฒ„ ๊ฐ„์˜ ์—ฐ๊ฒฐ์„ ๋ณด์กดํ•˜๋ฉด์„œ๋„ ์žฌ์‚ฌ์šฉ ์Šฌ๋กฏ์ด ํ•ญ์ƒ ๋ฏธ์–ฝํž˜ ์ƒํƒœ๋กœ ์‹œ์ž‘ํ•˜๋„๋ก ๋ณด์žฅํ•ฉ๋‹ˆ๋‹ค.
    • src/lib.rs์—์„œ Circuit::measure์™€ ์ž๋™ ์—ญ๊ณ„์‚ฐ ์Šค์ฝ”ํ”„ ์ข…๋ฃŒ ๊ฒฝ๋กœ๊ฐ€ Circuit::release_clean์„ ๊ณต์œ ํ•˜๋„๋ก ์ •๋ฆฌํ•ด ์ธก์ •๋œ ์Šฌ๋กฏ๊ณผ ์—ญ๊ณ„์‚ฐ ์™„๋ฃŒ ์Šฌ๋กฏ์„ ์ผ๊ด€๋˜๊ฒŒ ์žฌ์‚ฌ์šฉ ํ’€๋กœ ๋ฐ˜ํ™˜ํ•˜๊ณ  ์–ฝํž˜ ๊ทธ๋ฃน์—์„œ ๋ถ„๋ฆฌํ•ฉ๋‹ˆ๋‹ค.
  • ๊ธฐ์กด ์—ฐ์‚ฐ ๊ฒฝ๋กœ ์žฌ์‚ฌ์šฉ (9eb5dd3)
    • Gate::Sdg๋Š” src/stabilizer.rs์—์„œ ๊ธฐ์กด S ์—ฐ์‚ฐ(S^3)์œผ๋กœ ์ฒ˜๋ฆฌํ•˜๊ณ , src/statevector.rs์˜ ๊ณต์šฉ matrix ๊ฒฝ๋กœ๋ฅผ ํ†ตํ•ด CPU ์ƒํƒœ ๋ฒกํ„ฐ์™€ GPU ๋ฐฑ์—”๋“œ ๊ตฌํ˜„์„ ์ผ์›ํ™”ํ–ˆ์Šต๋‹ˆ๋‹ค.

๐Ÿ“š Documentation & Tooling

  • ์„ค๊ณ„ ๋ฌธ์„œ ๋ฐ README.md ์ตœ์‹ ํ™” (686e749, 3f3152b)
    • docs/design/entanglement-tracking.md์™€ docs/design/uncomputation.md์— ์‹ค์ œ ๊ตฌํ˜„ ๊ฒฐ๊ณผ(Groups, Circuit::may_be_entangled, ReversibleCircuit, Circuit::with_ancilla, Circuit::with_ancillas::<N>, Circuit::cx_ctrl, sdg, tdg), ์„ค๊ณ„ ๋ณ€๊ฒฝ ๊ทผ๊ฑฐ, ์ปดํŒŒ์ผ ํƒ€์ž„/๋Ÿฐํƒ€์ž„ ๊ฒ€์ฆ ํ•œ๊ณ„๋ฅผ ๋ฐ˜์˜ํ–ˆ์Šต๋‹ˆ๋‹ค.
    • README.md์˜ ์–ธ์–ด ๋น„๊ต ํ‘œ์— with_ancilla ๊ธฐ๋ฐ˜ ์ž๋™ ์—ญ๊ณ„์‚ฐ ์ง€์› ๋ฒ”์œ„์™€ ccx ๋ฏธ์ง€์› ์ƒํƒœ๋ฅผ ์—…๋ฐ์ดํŠธํ–ˆ์Šต๋‹ˆ๋‹ค.
  • ์˜ˆ์ œ ํ™•์žฅ (9eb5dd3, 2610c09)
    • examples/qasm_dump.rs์— sdg/tdg ๊ฒŒ์ดํŠธ์™€ ๋ณด์กฐ ํ๋น„ํŠธ ํŒจ๋ฆฌํ‹ฐ(ancilla_parity) ํšŒ๋กœ ์˜ˆ์ œ๋ฅผ ์ถ”๊ฐ€ํ•˜๊ณ  Qiskit ์ž„ํฌํŠธ ํ˜ธํ™˜์„ฑ์„ ํ™•์ธํ–ˆ์Šต๋‹ˆ๋‹ค.
  • ๋นŒ๋“œ ์žฌํ˜„์„ฑ ๋ฐ ๋ฒ„์ „ ๊ด€๋ฆฌ (e4e035c, 9cf9270)
    • CI ํ™˜๊ฒฝ์—์„œ ๊ฒฐ์ •๋ก ์  ์˜์กด์„ฑ ํ•ด๊ฒฐ๊ณผ ์žฌํ˜„ ๊ฐ€๋Šฅํ•œ ๋นŒ๋“œ๋ฅผ ๋ณด์žฅํ•˜๊ธฐ ์œ„ํ•ด Cargo.lock์„ ์ถ”์  ๋Œ€์ƒ์— ํฌํ•จํ–ˆ์Šต๋‹ˆ๋‹ค(e4e035c).
    • Cargo.toml ๋ฐ Cargo.lock์˜ qxide ํŒจํ‚ค์ง€ ๋ฒ„์ „์„ 0.3.0์œผ๋กœ ์ƒํ–ฅํ–ˆ์Šต๋‹ˆ๋‹ค(9cf9270).

โš ๏ธ Breaking Changes & Migration Guide

None โ€” v0.2.0๊ณผ 100% ํ•˜์œ„ ํ˜ธํ™˜๋˜๋ฉฐ ๊ธฐ์กด ๊ณต๊ฐœ API๋ฅผ ๊นจ๋Š” ๋ณ€๊ฒฝ ์‚ฌํ•ญ์ด ์—†์Šต๋‹ˆ๋‹ค.


๐Ÿ“ฆ Installation & Verification

์„ค์น˜ ๋ฐ ์—…๋ฐ์ดํŠธ

ํ”„๋กœ์ ํŠธ์— qxide 0.3.0์„ ์ถ”๊ฐ€ํ•˜๊ฑฐ๋‚˜ ์˜์กด์„ฑ์„ ์—…๋ฐ์ดํŠธํ•˜๋ ค๋ฉด ๋‹ค์Œ ๋ช…๋ น์„ ์‹คํ–‰ํ•˜์„ธ์š”.

cargo add qxide@0.3.0

๋˜๋Š” Cargo.toml์— ์ง์ ‘ ๋ฒ„์ „์„ ์ง€์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

[dependencies]
qxide = "0.3.0"

๋กœ์ปฌ ๊ฒ€์ฆ ๋ฐ ํ…Œ์ŠคํŠธ

# ํฌ๋งท ๋ฐ ๋ฆฐํŠธ ๊ฒ€์‚ฌ (GPU ํ”ผ์ฒ˜ ํฌํ•จ)
cargo fmt --check
cargo clippy --all-targets
cargo clippy --all-targets --features gpu

# ์ „์ฒด ํ…Œ์ŠคํŠธ ์Šค์œ„ํŠธ ์‹คํ–‰ (๋‹จ์œ„, ํ†ตํ•ฉ, compile_fail doctest ํฌํ•จ)
cargo test

# GPU ๋ฐฑ์—”๋“œ ํ…Œ์ŠคํŠธ ์‹คํ–‰ (์ง€์› ํ•˜๋“œ์›จ์–ด ํ™˜๊ฒฝ์—์„œ ๋กœ์ปฌ ์‹คํ–‰)
cargo test --features gpu --test gpu

# OpenQASM 3 ์ถœ๋ ฅ ์˜ˆ์ œ ํ™•์ธ
cargo run --example qasm_dump

CI ๋ฐ ํ’ˆ์งˆ ๊ฒ€์ฆ ํ˜„ํ™ฉ

  • CI ํ†ต๊ณผ ํ•ญ๋ชฉ: cargo fmt, cargo clippy (--features gpu ํฌํ•จ), ubuntu ๋ฐ windows ํ…Œ์ŠคํŠธ ์Šค์œ„ํŠธ, Qiskit 2.6.2 ๊ธฐ๋ฐ˜ OpenQASM 3 ์ž„ํฌํŠธ ๊ฒ€์ฆ ํ†ต๊ณผ.
  • ๋กœ์ปฌ ๊ฒ€์ฆ ํ•ญ๋ชฉ: GPU ๋ฐฑ์—”๋“œ ํ…Œ์ŠคํŠธ(tests/gpu.rs, --features gpu)๋Š” ๋กœ์ปฌ ํ™˜๊ฒฝ์—์„œ๋งŒ ์‹คํ–‰ ๋ฐ ๊ฒ€์ฆ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

v0.2.0

Choose a tag to compare

@rigelx2b rigelx2b released this 18 Nov 16:58

Release Notes: qxide v0.2.0

๐Ÿš€ Overview & Key Highlights

qxide v0.2.0์€ ๋กœ๋“œ๋งต Stage 0 ๋ชฉํ‘œ๋ฅผ ์™„์ˆ˜ํ•˜๊ณ , ์‹œ๋ฎฌ๋ ˆ์ด์…˜ ์Šค์ผ€์ผ๊ณผ ์‹คํ–‰ ๋ฐฑ์—”๋“œ ์•„ํ‚คํ…์ฒ˜๋ฅผ ๋Œ€ํญ ํ™•์žฅํ•œ ๋ฆด๋ฆฌ์Šค์ž…๋‹ˆ๋‹ค. ๊ธฐ์กด ์ƒํƒœ ๋ฒกํ„ฐ(state-vector) ์ค‘์‹ฌ์˜ ์†Œ๊ทœ๋ชจ ์‹œ๋ฎฌ๋ ˆ์ด์…˜์„ ๋„˜์–ด, ์ˆ˜์ฒœ ํ๋น„ํŠธ ๊ทœ๋ชจ์˜ Clifford ํšŒ๋กœ๋ฅผ ์‹คํ–‰ํ•˜๋Š” ์Šคํƒœ๋นŒ๋ผ์ด์ €(stabilizer) ๋ฐฑ์—”๋“œ, ํšŒ๋กœ ํŠน์„ฑ์— ๋”ฐ๋ฅธ ์ž๋™ ๋ฐฑ์—”๋“œ ์„ ํƒ ๋ฐ ๋ฉ”๋ชจ๋ฆฌ ๊ฐ€๋“œ, ๊ทธ๋ฆฌ๊ณ  wgpu ๊ธฐ๋ฐ˜์˜ ์„ ํƒ์  GPU ์ƒํƒœ ๋ฒกํ„ฐ ํ”„๋กœํ† ํƒ€์ž…์„ ๋„์ž…ํ–ˆ์Šต๋‹ˆ๋‹ค.

์ด๋ฒˆ ๋ฆด๋ฆฌ์Šค์˜ ํ•ต์‹ฌ ํ•˜์ด๋ผ์ดํŠธ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

  • ๋กœ๋“œ๋งต Stage 0 ์™„๋ฃŒ: ์œ„์ƒยทํšŒ์ „ ๊ฒŒ์ดํŠธ(s, t, rx, ry, rz), ์ธก์ • ๊ธฐ๋ฐ˜ ๊ณ ์ „ ์กฐ๊ฑด ๋ถ„๊ธฐ(if_one, if_zero), ํ๋น„ํŠธ ์ดˆ๊ธฐํ™”(reset) ๋ฐ ์ธก์ • ํ›„ ๋ฌผ๋ฆฌ ์Šฌ๋กฏ ์ž๋™ ์žฌ์‚ฌ์šฉ, ์–‘์žยท๊ณ ์ „ ๋ ˆ์ง€์Šคํ„ฐ(QReg, BitReg)๋ฅผ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค.
  • Aaronson-Gottesman ์Šคํƒœ๋นŒ๋ผ์ด์ € ๋ฐฑ์—”๋“œ ๋„์ž…: Backend, SimError, Circuit::simulate_with API๋ฅผ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค. ๋น„-Clifford ๊ฒŒ์ดํŠธ๊ฐ€ ํฌํ•จ๋œ ๊ฒฝ์šฐ ์ž˜๋ชป๋œ ๊ฒฐ๊ณผ๋ฅผ ๋‚ด๋Š” ๋Œ€์‹  SimError::NotClifford๋ฅผ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค. ๋ฌด์ž‘์œ„ Clifford ํšŒ๋กœ 300๊ฐœ์—์„œ ์ƒํƒœ ๋ฒกํ„ฐ ๋ฐฑ์—”๋“œ์™€ ๋™์ผํ•œ ๊ฒฐ๊ณผ ๋ถ„ํฌ๋ฅผ ๊ฒ€์ฆํ–ˆ์œผ๋ฉฐ, 5000ํ๋น„ํŠธ GHZ ํšŒ๋กœ๋ฅผ ์ƒท(shot)๋‹น ์•ฝ 0.42์ดˆ(release ๋นŒ๋“œ ๊ธฐ์ค€)์— ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค.
  • ์ž๋™ ๋ฐฑ์—”๋“œ ์„ ํƒ ๋ฐ ๋ฉ”๋ชจ๋ฆฌ ๊ฐ€๋“œ: Backend::Auto, Circuit::select_backend, Circuit::is_clifford๋ฅผ ํ†ตํ•ด Clifford ์ „์šฉ ํšŒ๋กœ๋Š” ์Šคํƒœ๋นŒ๋ผ์ด์ € ๋ฐฑ์—”๋“œ๋กœ, ๊ทธ ์™ธ ํšŒ๋กœ๋Š” ์ƒํƒœ ๋ฒกํ„ฐ ๋ฐฑ์—”๋“œ๋กœ ์ž๋™ ๋ผ์šฐํŒ…ํ•ฉ๋‹ˆ๋‹ค. ๊ธฐ๋ณธ ๋ฉ”๋ชจ๋ฆฌ ํ•œ๋„๋Š” 1 GiB(26ํ๋น„ํŠธ)์ด๋ฉฐ, ํ•œ๋„ ์ดˆ๊ณผ ์‹œ ํ•„์š”ํ•œ ๋ฉ”๋ชจ๋ฆฌ(2^n ร— 16๋ฐ”์ดํŠธ)์™€ ํ•จ๊ป˜ SimError::OutOfMemory๋ฅผ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.
  • ์„ ํƒ์  GPU ์ƒํƒœ ๋ฒกํ„ฐ ๋ฐฑ์—”๋“œ(ํ”„๋กœํ† ํƒ€์ž…): Cargo gpu ํ”ผ์ฒ˜(cubecl 0.11.4, wgpu, f32) ๋’ค์— GPU ํ”„๋กœํ† ํƒ€์ž…์„ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค. RTX 4070 Laptop ํ™˜๊ฒฝ ์‹ค์ธก ๊ธฐ์ค€, 24~26ํ๋น„ํŠธ ๊ฒŒ์ดํŠธ ์ „์šฉ ํšŒ๋กœ์—์„œ ๋‹จ์ผ ์Šค๋ ˆ๋“œ CPU ๋ฐฑ์—”๋“œ ๋Œ€๋น„ ์•ฝ 11๋ฐฐ, ์ „์ฒด ์ธก์ • ํฌํ•จ ํšŒ๋กœ์—์„œ ์•ฝ 4๋ฐฐ ๋น ๋ฅธ ์„ฑ๋Šฅ์„ ํ™•์ธํ–ˆ์Šต๋‹ˆ๋‹ค(์œ ๋‹ˆํƒ€๋ฆฌ ํ”„๋ฆฌํ”ฝ์Šค๋งŒ GPU์—์„œ ์‹คํ–‰).
  • OpenQASM 3 ํ˜ธํ™˜์„ฑ ์ˆ˜์ • ๋ฐ CI ์ƒํ˜ธ์šด์šฉ์„ฑ ๊ฒ€์ฆ: ๋‹จ์ผ ๋น„ํŠธ ๋ถ„๊ธฐ ์กฐ๊ฑด์‹์„ == true / == false ํ˜•์‹์œผ๋กœ ์ถœ๋ ฅํ•˜๋„๋ก ์ˆ˜์ •ํ•˜์—ฌ Qiskit 2.6.2์˜ OpenQASM 3 ์ž„ํฌํ„ฐ(qiskit.qasm3.loads)๊ฐ€ ์ •์ƒ ํŒŒ์‹ฑํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ–ˆ์œผ๋ฉฐ, ์ด๋ฅผ ๊ฒ€์ฆํ•˜๋Š” CI ์žก์„ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.

์ฐธ๊ณ : v0.2.0์€ ๋ฒ„์ „ ์ƒํ–ฅ ๋ฐ ๋ฉ”์ธํ…Œ์ด๋„ˆ ์Šน์ธ์ด ์™„๋ฃŒ๋˜์—ˆ์œผ๋ฉฐ, crates.io ๋ฐฐํฌ๋Š” ๋ฉ”์ธํ…Œ์ด๋„ˆ๊ฐ€ ์ˆ˜๋™์œผ๋กœ ์ง„ํ–‰ํ•  ์˜ˆ์ •์ž…๋‹ˆ๋‹ค.


๐Ÿ›  Detailed Changelog

โœจ New Features

  • ์–‘์ž ๊ฒŒ์ดํŠธ, ๊ณ ์ „ ๋ถ„๊ธฐ, ์žฌ์‚ฌ์šฉ ๋ฐ ๋ ˆ์ง€์Šคํ„ฐ ํ™•์žฅ (c201b82)
    • OpenQASM 3 stdgates ์‹œ๋งจํ‹ฑ์Šค๋ฅผ ๋”ฐ๋ฅด๋Š” ๋‹จ์ผ ํ๋น„ํŠธ ๊ฒŒ์ดํŠธ s, t, rx, ry, rz๋ฅผ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.
    • ์ธก์ • ๊ฒฐ๊ณผ์— ๋”ฐ๋ผ ์กฐ๊ฑด๋ถ€ ์‹คํ–‰ํ•˜๋Š” Circuit::if_one ๋ฐ Circuit::if_zero๋ฅผ ์ถ”๊ฐ€ํ–ˆ์œผ๋ฉฐ, OpenQASM 3 if ๋ธ”๋ก์œผ๋กœ ๋‚ด๋ณด๋ƒ…๋‹ˆ๋‹ค(๋ถ„๊ธฐ ๋ธ”๋ก ๋‚ด๋ถ€์—์„œ์˜ measure ํ˜ธ์ถœ์€ ๊ฑฐ๋ถ€).
    • ํ™œ์„ฑ ํ๋น„ํŠธ๋ฅผ ์ดˆ๊ธฐํ™”ํ•˜๋Š” Circuit::reset์„ ์ถ”๊ฐ€ํ•˜๊ณ , measure ์ดํ›„ ํ•ด์ œ๋œ ๋ฌผ๋ฆฌ ํ๋น„ํŠธ ์Šฌ๋กฏ์„ ๋‹ค์Œ Circuit::qubit() ํ˜ธ์ถœ ์‹œ reset๊ณผ ํ•จ๊ป˜ ์ž๋™ ์žฌ์‚ฌ์šฉํ•˜๋„๋ก ๊ตฌํ˜„ํ–ˆ์Šต๋‹ˆ๋‹ค.
    • ๋‹ค์ค‘ ํ๋น„ํŠธยท๋น„ํŠธ ๋ฌถ์Œ์„ ๋‹ค๋ฃจ๋Š” QReg, BitReg, Circuit::qreg, Circuit::measure_reg, Shot::value๋ฅผ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค(src/lib.rs, tests/circuits.rs).
  • Aaronson-Gottesman ์Šคํƒœ๋นŒ๋ผ์ด์ € ์‹œ๋ฎฌ๋ ˆ์ดํ„ฐ ๋ฐฑ์—”๋“œ (eb8cb42)
    • src/stabilizer.rs์— ์Šคํƒœ๋นŒ๋ผ์ด์ € ํ…Œ์ด๋ธ”๋กœ(tableau) ๊ธฐ๋ฐ˜ ์‹œ๋ฎฌ๋ ˆ์ดํ„ฐ๋ฅผ ๊ตฌํ˜„ํ•˜๊ณ , Backend, SimError, Circuit::simulate_with ๊ณต๊ฐœ API๋ฅผ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.
    • ๋น„-Clifford ์—ฐ์‚ฐ(t, ์ž„์˜ ํšŒ์ „ ๋“ฑ)์ด ํฌํ•จ๋œ ํšŒ๋กœ์— ๋Œ€ํ•ด ์Šคํƒœ๋นŒ๋ผ์ด์ € ๋ฐฑ์—”๋“œ๋ฅผ ์ง€์ •ํ•˜๋ฉด ์กฐ์šฉํžˆ ์˜ค๋‹ต์„ ๋‚ด๋Š” ๋Œ€์‹  SimError::NotClifford๋ฅผ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.
    • ๋ฌด์ž‘์œ„ Clifford ํšŒ๋กœ 300๊ฐœ์— ๋Œ€ํ•œ ์ƒํƒœ ๋ฒกํ„ฐ ๋ฐฑ์—”๋“œ์™€์˜ ๋ถ„ํฌ ์ผ์น˜ ๊ฒ€์ฆ ๋ฐ 5000ํ๋น„ํŠธ GHZ ๋ฒค์น˜๋งˆํฌ ์˜ˆ์ œ(examples/ghz_large.rs, tests/backends.rs)๋ฅผ ํฌํ•จํ–ˆ์Šต๋‹ˆ๋‹ค.
  • ์ž๋™ ๋ฐฑ์—”๋“œ ์„ ํƒ ๋ฐ ๋ฉ”๋ชจ๋ฆฌ ๊ฐ€๋“œ (66b55c8)
    • ํšŒ๋กœ์˜ Clifford ์—ฌ๋ถ€๋ฅผ ํŒ๋ณ„ํ•˜๋Š” Circuit::is_clifford, ์ตœ์  ๋ฐฑ์—”๋“œ๋ฅผ ๊ฒฐ์ •ํ•˜๋Š” Circuit::select_backend, ๊ทธ๋ฆฌ๊ณ  Backend::Auto๋ฅผ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.
    • Circuit::set_memory_limit ๋ฐ ๊ธฐ๋ณธ ํ•œ๋„ DEFAULT_MEMORY_LIMIT(1 GiB, 26ํ๋น„ํŠธ)๋ฅผ ๋„์ž…ํ–ˆ์Šต๋‹ˆ๋‹ค. ์ƒํƒœ ๋ฒกํ„ฐ ํ• ๋‹น ์ „ ํ•„์š” ๋ฉ”๋ชจ๋ฆฌ(2^n ร— 16๋ฐ”์ดํŠธ)๋ฅผ ๊ฒ€์‚ฌํ•˜์—ฌ ์ดˆ๊ณผ ์‹œ SimError::OutOfMemory๋กœ ํ•„์š” ๋ฉ”๋ชจ๋ฆฌ ํฌ๊ธฐ๋ฅผ ๋ณด๊ณ ํ•ฉ๋‹ˆ๋‹ค.
  • ํ”„๋กœํ† ํƒ€์ž… GPU ์ƒํƒœ ๋ฒกํ„ฐ ๋ฐฑ์—”๋“œ (ad292de)
    • gpu Cargo ํ”ผ์ฒ˜ ํ™œ์„ฑํ™” ์‹œ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” Backend::Gpu ํ”„๋กœํ† ํƒ€์ž…์„ src/gpu.rs์— ๊ตฌํ˜„ํ–ˆ์Šต๋‹ˆ๋‹ค(cubecl 0.11.4, wgpu, f32 ์ •๋ฐ€๋„ ๊ธฐ๋ฐ˜).
    • ์ฒซ ๋ฒˆ์งธ ์ธก์ •ยท๋ฆฌ์…‹ยท๋ถ„๊ธฐ ์ด์ „๊นŒ์ง€์˜ ์œ ๋‹ˆํƒ€๋ฆฌ ํ”„๋ฆฌํ”ฝ์Šค(unitary prefix)๋ฅผ GPU์—์„œ ์‹คํ–‰ํ•œ ๋’ค CPU f64 ์ƒํƒœ ๋ฒกํ„ฐ๋กœ readbackํ•˜์—ฌ ํ›„์† ์—ฐ์‚ฐ์„ ์ด์–ด๊ฐ‘๋‹ˆ๋‹ค. ๋ฒค์น˜๋งˆํฌ์šฉ examples/gpu_bench.rs ๋ฐ ํ…Œ์ŠคํŠธ tests/gpu.rs๋ฅผ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.

๐Ÿ› Bug Fixes & Stability

  • OpenQASM 3 ๋น„ํŠธ ๋ถ„๊ธฐ ์กฐ๊ฑด์‹ ๋ฌธ๋ฒ• ์ˆ˜์ • (e142522)
    • ๋ฌธ์ œ: ๊ธฐ์กด์—๋Š” ๋‹จ์ผ ๋น„ํŠธ ๋ถ„๊ธฐ ์กฐ๊ฑด์„ if (c[i] == 1) / if (c[i] == 0) ๊ฐ™์€ ์ •์ˆ˜ ๋น„๊ต ํ˜•ํƒœ๋กœ ์ถœ๋ ฅํ–ˆ๋Š”๋ฐ, Qiskit 2.6.2์˜ OpenQASM 3 ์ž„ํฌํ„ฐ๊ฐ€ bit == const bool ํ˜•์‹๋งŒ ํ—ˆ์šฉํ•˜์—ฌ ์ด๋ฅผ ๊ฑฐ๋ถ€ํ•˜๋Š” ๋ฌธ์ œ๊ฐ€ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค.
    • ํ•ด๊ฒฐ: ๋‹จ์ผ ๋น„ํŠธ ์กฐ๊ฑด์‹์„ ๋ช…์‹œ์ ์ธ == true / == false ๋น„๊ต ํ˜•ํƒœ๋กœ ์ถœ๋ ฅํ•˜๋„๋ก ์ˆ˜์ •ํ•˜์—ฌ ์™ธ๋ถ€ OpenQASM 3 ํŒŒ์„œ ํ˜ธํ™˜์„ฑ์„ ํ™•๋ณดํ–ˆ์Šต๋‹ˆ๋‹ค.
  • ์˜์กด์„ฑ ๋ฒ„์ „ ๊ณ ์ • ๋ฐ ํŒจ๋‹‰/๋ฌธ์„œ ์ •๋ฆฌ (29f359d)
    • Cargo.toml์—์„œ cubecl ์˜์กด์„ฑ ๋ฒ„์ „์„ =0.11.4๋กœ ๊ณ ์ •ํ•˜๊ณ , ๋‚ด๋ถ€ ํŒจ๋‹‰ ์ฒ˜๋ฆฌ ๋ฐ ๋ฌธ์„œ ์ •ํ•ฉ์„ฑ์„ ์ •๋น„ํ–ˆ์Šต๋‹ˆ๋‹ค.

โšก Performance & Architectural Improvements

  • ์‹œ๋ฎฌ๋ ˆ์ดํ„ฐ ๋ชจ๋“ˆ ๋ถ„๋ฆฌ ๋ฐ ๋‚œ์ˆ˜ ์ƒ์„ฑ๊ธฐ ์ •๋ฆฌ (eb8cb42, ad292de)
    • ์ƒํƒœ ๋ฒกํ„ฐ ์‹œ๋ฎฌ๋ ˆ์ดํ„ฐ(src/statevector.rs), ์Šคํƒœ๋นŒ๋ผ์ด์ € ์‹œ๋ฎฌ๋ ˆ์ดํ„ฐ(src/stabilizer.rs), ๋‚œ์ˆ˜ ์œ ํ‹ธ๋ฆฌํ‹ฐ(src/rng.rs)๋Š” eb8cb42์—์„œ, GPU ํ”„๋กœํ† ํƒ€์ž…(src/gpu.rs)์€ ad292de์—์„œ ๋ชจ๋“ˆ ๊ตฌ์กฐ๋ฅผ ๋ถ„๋ฆฌํ•ด ๋ฐฑ์—”๋“œ ํ™•์žฅ์„ฑ์„ ๊ฐœ์„ ํ–ˆ์Šต๋‹ˆ๋‹ค.
    • Backend ์—ด๊ฑฐํ˜•์— #[non_exhaustive] ์†์„ฑ์„ ์ ์šฉํ•˜์—ฌ ํ–ฅํ›„ ์‹ ๊ทœ ๋ฐฑ์—”๋“œ ์ถ”๊ฐ€ ์‹œ ํ•˜์œ„ ํ˜ธํ™˜์„ฑ์„ ์œ ์ง€ํ•  ์ˆ˜ ์žˆ๋„๋ก ์„ค๊ณ„ํ–ˆ์Šต๋‹ˆ๋‹ค.
  • ํ…Œ์ŠคํŠธ ๋นŒ๋“œ ์ตœ์ ํ™” ํ”„๋กœํŒŒ์ผ ์„ค์ • (c469e40)
    • ๋Œ€๊ทœ๋ชจ ์ƒท ๋น„๊ต ํ…Œ์ŠคํŠธ ์‹คํ–‰ ์†๋„๋ฅผ ๋†’์ด๊ธฐ ์œ„ํ•ด Cargo.toml์˜ [profile.test]์— opt-level = 2๋ฅผ ์ ์šฉํ–ˆ์Šต๋‹ˆ๋‹ค.
  • GPU ํ”„๋กœํ† ํƒ€์ž… ์„ฑ๋Šฅ ์‹ค์ธก ์š”์•ฝ (ad292de, 9f2f50b)
    • RTX 4070 Laptop GPU(wgpu, f32, release ๋นŒ๋“œ) ๊ธฐ์ค€, 24~26ํ๋น„ํŠธ ๊ฒŒ์ดํŠธ ์ „์šฉ ํšŒ๋กœ์—์„œ ๋‹จ์ผ ์Šค๋ ˆ๋“œ f64 CPU ๋ฐฑ์—”๋“œ ๋Œ€๋น„ ์•ฝ 11๋ฐฐ, ์ „์ฒด ์ธก์ • ํฌํ•จ ํšŒ๋กœ์—์„œ ์•ฝ 4๋ฐฐ์˜ ๊ฐ€์†์„ ํ™•์ธํ–ˆ์Šต๋‹ˆ๋‹ค(ํ—ˆ์šฉ ์˜ค์ฐจ ๋ฐ ์ƒ์„ธ ์กฐ๊ฑด์€ docs/gpu.md ์ฐธ๊ณ ).

๐Ÿ“š Documentation & Tooling

  • Qiskit ๊ธฐ๋ฐ˜ OpenQASM 3 CI ๊ฒ€์ฆ ํŒŒ์ดํ”„๋ผ์ธ ์ถ”๊ฐ€ (8084458)
    • .github/workflows/ci.yml์— qasm-interop ์žก์„ ์ถ”๊ฐ€ํ•˜์—ฌ examples/qasm_dump.rs๋กœ ์ƒ์„ฑํ•œ OpenQASM 3 ์ƒ˜ํ”Œ์„ ci/check_qasm.py์—์„œ qiskit.qasm3.loads(qiskit==2.6.2)๋กœ ์‹ค์ œ ํŒŒ์‹ฑ ๊ฒ€์ฆํ•ฉ๋‹ˆ๋‹ค.
    • gpu ํ”ผ์ฒ˜ ๋นŒ๋“œ ๋ฐ Clippy ๊ฒ€์‚ฌ๋ฅผ ์œ„ํ•œ gpu-build ์žก์„ CI์— ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.
  • GPU ๋ฐฑ์—”๋“œ ๊ธฐ์ˆ  ๋ฌธ์„œ ๋ฐ ๋ฒค์น˜๋งˆํฌ ๊ธฐ๋ก (9f2f50b)
    • docs/gpu.md์— f32 ๋ฒ„ํผ ๊ตฌ์กฐ, 2D ๋””์ŠคํŒจ์น˜, ์œ ๋‹ˆํƒ€๋ฆฌ ํ”„๋ฆฌํ”ฝ์Šค ์‹คํ–‰ ๋ฐฉ์‹, ์ •ํ™•๋„ ๊ฒ€์ฆ ๊ธฐ์ค€ ๋ฐ ์ธก์ • ์ˆ˜์น˜๋ฅผ ๋ฌธ์„œํ™”ํ–ˆ์Šต๋‹ˆ๋‹ค.
  • ์„ค๊ณ„ ๊ฒ€ํ†  ๋ฌธ์„œ ์ถ”๊ฐ€ (5ce2327)
    • ํ–ฅํ›„ ์„ค๊ณ„ ๊ฒ€ํ† ์šฉ์œผ๋กœ docs/design/entanglement-tracking.md ๋ฐ docs/design/uncomputation.md๋ฅผ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค(ํ˜„์žฌ ๋ฒ„์ „์—๋Š” ๋ฏธ๊ตฌํ˜„).
  • ์–‘์ž ์–ธ์–ด ๋น„๊ต ๋ฐ ๋ฉ”๋ชจ๋ฆฌ ํ‘œ ๋ฌธ์„œํ™” (48afc49, 66b55c8, ca781bb)
    • README.md์— ํ๋น„ํŠธ ์ˆ˜๋ณ„ ์ƒํƒœ ๋ฒกํ„ฐ ๋ฉ”๋ชจ๋ฆฌ ์š”๊ตฌ๋Ÿ‰ ํ‘œ์™€ Guppy, Silq, Q#, Qiskit, Cirq์™€์˜ ๋น„๊ตํ‘œ๋ฅผ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.
    • ROADMAP.md์— Stage 0 ์„ธ๋ถ€ ํ•ญ๋ชฉ์„ ๋ณด์™„ํ•˜๊ณ , bd76031์—์„œ ํฌ๋ ˆ์ดํŠธ ๋ฒ„์ „์„ 0.2.0์œผ๋กœ ์ƒํ–ฅํ–ˆ์Šต๋‹ˆ๋‹ค.

โš ๏ธ Breaking Changes & Migration Guide

v0.1.0์˜ ๊ธฐ์กด ๊ณต๊ฐœ API ์‹œ๊ทธ๋‹ˆ์ฒ˜๋Š” ์ œ๊ฑฐ๋˜๊ฑฐ๋‚˜ ๋ณ€๊ฒฝ๋˜์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค. ๋‹ค๋งŒ ์•„๋ž˜์˜ **๊ด€์ฐฐ ๊ฐ€๋Šฅํ•œ ๋™์ž‘ ๋ณ€ํ™”(observable behavior changes)**๊ฐ€ ์žˆ์œผ๋ฏ€๋กœ ๊ธฐ์กด ํšŒ๋กœ๋‚˜ ํ…Œ์ŠคํŠธ๋ฅผ ์šด์˜ ์ค‘์ธ ๊ฒฝ์šฐ ํ™•์ธ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

  1. ์ธก์ • ํ›„ ํ๋น„ํŠธ ์Šฌ๋กฏ ์žฌ์‚ฌ์šฉ (qubit() / to_qasm() / ๋™์ผ ์‹œ๋“œ ๊ฒฐ๊ณผ ๋ณ€ํ™”)
    • ๋ณ€๊ฒฝ ๋‚ด์šฉ: v0.2.0๋ถ€ํ„ฐ measure๋กœ ์†Œ๋น„๋œ ํ๋น„ํŠธ ์Šฌ๋กฏ์€ ๋‹ค์Œ Circuit::qubit() ํ˜ธ์ถœ ์‹œ reset์„ ์‚ฝ์ž…ํ•˜์—ฌ ์ž๋™์œผ๋กœ ์žฌ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค.
    • ์˜ํ–ฅ ๋ฐ ๋Œ€์‘: ์ธก์ • ์ดํ›„ ์ƒˆ ํ๋น„ํŠธ๋ฅผ ํ• ๋‹นํ•˜๋Š” ํšŒ๋กœ์—์„œ๋Š” to_qasm() ์ถœ๋ ฅ์˜ ๋ฌผ๋ฆฌ ํ๋น„ํŠธ ์ธ๋ฑ์Šคยทreset ๊ตฌ๋ฌธ๊ณผ ๋™์ผ ์‹œ๋“œ(seed) ๊ธฐ๋ฐ˜ ์‹œ๋ฎฌ๋ ˆ์ด์…˜ ๊ฒฐ๊ณผ๊ฐ€ v0.1.0๊ณผ ๋‹ฌ๋ผ์งˆ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ํšŒ๋กœ์˜ ๋…ผ๋ฆฌ์  ๋™์น˜์„ฑ์€ ์œ ์ง€๋˜์ง€๋งŒ, ์Šค๋ƒ…์ƒท ํ…Œ์ŠคํŠธ์—์„œ QASM ๋ฌธ์ž์—ด์ด๋‚˜ ๊ณ ์ • ์‹œ๋“œ ์ถœ๋ ฅ์„ ์ง์ ‘ ๋น„๊ตํ•˜๋Š” ๊ฒฝ์šฐ ๊ธฐ๋Œ€๊ฐ’์„ ๊ฐฑ์‹ ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
  2. Circuit::simulate์˜ ํ๋น„ํŠธ ์ƒํ•œ ๋ณ€๊ฒฝ
    • ๋ณ€๊ฒฝ ๋‚ด์šฉ: Circuit::simulate(seed)๋Š” ํ•ญ์ƒ ์ƒํƒœ ๋ฒกํ„ฐ ๋ฐฑ์—”๋“œ๋ฅผ ์‚ฌ์šฉํ•˜๋ฉฐ(Backend::Auto๋ฅผ ์ ์šฉํ•˜์ง€ ์•Š์Œ), ๊ธฐ์กด ๊ณ ์ • 20ํ๋น„ํŠธ ์ œํ•œ ๋Œ€์‹  Circuit::set_memory_limit ๊ธฐ๋ฐ˜์˜ ๋ฉ”๋ชจ๋ฆฌ ๊ฐ€๋“œ(๊ธฐ๋ณธ๊ฐ’ 1 GiB = 26ํ๋น„ํŠธ)๊นŒ์ง€๋งŒ ์‹คํ–‰๋˜๊ณ  ์ด๋ฅผ ์ดˆ๊ณผํ•˜๋ฉด OutOfMemory ๋ฉ”์‹œ์ง€์™€ ํ•จ๊ป˜ ํŒจ๋‹‰(panic)ํ•ฉ๋‹ˆ๋‹ค.
    • ์˜ํ–ฅ ๋ฐ ๋Œ€์‘: 21~26ํ๋น„ํŠธ ํšŒ๋กœ๊ฐ€ ๋ณ„๋„ ์„ค์ • ์—†์ด ์‹คํ–‰๋˜๋ฉฐ, 27ํ๋น„ํŠธ ์ด์ƒ ์ƒํƒœ ๋ฒกํ„ฐ ์‹คํ–‰์ด ํ•„์š”ํ•œ ๊ฒฝ์šฐ Circuit::set_memory_limit์œผ๋กœ ํ•œ๋„๋ฅผ ์กฐ์ •ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ๋Œ€๊ทœ๋ชจ Clifford ์ „์šฉ ํšŒ๋กœ๋ฅผ ์‹คํ–‰ํ•˜๋ ค๋ฉด Circuit::simulate_with(Backend::Auto, seed) ๋˜๋Š” Circuit::simulate_with(Backend::Stabilizer, seed)๋ฅผ ์‚ฌ์šฉํ•˜์„ธ์š”(Backend::Auto๋Š” simulate_with์—์„œ๋งŒ Clifford ์ „์šฉ ํšŒ๋กœ์— ์Šคํƒœ๋นŒ๋ผ์ด์ € ๋ฐฑ์—”๋“œ๋ฅผ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค).
  3. Backend ์—ด๊ฑฐํ˜•์˜ #[non_exhaustive] ์ ์šฉ
    • ์˜ํ–ฅ ๋ฐ ๋Œ€์‘: Backend๋Š” v0.2.0์— ์ƒˆ๋กœ ์ถ”๊ฐ€๋œ ํƒ€์ž…์ด๋ฏ€๋กœ #[non_exhaustive]๋Š” 0.2.0 ๊ธฐ์ค€์œผ๋กœ ์ž‘์„ฑ๋œ ์ฝ”๋“œ์—๋งŒ ์˜ํ–ฅ์„ ์ค๋‹ˆ๋‹ค(v0.1.0 ์ฝ”๋“œ์—๋Š” ์˜ํ–ฅ ์—†์Œ). Backend๋ฅผ match ๊ตฌ๋ฌธ์œผ๋กœ ๋ถ„๊ธฐํ•˜๋Š” ๋‹ค์šด์ŠคํŠธ๋ฆผ ์ฝ”๋“œ์—์„œ๋Š” ์™€์ผ๋“œ์นด๋“œ(_) ์•”(arm)์„ ํฌํ•จํ•ด์•ผ ํ•˜๋ฉฐ, Backend::Gpu๋Š” gpu ํ”ผ์ฒ˜๊ฐ€ ํ™œ์„ฑํ™”๋œ ๊ฒฝ์šฐ์—๋งŒ ์ œ๊ณต๋ฉ๋‹ˆ๋‹ค.

๐Ÿ“ฆ Installation & Verification

์„ค์น˜ (crates.io ๋ฐฐํฌ ํ›„)

๊ธฐ๋ณธ CPU ๋ฐฑ์—”๋“œ(์ƒํƒœ ๋ฒกํ„ฐ + ์Šคํƒœ๋นŒ๋ผ์ด์ € + Backend::Auto) ์„ค์น˜:

cargo add qxide@0.2.0

ํ”„๋กœํ† ํƒ€์ž… GPU ๋ฐฑ์—”๋“œ(gpu ํ”ผ์ฒ˜) ํฌํ•จ ์„ค์น˜:

cargo add qxide@0.2.0 --features gpu

๋˜๋Š” Cargo.toml์— ์ง์ ‘ ์ง€์ •:

[dependencies]
qxide = { version = "0.2.0", features = ["gpu"] }

๋กœ์ปฌ ๊ฒ€์ฆ ๋ฐ ๋ฒค์น˜๋งˆํฌ

# ์ „์ฒด ๊ธฐ๋ณธ ํ…Œ์ŠคํŠธ ์Šค์œ„ํŠธ ์‹คํ–‰
cargo test

# GPU ํ”ผ์ฒ˜ ํฌํ•จ ํ…Œ์ŠคํŠธ ์‹คํ–‰ (๋กœ์ปฌ GPU ํ™˜๊ฒฝ ํ•„์š”)
cargo test --features gpu

# GPU vs CPU ์„ฑ๋Šฅ ๋ฒค์น˜๋งˆํฌ ์‹คํ–‰
cargo run --release --features gpu --example gpu_bench

# 5000ํ๋น„ํŠธ GHZ ์Šคํƒœ๋นŒ๋ผ์ด์ € ์˜ˆ์ œ ์‹คํ–‰
cargo run --release --example ghz_large

v0.1.0

Choose a tag to compare

@rigelx2b rigelx2b released this 18 Nov 16:56

Release Notes: qxide v0.1.0

๐Ÿš€ Overview & Key Highlights

qxide v0.1.0์€ ํ–ฅํ›„ .qx ํ™•์žฅ์ž๋ฅผ ์‚ฌ์šฉํ•˜๋Š” Rust ๋‹ฎ์€ ์–‘์žยท๊ณ ์ „ ํ†ตํ•ฉ ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์–ธ์–ด Qxide๋ฅผ ์„ค๊ณ„ํ•˜๊ธฐ์— ์•ž์„œ, ํ๋น„ํŠธ ์†Œ์œ ๊ถŒ(ownership)์„ Rust ํƒ€์ž… ์‹œ์Šคํ…œ์œผ๋กœ ์‹คํ—˜ํ•˜๋Š” ์ดˆ๊ธฐ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ๋ฆด๋ฆฌ์ฆˆ์ž…๋‹ˆ๋‹ค.

์ด GitHub ๋ฆด๋ฆฌ์ฆˆ๋Š” 2026-11-18์— crates.io๋กœ ์„ ๋ฐฐํฌ๋œ qxide 0.1.0 ๋ฒ„์ „์„ ์†Œ๊ธ‰ํ•˜์—ฌ ๊ธฐ๋กํ•˜๊ธฐ ์œ„ํ•ด ์ž‘์„ฑ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ์–‘์ž์—ญํ•™์˜ ํ•ต์‹ฌ ์ œ์•ฝ์„ Rust ์ปดํŒŒ์ผ๋Ÿฌ์˜ ์†Œ์œ ๊ถŒยท๋นŒ๋ฆผ ๊ทœ์น™์— ์ง์ ‘ ๋Œ€์‘์‹œ์ผœ, ๋ฌผ๋ฆฌ์ ์œผ๋กœ ํ—ˆ์šฉ๋˜์ง€ ์•Š๋Š” ์—ฐ์‚ฐ์„ ์ปดํŒŒ์ผ ๋‹จ๊ณ„์—์„œ ์ฐจ๋‹จํ•˜๋Š” ๊ฒƒ์ด ํ•ต์‹ฌ ๋ชฉํ‘œ์ž…๋‹ˆ๋‹ค.

  • ํƒ€์ž… ๊ธฐ๋ฐ˜ ์–‘์ž ์ œ์•ฝ ๋ณด์žฅ: Qubit์— Clone/Copy๋ฅผ ๊ตฌํ˜„ํ•˜์ง€ ์•Š์•„ ๋ณต์ œ ๋ถˆ๊ฐ€ ์ •๋ฆฌ(no-cloning theorem)๋ฅผ ํ‘œํ˜„ํ•˜๋ฉฐ, measure(q: Qubit) -> Bit๊ฐ€ Qubit์„ ์†Œ๋น„(move)ํ•˜๊ณ , cx(&mut a, &mut b)๊ฐ€ ๋™์ผ ํ๋น„ํŠธ์˜ ์ค‘๋ณต ๊ฐ€๋ณ€ ์ฐธ์กฐ๋ฅผ ํ—ˆ์šฉํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.
  • ํšŒ๋กœ ๊ตฌ์„ฑ ๋ฐ OpenQASM 3 ์ถœ๋ ฅ: h, x, z, cx, measure ์—ฐ์‚ฐ์œผ๋กœ ํšŒ๋กœ๋ฅผ ๊ตฌ์„ฑํ•˜๊ณ  Circuit::to_qasm์œผ๋กœ OpenQASM 3 ์ฝ”๋“œ๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.
  • ์˜์กด์„ฑ ์—†๋Š” ์†Œํ˜• ์‹œ๋ฎฌ๋ ˆ์ดํ„ฐ: Circuit::simulate(seed)๋ฅผ ํ†ตํ•ด ์ตœ๋Œ€ 20ํ๋น„ํŠธ๊นŒ์ง€ ๊ฒฐ์ •์ (seed ๊ธฐ๋ฐ˜)์œผ๋กœ ๋™์ž‘ํ•˜๋Š” ์ƒํƒœ ๋ฒกํ„ฐ ์‹œ๋ฎฌ๋ ˆ์ด์…˜์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.

๐Ÿ›  Detailed Changelog

โœจ New Features

  • ์ดˆ๊ธฐ qxide ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ๊ตฌํ˜„ (9426622):
    • src/lib.rs์— Circuit, Qubit, Bit, Shot ํƒ€์ž…๊ณผ ๊ธฐ๋ณธ ๊ฒŒ์ดํŠธ(h, x, z, cx, measure)๋ฅผ ๊ตฌํ˜„ํ–ˆ์Šต๋‹ˆ๋‹ค.
    • Qubit ๋ฏธ๋ณต์ œ, ์ธก์ • ํ›„ ํ๋น„ํŠธ ์žฌ์‚ฌ์šฉ ๊ธˆ์ง€, cx(&mut a, &mut b)์˜ ๋™์ผ ํ๋น„ํŠธ ๋™์‹œ ์ „๋‹ฌ ์ฐจ๋‹จ์„ ๊ฒ€์ฆํ•˜๋Š” compile_fail doctest๋ฅผ ํฌํ•จํ–ˆ์Šต๋‹ˆ๋‹ค.
    • Circuit::to_qasm์„ ํ†ตํ•œ OpenQASM 3 ๋ฌธ์ž์—ด ๋‚ด๋ณด๋‚ด๊ธฐ๋ฅผ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.
    • ์™ธ๋ถ€ ์˜์กด์„ฑ ์—†์ด ์ตœ๋Œ€ 20ํ๋น„ํŠธ๋ฅผ ์ง€์›ํ•˜๋ฉฐ ์ธก์ • ๋ถ•๊ดด์™€ ๋™์ผ seed ์žฌํ˜„์„ฑ์„ ๊ฐ–์ถ˜ Circuit::simulate(seed) ์ƒํƒœ ๋ฒกํ„ฐ ์‹œ๋ฎฌ๋ ˆ์ดํ„ฐ๋ฅผ ๊ตฌํ˜„ํ–ˆ์Šต๋‹ˆ๋‹ค.

๐Ÿ› Bug Fixes & Stability

  • ์ดˆ๊ธฐ ๋ฆด๋ฆฌ์ฆˆ์ด๋ฏ€๋กœ ์ด์ „ ๋ฒ„์ „ ๋Œ€๋น„ ์ˆ˜์ •๋œ ๋ฒ„๊ทธ๋Š” ์—†์Šต๋‹ˆ๋‹ค.

โšก Performance & Architectural Improvements

  • [dependencies] ์—†์ด Rust ํ‘œ์ค€ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋งŒ์œผ๋กœ ๋™์ž‘ํ•˜๋Š” ๋‹จ์ผ ํฌ๋ ˆ์ดํŠธ ๊ตฌ์กฐ(Cargo.toml)๋กœ ๊ตฌ์„ฑํ–ˆ์Šต๋‹ˆ๋‹ค.
  • ์–‘์ž ์ƒํƒœ ์ˆ˜๋ช…๊ณผ ๋ฐฐํƒ€์  ์ ‘๊ทผ์„ ๋Ÿฐํƒ€์ž„์ด ์•„๋‹Œ Rust ํƒ€์ž… ๊ฒ€์‚ฌ๊ธฐ(Qubit ์†Œ์œ ๊ถŒ ๋ฐ &mut ๋นŒ๋ฆผ ๊ทœ์น™)์— ์œ„์ž„ํ•˜๋Š” ๊ตฌ์กฐ๋ฅผ ์ฑ„ํƒํ–ˆ์Šต๋‹ˆ๋‹ค.

๐Ÿ“š Documentation & Tooling

  • ๋ฌธ์„œ ๋ฐ ๋ผ์ด์„ ์Šค: README.md, ROADMAP.md, LICENSE-MIT, LICENSE-APACHE (MIT OR Apache-2.0)๋ฅผ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.
  • ์˜ˆ์ œ ๋ฐ ํ…Œ์ŠคํŠธ: examples/bell.rs ๋ฒจ ์ƒํƒœ(์–ฝํž˜) ์˜ˆ์ œ์™€ tests/circuits.rs ํ†ตํ•ฉ ํ…Œ์ŠคํŠธ๋ฅผ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.
  • CI ์›Œํฌํ”Œ๋กœ: .github/workflows/ci.yml์— ubuntu-latest ๋ฐ windows-latest ๋Œ€์ƒ cargo fmt --check, cargo clippy --all-targets -- -D warnings, cargo test ํŒŒ์ดํ”„๋ผ์ธ์„ ๊ตฌ์„ฑํ–ˆ์Šต๋‹ˆ๋‹ค.

โš ๏ธ Breaking Changes & Migration Guide

None (์ดˆ๊ธฐ ๋ฆด๋ฆฌ์ฆˆ v0.1.0์ด๋ฏ€๋กœ ํ•ด๋‹น ์‚ฌํ•ญ์ด ์—†์Šต๋‹ˆ๋‹ค).

๐Ÿ“ฆ Installation & Verification

Cargo.toml์— ํฌ๋ ˆ์ดํŠธ๋ฅผ ์ถ”๊ฐ€ํ•ด ๋ฐ”๋กœ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

cargo add qxide@0.1.0

์ €์žฅ์†Œ๋ฅผ ํด๋ก ํ•œ ํ™˜๊ฒฝ์—์„œ๋Š” ๋ฒจ ์ƒํƒœ ์˜ˆ์ œ์™€ ํ…Œ์ŠคํŠธ ์Šค์œ„ํŠธ(์‹œ๋ฎฌ๋ ˆ์ดํ„ฐ ํ…Œ์ŠคํŠธ ๋ฐ compile_fail doctest ํฌํ•จ)๋กœ ๋™์ž‘์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

cargo run --example bell
cargo test

CI์™€ ๋™์ผํ•œ ์ •์  ๊ฒ€์‚ฌ ๋ฐ ํฌ๋งท ํ™•์ธ์„ ๋กœ์ปฌ์—์„œ ์‹คํ–‰ํ•˜๋ ค๋ฉด ๋‹ค์Œ ๋ช…๋ น์„ ์‚ฌ์šฉํ•˜์„ธ์š”.

cargo fmt --check
cargo clippy --all-targets -- -D warnings