qojulia / qojulia/QuantumInputOutput.jl

Abstract circuit expressions with decomposition

Open
#29 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
7
Forks
0
Avg merge
7h 15m
Merged PRs (30d)
26

Description

At the moment a network is built by eagerly composing concrete SLH triples with , , and feedback. That's great for small setups, but the network only ever exists as its final evaluated triple. You can't build a layout out of components you haven't specified yet, you can't ask whether two layouts are the same, and once the triples are composed the structural information (which channels actually talk to each other) is gone.

I'd like an abstract circuit layer that sits on top of the current machinery. The idea is a symbolic circuit expression: component placeholders combined with //feedback as lazy nodes instead of eagerly-evaluated ones. Concrete SLH composition stays exactly as it is and becomes the thing the expression lowers to, so nothing about the current API changes.

Concretely this buys us a few things. You can do topological reasoning with black-box components: build and manipulate a network before any component's SLH is pinned down, substitute concrete triples in later, and derive the reduced SLH of a feedback network as a function of abstract blocks (or just check that two layouts are equivalent). It gives us block decomposition, factoring a large network into independent sub-blocks and detecting channels that don't interact so the effective channel count shrinks, which the eager path throws away. It's the natural home for a real component library, since beam splitter, phase shifter, cavity, and coherent drive currently live only as prose in the docs rather than exported constructors. And it lets permutation routing be an algebraic object rather than manual index bookkeeping.

Rough API sketch (names are placeholders):

# Named black-box components with a fixed channel dimension
bs   = CircuitSymbol(:BS, 2)      # 2 in / 2 out
cav  = CircuitSymbol(:cav, 1)
perm = CPermutation([2, 1])       # channel routing as a first-class object

# The composition operators stay eager on concrete SLHs (unchanged), but build
# a lazy Circuit expression as soon as any operand is symbolic:
net = feedback((bs ⊞ cav) ▷ perm, 2, 1)   # a Circuit, not yet an SLH

# Fill in the black boxes
net = substitute(net, Dict(bs => beamsplitter(θ), cav => cavity(Δ, γ)))

# Symbolic reduction: feedback elimination + series/concat laws, parameters kept symbolic
net = simplify(net)

# Structural analysis
blocks = decompose(net)     # independent Circuit sub-expressions
isequiv(net_a, net_b)       # equal after reduction?

# Lower to the concrete triple (runs today's composition path)
G = SLH(net)

Two things worth settling before building the full thing: the payoff is mostly for large or modular networks, so it's worth deciding whether that's in scope, and whether block decomposition needs its own graph representation or can be read straight off the expression tree.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the current concrete SLH composition path and the existing ▷, ⊞, and feedback operations. Define the symbolic Circuit nodes, substitution, simplification, decomposition, equivalence checking, and SLH lowering while preserving concrete composition unchanged. Done means abstract networks can be built before component triples are known, analyzed structurally, substituted, simplified, and lowered to the current SLH path.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.