Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@ name: Docs

# Deploy the Astro docs site at `docs/` to GitHub Pages.
#
# The repo is public, so Pages serves from the project page
# `https://queracomputing.github.io/ppvm/` — every build is based under
# `/ppvm/` (gh-pages branch root maps to the `/ppvm/` URL prefix).
#
# Behaviour:
# - Push to `main` → build with PPVM_BASE=/ and publish
# - Push to `main` → build with PPVM_BASE=/ppvm/ and publish
# to the gh-pages branch root.
# - Pull request (opened / → build with PPVM_BASE=/pr-preview/pr-<N>
# - Pull request (opened / → build with PPVM_BASE=/ppvm/pr-preview/pr-<N>
# synchronize / reopened) and let rossjrw/pr-preview-action publish
# the build to gh-pages under
# `pr-preview/pr-<N>/`. Triggered only when
Expand Down Expand Up @@ -106,9 +110,9 @@ jobs:
id: compute-base
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo "base=/pr-preview/pr-${{ github.event.pull_request.number }}" >> "$GITHUB_OUTPUT"
echo "base=/ppvm/pr-preview/pr-${{ github.event.pull_request.number }}" >> "$GITHUB_OUTPUT"
else
echo "base=/" >> "$GITHUB_OUTPUT"
echo "base=/ppvm/" >> "$GITHUB_OUTPUT"
fi

- name: Compute git ref for source links
Expand All @@ -132,7 +136,7 @@ jobs:
# hatches a developer would use locally.
working-directory: docs
env:
PPVM_SITE: https://congenial-bassoon-l436wp3.pages.github.io
PPVM_SITE: https://queracomputing.github.io
PPVM_BASE: ${{ steps.compute-base.outputs.base }}
PPVM_GIT_REF: ${{ steps.compute-ref.outputs.ref }}
RUSTFLAGS: "-C target-feature=+aes,+sse2"
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

A fast quantum circuit simulator written in Rust, with Python bindings.

[![Docs](https://img.shields.io/badge/docs-6437FF)](https://congenial-bassoon-l436wp3.pages.github.io/)
[![CI - rust](https://github.com/QuEraComputing/ppvm/actions/workflows/rust-ci.yml/badge.svg)](https://github.com/QuEraComputing/ppvm/actions/workflows/rust-ci.yml)
[![CI - python](https://github.com/QuEraComputing/ppvm/actions/workflows/python-ci.yml/badge.svg)](https://github.com/QuEraComputing/ppvm/actions/workflows/python-ci.yml)
[![Docs](https://img.shields.io/badge/docs-online-6437FF)](https://queracomputing.github.io/ppvm/)
[![CI](https://github.com/QuEraComputing/ppvm/actions/workflows/ci.yml/badge.svg)](https://github.com/QuEraComputing/ppvm/actions/workflows/ci.yml)
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)

## Install
Expand Down Expand Up @@ -52,7 +51,7 @@ r0, r1 = tab.measure(0), tab.measure(1)
print(f"Qubit 0: {r0}, Qubit 1: {r1}") # always correlated
```

See the [documentation](https://congenial-bassoon-l436wp3.pages.github.io/) for the Rust API, Stim integration, and symbolic propagation.
See the [documentation](https://queracomputing.github.io/ppvm/) for the Rust API, Stim integration, and symbolic propagation.

## License & contributing

Expand Down
14 changes: 7 additions & 7 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { defineConfig } from "astro/config";

// `site` + `base` are read from env in CI so the same astro config powers
// three deploy targets:
// · local dev: PPVM_SITE=http://localhost:4321 PPVM_BASE=/
// · main → gh-pages: PPVM_SITE=https://congenial-bassoon-l436wp3.pages.github.io PPVM_BASE=/
// · PR preview deploy: PPVM_SITE=https://congenial-bassoon-l436wp3.pages.github.io PPVM_BASE=/pr-preview/pr-<N>
const site =
process.env.PPVM_SITE ??
"https://congenial-bassoon-l436wp3.pages.github.io";
// three deploy targets. The repo is public, so Pages serves from the
// `queracomputing.github.io/ppvm/` project page — every deploy except
// local dev is therefore based under `/ppvm/`:
// · local dev: PPVM_SITE=http://localhost:4321 PPVM_BASE=/
// · main → gh-pages: PPVM_SITE=https://queracomputing.github.io PPVM_BASE=/ppvm/
// · PR preview deploy: PPVM_SITE=https://queracomputing.github.io PPVM_BASE=/ppvm/pr-preview/pr-<N>
const site = process.env.PPVM_SITE ?? "https://queracomputing.github.io";
const base = process.env.PPVM_BASE ?? "/";

export default defineConfig({
Expand Down
Loading