Repository navigation
Releases
v0.8.0
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
.qxtype name (String):Stringis now a.qxtype name and can no longer be used as a variable or function name. - Reserved package name
std:stdis reserved for the standard library.qxide new,qxide.tomlvalidation, and the registry validator reject a package namedstd, andqxide new stdnames the packagestd-app. - String literals as values (
Q0204/Q0214): String literals are now values, soint s = "hi";reports a type mismatch (Q0204) instead ofQ0214.Q0214now reports a{}placeholder in a string value, as placeholders are only allowed inprintln'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:
pathdependencies inqxide.tomlandpath+sources inqxide.lockmust 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|iroption toqxide run,qxide qasm, andqxide repl, with theQXIDE_ENGINEenvironment variable providing its default;astremains the default engine. Selectingirlowers the checked program to a typed IR (design record indocs/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 inbench/qx/run by an ignored test (cargo test --release --bin qxide bench_suite -- --ignored --nocapture), with the method and results documented indocs/perf/QX_BENCHMARKS.md. - Cranelift JIT (
--engine jit): Added an optionaljitCargo feature (off by default; pulls in Cranelift 0.138) that exposes thejitengine forqxide run,qxide qasm, andqxide repl(as well asQXIDE_ENGINE=jit), while builds without the feature rejectjitwith exit code 2. Build-time classical functions using onlyint,double, andbooleanvalues 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; seedocs/design/qx-jit.mdfor the design record anddocs/perf/QX_BENCHMARKS.mdfor 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.qxcircuit 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 fromQXIDE_IBM_API_KEYor the OS credential store (read-only) and the instance CRN fromQXIDE_IBM_INSTANCE, with all HTTP traffic sent through the systemcurlvia 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-runprints the request without touching credentials or the network (--device-configoutputs 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 indocs/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. Stringtype: Added immutable build-time text supporting+concatenation with numbers and booleans,==and!=,len(s), and printing.Stringis usable in parameters, returns,final, andvar.- Standard library (
std): Addedstd.log,std.time,std.fs,std.app, andstd.qxide, imported withimport std.fs;(called asfs.read_text(...)),import std.fs.read_text;, orimport std.fs.*;, with new error codesQ0701โQ0706. Standard library calls run once while the program is elaborated, before any shot. Each host offers modules under permissions:qxide runallowsstd.logandstd.time, and enablesstd.fsonly with the new--allow fsflag (for files underdata/next toqxide.toml, or./data),qxide qasmrefuses file and window effects, and the REPL and browser playground offer onlystd.log. - HTTP client for desktop apps (
std.http): Addedstd.httpfor desktop apps, providinghttp.get(url)fromimport std.http;to return the response body as aStringusing the systemcurl. Using it requires thehttpapp permission and an[app] http_hostslist inqxide.tomlwith exact lowercase host names and no wildcards. Requests are limited tohttps://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 codesQ0707(failed request) andQ0708(disallowed URL); packages used as dependencies cannot importstd.http. - Desktop apps: Added desktop app support (design in
docs/design/qx-app.md) withqxide app new <NAME>(scaffolds an app with.qxlogic and an HTML/JS interface),qxide app dev(runs it in a window reading files from disk),qxide app build(writes a portable executable totarget/app/by attaching a bundle of.qxsources, locked packages, andui/files to the prebuiltqxide-appruntime without compiling anything), app-level error codesQ0711โQ0715, and theexamples/apps/bell-appexample (measures a Bell pair and saves results withstd.fs). The runtime (crates/qxide-app-runtime, built onwryandtao, 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: Runningqxide checkinside an app project now checks imports against the app's[app] permissions. - Qxide Studio: Added Qxide Studio (
apps/studio, built withqxide app build apps/studio), a minimal desktop IDE for.qxbuilt 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 fromexamples/qx; and autosave to the app data folder. It uses the newstd.qxidemodule (check,run,qasm,format, returning JSON; granted with theqxidepermission), which runs the edited program like the playground does, with onlystd.log. - Language server (
qxide lsp): Added theqxide lspsubcommand (docs/design/lsp.md), which runs a Language Server Protocol server over stdio and accepts an optional--stdioflag. It publishes the same diagnostics and error codes asqxide checkat the same lines and columns (using UTF-16 columns for the protocol), including in projects withqxide.tomland importsโerrors inside an imported module are shown on the importing file'simportlines, and unsaved edits of open modules are seen by the files that import them. Supported features include formatting viaqxide fmt, hover (showing theqxide explainentry 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, andBitRegmethods. Built on thelsp-servercrate behind the defaultclifeature, 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, publisherqxide-lang, keeping its own version number) providing.qxsyntax highlighting through a TextMate grammar, a language configuration, and a client that startsqxide lsp. It includes theqxide.path(defaulting toqxidefromPATH) andqxide.trace.serversettings and aQxide: Restart Language Servercommand, and requires VS Code 1.91 or newer andqxide0.8.0 or newer (becauseqxide lspis new in 0.8.0). The extension is packaged withvsceasqxide-vscode-<version>.vsixby.github/workflows/vscode.yml, which runs after the Release workflow of each qxide release tag (or by hand with a tag), attaches the.vsixto the GitHub release, and publishes to the Visual Studio Marketplace (secr...
v0.7.0
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
.qxkeywords (import,public):importandpublicare now keywords in.qxand can no longer be used as identifiers. - Non-finite rotation angles in the Rust library:
Circuit::rx,Circuit::ry, andCircuit::rznow panic when the angle isNaNor infinite. Previously the state vector silently becameNaN, every measurement returned0, andto_qasmprintedrx(NaN), which OpenQASM parsers reject. - Stricter
.qxlinearity 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 examplerx(q, eat(q))), are now rejected at check time withQ0315andQ0301. Previously these programs passedcheckand then failed at run time or leaked a qubit. - Nesting limit on
.qxoperator 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 newnow creates a package project (qxide.toml,src/main.qx,README.md, and.gitignore) instead ofmain.qxandREADME.md. Arguments starting with-are rejected as a usage error. - Strict CLI argument checks:
qxide bell,--version, and--helpnow 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 andCircuit::simulate_shots(backend, seed, shots)to iterate overResult<Shot, SimError>usingshot_seed.Circuit::simulateandCircuit::simulate_withare unchanged and continue to execute a single shot with the exact seed provided. - Modules and imports: Every
.qxfile is now a module supportingpublicfunctions, Java-styleimport pkg.module.function;andimport pkg.module.*;declarations, and import errorsQ0501โQ0510. Inside a project,qxide run,qxide check, andqxide qasmwithout a file argument usesrc/main.qx. - Package manager: Added a package manager (
docs/design/qx-packages.md) withqxide.tomlmanifests,qxide.lock, a GitHub-hosted index registry (template inregistry-template/), commandsqxide add,remove,install,publish, andsearch,--offline/QXIDE_OFFLINE=1,--registry/QXIDE_REGISTRY, cache storage inQXIDE_HOME(default~/.qxide), and package errorsQ0601โQ0617. The package manager is gated behind the defaultclifeature 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], andqxide explain <CODE>(prints the entry fromdocs/error-codes.md, includingQ05xxandQ06xxpackage errors). - New error codes: Added
Q0315(qubit consumed in the right operand of&&or||),Q0411(non-finite rotation angle), andQ0412(internal error when the checker and the interpreter disagree; replaces a misleadingQ0311). - Browser playground: The
.qxfront end and simulator compile to WebAssembly (crates/qxide-wasm, not published) for the playground atqxide.dev, and CI checks that it prints exactly what the CLI prints.
Fixed
- Biased and under-dispersed sampling across shots: Shot
kof--seed Spreviously used seedS + k, causing runs with nearby seeds to reuse nearly all of the same shots (over 200 seeds of 1,000-shot Bell runs,00counts 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)viaqxide::shot_seedandCircuit::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 acrossqxide 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
.qxreportingQ0411at 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 withQ0315andQ0301(see Breaking changes). - Stack overflows on long expression chains: Fixed stack overflows where a 4 KB program with a long
+chain inside recursion passedcheckbut crashedrun/qasm, and where chains of 200,000 terms crashedcheck. - Register size overflow on wasm32:
qreg(4294967297)in the browser playground no longer wraps to a 1-qubit register and now fails withQ0409like the CLI. - Remainder of
int.MIN % -1:int.MIN % -1now yields0as in Java instead of reporting overflowQ0401. - Bare qubit statements: A statement that only names an existing qubit (
q;) is now a no-op likex;instead of reportingQ0312. - CRLF string literals in
qxide fmt:qxide fmtno longer refuses a valid CRLF file containing a line break inside a string literal. - Nested
returninqxide repl: Areturnnested iniforforis now rejected like a top-levelreturninstead of silently ending the session. - Trailing line comments in
qxide repl: A trailing//comment on a REPL expression no longer fails withQ0105at<repl>:0:1. - Unmatched closing brackets in
qxide repl: Input closing a bracket it did not open (for example}) is now rejected instead of closingmainand 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 runnow accepts flags before or after the file path (for exampleqxide run --shots 2 file.qx). - Failed scaffold cleanup in
qxide new:qxide newno 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 byqxide publish(Q0614) and registry CI.qxide publishalso skips symlinkedREADME*/LICENSE*files. - Semver build metadata in package resolution: Versions with build metadata (
1.0.0+x) could take over an exact=1.0.0pin; 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, reportingQ0609only when no usable line remains. - Registry download failures and temp-file safety: Any non-zero
curlexit (including a transfer cut off after HTTP 200) is now reported asQ0608instead of being accepted and cached. Downloads pass--globoffto prevent{}/[]expansion in URLs and write to an exclusively created file under$QXIDE_HOME/registry/tmpinstead 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
Q0612for a stale lock inqxide runandqxide install --locked. - Lockfile package name validation: Package names in
qxide.lockare validated (Q0603), preventing a crafted name from pointing cache paths outsideQXIDE_HOME. - Registry graph and CI checks: Self-dependencies of registry packages are rejected (
Q0606),build_search.pyorders pre-releases by semver precedence, andvalidate.pyrejects"v": trueand changes toconfig.jsonin 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 | shInstall 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... |
v0.6.0
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:
varandconsumeare now keywords and can no longer be used as identifiers.PIis now a built-indoubleconstant. Declaring a variable, parameter,forloop variable, or function namedPIfails withQ0217, and assigning toPIfails withQ0207.- 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 (
consumeand default borrowing):QubitandQRegparameters are borrowed by defaultโthe callee may apply gates to them, while measuring, discarding, moving, or passing them to aconsumeparameter is rejected withQ0313. Marking a qubit parameter withconsumetransfers ownership to the callee, which must measure or discard it on every path (Q0302), while the caller can no longer reuse it (Q0301). Usingconsumeon a classical parameter is rejected withQ0221. - Call-argument aliasing checks: Passing aliased qubits to a function callโincluding passing a whole
QRegtogether with one of its elementsโis rejected withQ0303. A run-time aliasing check is also performed for run-time register indices. - Functions returning
QubitandQReg: Functions can now returnQubitorQRegvalues (Q0219is retired). The caller receives ownership and must consume the returned value. - Gate-only function calls inside measured-
Bitifblocks: Gate-only user functions (supporting borrowed qubits, loops, nestedif, recursion, and classical helpers) can now be called inside anifbranch on a measuredBitand 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 withQ0314. varlocal type inference: Local variables can be declared withvarforint,double, andbooleanonly. Usingvarfor other types fails withQ0222, and usingvarin parameter or return positions fails withQ0111.- Java-style numeric casts:
(int) xand(double) nconvert betweendoubleandint, with(int)truncating toward zero, mappingNaNto0, and saturating on overflow. Other casts are rejected withQ0223. - Built-in
PIconstant:PIis available as a built-indoubleconstant. - New
.qxexamples: Addedexamples/qx/functions.qx,examples/qx/rotation.qx,examples/qx/teleport_fn.qx, andexamples/qx/conditional_fn.qx. All examples are exported to OpenQASM 3 and parsed by Qiskit in CI.
Documentation
- Crate rustdoc on
docs.rsis 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.mdand the website (qxide.dev). - Updated
README.mdto describe the new.qxfeatures.
Rust library
- The public API of the
qxidecrate is unchanged sincev0.5.0. - Rustdoc comments, panic messages, and
SimErrorDisplaytext 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 | shInstall 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
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 | shInstall 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
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 | shInstall 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
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๋ฅผ ๋ฐํํฉ๋๋ค.
- CPU ์ํ ๋ฒกํฐ(
- ๋ฐํ์
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 ํด๋ฐฑ ์์ด ์ ๋ํ๋ฆฌ ํ๋ฆฌํฝ์ค ๋ด์์ ์ง์ ์คํ๋๋ ์ ์ฉ CubeCLccx์ปค๋์ ๊ตฌํํ์ต๋๋ค. ์ ๋ ฌ๋ 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๊ฐ ์๋ชป๋ ๊ฐ์ ๋ณด๊ณ ํ๋ ๋ฑ ์๋ชป๋ ์๋ฎฌ๋ ์ด์ ๊ฒฐ๊ณผ๋ฅผ ๋ง๋ค์ด ๋ด๋ ๋น๊ฑด์ ํ ์ฌ์ฉ ๋ฐฉ์์ด์์ต๋๋ค. - ๋ง์ด๊ทธ๋ ์ด์
๋ฐฉ๋ฒ:
apply๋จ๊ณ ๋ด๋ถ์์๋compute๊ฐ ๊ฑด๋๋ฆฐ ํ๋นํธ๋ฅผcx_ctrlยทccx_ctrl์ ์ ์ด ํ๋นํธ๋ ๋๊ฐ ์์ ๊ฒ์ดํธ(z,s,sdg,t,tdg,rz)๋ก๋ง ์ฌ์ฉํ์ธ์.- ๊ธฐ์ ๋ณํ, ํ๊น ์ง์ ,
measure,reset๋ฑ ์ํ ๋ณํ ์ฐ์ฐ์ด ํ์ํ๋ค๋ฉด ํด๋น ์ฐ์ฐ์with_ancilla์ค์ฝํ ๋ฐ์ผ๋ก ์ด๋ํ์ธ์.
๐ฆ Installation & Verification
์ค์น
crates.io์์ qxide v0.4.0์ ์ค์นํ๊ฑฐ๋ Cargo.toml์ ์ถ๊ฐํ ์ ์์ต๋๋ค.
cargo add qxideCargo.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-outv0.3.0
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_faildoctest ๋ฐ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).
- CI ํ๊ฒฝ์์ ๊ฒฐ์ ๋ก ์ ์์กด์ฑ ํด๊ฒฐ๊ณผ ์ฌํ ๊ฐ๋ฅํ ๋น๋๋ฅผ ๋ณด์ฅํ๊ธฐ ์ํด
โ ๏ธ 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_dumpCI ๋ฐ ํ์ง ๊ฒ์ฆ ํํฉ
- CI ํต๊ณผ ํญ๋ชฉ:
cargo fmt,cargo clippy(--features gpuํฌํจ),ubuntu๋ฐwindowsํ ์คํธ ์ค์ํธ,Qiskit 2.6.2๊ธฐ๋ฐOpenQASM 3์ํฌํธ ๊ฒ์ฆ ํต๊ณผ. - ๋ก์ปฌ ๊ฒ์ฆ ํญ๋ชฉ: GPU ๋ฐฑ์๋ ํ
์คํธ(
tests/gpu.rs,--features gpu)๋ ๋ก์ปฌ ํ๊ฒฝ์์๋ง ์คํ ๋ฐ ๊ฒ์ฆ๋์์ต๋๋ค.
v0.2.0
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_withAPI๋ฅผ ์ถ๊ฐํ์ต๋๋ค. ๋น-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ํผ์ฒ(cubecl0.11.4,wgpu,f32) ๋ค์ GPU ํ๋กํ ํ์ ์ ์ถ๊ฐํ์ต๋๋ค. RTX 4070 Laptop ํ๊ฒฝ ์ค์ธก ๊ธฐ์ค, 24~26ํ๋นํธ ๊ฒ์ดํธ ์ ์ฉ ํ๋ก์์ ๋จ์ผ ์ค๋ ๋ CPU ๋ฐฑ์๋ ๋๋น ์ฝ 11๋ฐฐ, ์ ์ฒด ์ธก์ ํฌํจ ํ๋ก์์ ์ฝ 4๋ฐฐ ๋น ๋ฅธ ์ฑ๋ฅ์ ํ์ธํ์ต๋๋ค(์ ๋ํ๋ฆฌ ํ๋ฆฌํฝ์ค๋ง GPU์์ ์คํ). - OpenQASM 3 ํธํ์ฑ ์์ ๋ฐ CI ์ํธ์ด์ฉ์ฑ ๊ฒ์ฆ: ๋จ์ผ ๋นํธ ๋ถ๊ธฐ ์กฐ๊ฑด์์
== true/== falseํ์์ผ๋ก ์ถ๋ ฅํ๋๋ก ์์ ํ์ฌQiskit2.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 3if๋ธ๋ก์ผ๋ก ๋ด๋ณด๋ ๋๋ค(๋ถ๊ธฐ ๋ธ๋ก ๋ด๋ถ์์์measureํธ์ถ์ ๊ฑฐ๋ถ). - ํ์ฑ ํ๋นํธ๋ฅผ ์ด๊ธฐํํ๋
Circuit::reset์ ์ถ๊ฐํ๊ณ ,measure์ดํ ํด์ ๋ ๋ฌผ๋ฆฌ ํ๋นํธ ์ฌ๋กฏ์ ๋ค์Circuit::qubit()ํธ์ถ ์reset๊ณผ ํจ๊ป ์๋ ์ฌ์ฌ์ฉํ๋๋ก ๊ตฌํํ์ต๋๋ค. - ๋ค์ค ํ๋นํธยท๋นํธ ๋ฌถ์์ ๋ค๋ฃจ๋
QReg,BitReg,Circuit::qreg,Circuit::measure_reg,Shot::value๋ฅผ ์ถ๊ฐํ์ต๋๋ค(src/lib.rs,tests/circuits.rs).
- OpenQASM 3
- 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๋ก ํ์ ๋ฉ๋ชจ๋ฆฌ ํฌ๊ธฐ๋ฅผ ๋ณด๊ณ ํฉ๋๋ค.
- ํ๋ก์ Clifford ์ฌ๋ถ๋ฅผ ํ๋ณํ๋
- ํ๋กํ ํ์
GPU ์ํ ๋ฒกํฐ ๋ฐฑ์๋ (
ad292de)gpuCargo ํผ์ฒ ํ์ฑํ ์ ์ฌ์ฉํ ์ ์๋Backend::Gpuํ๋กํ ํ์ ์src/gpu.rs์ ๊ตฌํํ์ต๋๋ค(cubecl0.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)๊ฐ์ ์ ์ ๋น๊ต ํํ๋ก ์ถ๋ ฅํ๋๋ฐ,Qiskit2.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ํ๋นํธ ๊ฒ์ดํธ ์ ์ฉ ํ๋ก์์ ๋จ์ผ ์ค๋ ๋f64CPU ๋ฐฑ์๋ ๋๋น ์ฝ 11๋ฐฐ, ์ ์ฒด ์ธก์ ํฌํจ ํ๋ก์์ ์ฝ 4๋ฐฐ์ ๊ฐ์์ ํ์ธํ์ต๋๋ค(ํ์ฉ ์ค์ฐจ ๋ฐ ์์ธ ์กฐ๊ฑด์docs/gpu.md์ฐธ๊ณ ).
- RTX 4070 Laptop GPU(
๐ 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)**๊ฐ ์์ผ๋ฏ๋ก ๊ธฐ์กด ํ๋ก๋ ํ
์คํธ๋ฅผ ์ด์ ์ค์ธ ๊ฒฝ์ฐ ํ์ธ์ด ํ์ํฉ๋๋ค.
- ์ธก์ ํ ํ๋นํธ ์ฌ๋กฏ ์ฌ์ฌ์ฉ (
qubit()/to_qasm()/ ๋์ผ ์๋ ๊ฒฐ๊ณผ ๋ณํ)- ๋ณ๊ฒฝ ๋ด์ฉ:
v0.2.0๋ถํฐmeasure๋ก ์๋น๋ ํ๋นํธ ์ฌ๋กฏ์ ๋ค์Circuit::qubit()ํธ์ถ ์reset์ ์ฝ์ ํ์ฌ ์๋์ผ๋ก ์ฌ์ฌ์ฉ๋ฉ๋๋ค. - ์ํฅ ๋ฐ ๋์: ์ธก์ ์ดํ ์ ํ๋นํธ๋ฅผ ํ ๋นํ๋ ํ๋ก์์๋
to_qasm()์ถ๋ ฅ์ ๋ฌผ๋ฆฌ ํ๋นํธ ์ธ๋ฑ์คยทreset๊ตฌ๋ฌธ๊ณผ ๋์ผ ์๋(seed) ๊ธฐ๋ฐ ์๋ฎฌ๋ ์ด์ ๊ฒฐ๊ณผ๊ฐv0.1.0๊ณผ ๋ฌ๋ผ์ง ์ ์์ต๋๋ค. ํ๋ก์ ๋ ผ๋ฆฌ์ ๋์น์ฑ์ ์ ์ง๋์ง๋ง, ์ค๋ ์ท ํ ์คํธ์์ QASM ๋ฌธ์์ด์ด๋ ๊ณ ์ ์๋ ์ถ๋ ฅ์ ์ง์ ๋น๊ตํ๋ ๊ฒฝ์ฐ ๊ธฐ๋๊ฐ์ ๊ฐฑ์ ํด์ผ ํฉ๋๋ค.
- ๋ณ๊ฒฝ ๋ด์ฉ:
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 ์ ์ฉ ํ๋ก์ ์คํ๋น๋ผ์ด์ ๋ฐฑ์๋๋ฅผ ์ ํํฉ๋๋ค).
- ๋ณ๊ฒฝ ๋ด์ฉ:
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_largev0.1.0
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_faildoctest๋ฅผ ํฌํจํ์ต๋๋ค.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 testCI์ ๋์ผํ ์ ์ ๊ฒ์ฌ ๋ฐ ํฌ๋งท ํ์ธ์ ๋ก์ปฌ์์ ์คํํ๋ ค๋ฉด ๋ค์ ๋ช ๋ น์ ์ฌ์ฉํ์ธ์.
cargo fmt --check
cargo clippy --all-targets -- -D warnings