Full Stack Quantum Hardware Simulations

Stefan Krastanov
UMass Amherst

Scientific Computing...

... for QIS

... applied to the CQN

Scientific Computing

1. Multi-physics modeling

2. Surrogate modeling and emulation

3. Simulation-based inference

4. Causal modeling and inference

5. Agent-based modeling

6. Probabilistic programming

7. Differentiable programming

8. Open-ended optimization

9. Machine programming

  1. Lavin et al.
    Simulation Intelligence: Towards a New Generation of Scientific Methods

Scientific Computing

1. Multi-physics modeling

2. Surrogate modeling and emulation

3. Simulation-based inference

4. Causal modeling and inference

5. Agent-based modeling

6. Probabilistic programming

7. Differentiable programming

8. Open-ended optimization

9. Machine programming

  1. Lavin et al.
    Simulation Intelligence: Towards a New Generation of Scientific Methods

QIS specific issues

Quantum systems are expensive to model...

...and there is a diverse set of modeling techniques.

Types of Dynamics

Types of Dynamics

Continuous:
Hamiltonians, Master Equations

Types of Dynamics

Continuous:
Hamiltonians, Master Equations
Discrete:
Gates, Circuits, Network Schedules

Types of Dynamics

Continuous:
Hamiltonians, Master Equations
Discrete:
Gates, Circuits
Stochastic:
Weak Measurements, Feedback

State Representation

Kets and density matrices
Tableaux and graphs
Matrix product states and tensor network states

Digression: We have the fastest tableaux algebra tool in-house


            a = random_pauli(1_000_000_000);
            b = random_pauli(1_000_000_000);
            @benchmark mul_left!(a,b)
            # Time  (median):     32.246 ms
            
  1. Krastanov and contributors
    QuantumClifford.jl

... and work on GPU acceleration for Clifford circuits¹

... and a library of codes and syndrome measurement circuit compilers²

... and expander-graph LDPC code generators³

  1. past and current undergrad projects at MIT and Hampshire
  2. past and current undergrad projects at GSoC and UMass
  3. current undergrad projects at MIT (Vaishnavi Addala)
    QuantumExpanders.jl

Digression: The fastest Bell pair purification simulator in-house

Time to perform a pair of CNOT gates, depending on formalism
  1. past undergrad projects at MIT (Shu Ge)
    BPGates.jl

Full-Stack Design and Optimization Toolkit

Symbolic description of quantum logic

Declarative noise models

Translation to many simulator backends

Discrete event scheduler

High-level lego-like interface

Symbolic description of quantum logic


              julia> N⊗X * vac⊗X1
              n̂⊗σˣ|0⟩|+⟩
              
              julia> express(vac⊗X1)
              Ket(...)

              julia> express(X1⊗Z2, CliffordRepr())
               X_ 
              -_Z
            

                traits = [Qubit(), Qubit(), Qumode()]
                reg = Register(traits)
              

A register "stores" the states being simulated.

Translation to many simulator backends


                initialize!(reg[1], X₁)
              

A register's slot can be initialized to an arbitrary state, e.g. $|x_1\rangle$ an eigenstate of $\hat{\sigma}_x$.

Translation to many simulator backends


                initialize!(reg[1], X₁)
                initialize!(reg[2], Z₁)
                apply!((reg[1], reg[2]), CNOT)
              

Arbitrary quantum gates or channels can be applied.

Discrete event scheduler

Locks and channels, message passing, delays, concurrency, agent-based sims...

Discrete event scheduler

High-level lego-like interface

Full repeater sim with automatic instrumentation.

              for (;src, dst) in edges(mgraph)
                  @process entangler(sim, mgraph, src, dst, ...)
              end
              for node in vertices(mgraph)
                  @process swapper(sim, mgraph, node, ...)
              end
              for (;src, dst) in all_node_pairs(mgraph)
                  @process entangler(sim, mgraph, src, dst, ...)
              end
            

Play with it at areweentangledyet.com

QuantumSavory.jl

github.com/Krastanov/QuantumSavory.jl

Scientific Computing

1. Multi-physics modeling

2. Surrogate modeling and emulation

3. Simulation-based inference

4. Causal modeling and inference

5. Agent-based modeling

6. Probabilistic programming

7. Differentiable programming

8. Open-ended optimization

9. Machine programming

Multi-formalism QIS modeling