Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change: Move Quasar out to a new package #60

Merged
merged 1 commit into from
Oct 28, 2024
Merged
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
6 changes: 2 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ authors = ["Katharine Hyatt <[email protected]> and contributors"]
version = "0.0.6"

[deps]
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
Automa = "67c07d97-cdcb-5c2c-af73-a7f9c32a568b"
Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa"
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Expand All @@ -14,6 +12,7 @@ JSON3 = "0f8b85d8-7281-11e9-16c2-39a750bddbf1"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
Quasar = "86e06105-936e-439e-acf0-7687560b0bd9"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
Expand All @@ -27,9 +26,7 @@ Braket = "19504a0f-b47d-4348-9127-acc6cc69ef67"
BraketSimulatorBraketExt = "Braket"

[compat]
AbstractTrees = "=0.4.5"
Aqua = "=0.8"
Automa = "=1.0.4"
Braket = "0.9.5"
Combinatorics = "=1.0.2"
DataStructures = "=0.18.20"
Expand All @@ -42,6 +39,7 @@ Logging = "1.6"
OrderedCollections = "=1.6.3"
PrecompileTools = "=1.2.1"
PythonCall = "=0.9.23"
Quasar = "0.0.1"
Random = "1.6"
StaticArrays = "1.9"
StatsBase = "0.34"
Expand Down
11 changes: 8 additions & 3 deletions src/BraketSimulator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ using
UUIDs,
StructTypes,
Random,
Quasar,
PrecompileTools

export StateVectorSimulator, DensityMatrixSimulator, evolve!, simulate, ValidationError
Expand Down Expand Up @@ -63,9 +64,8 @@ include("operators.jl")
include("observables.jl")
using .Observables
include("results.jl")
include("Quasar.jl")
using .Quasar
include("pragmas.jl")
include("builtin_gates.jl")
include("gates.jl")
include("noises.jl")
include("schemas.jl")
Expand All @@ -76,6 +76,10 @@ include("pow_gates.jl")
include("gate_kernels.jl")
include("noise_kernels.jl")

function __init__()
Quasar.builtin_gates[] = builtin_gates
end

const LOG2_CHUNK_SIZE = 10
const CHUNK_SIZE = 2^LOG2_CHUNK_SIZE

Expand Down Expand Up @@ -776,7 +780,8 @@ include("dm_simulator.jl")
#pragma braket result sample x(q[0]) @ y(q[1])
"""
@compile_workload begin
using BraketSimulator, BraketSimulator.Quasar, BraketSimulator.StructTypes
using BraketSimulator, Quasar
Quasar.builtin_gates[] = BraketSimulator.builtin_gates
simulator = StateVectorSimulator(5, 0)
oq3_program = OpenQasmProgram(braketSchemaHeader("braket.ir.openqasm.program", "1"), custom_qasm, nothing)
simulate(simulator, oq3_program, 100)
Expand Down
Loading
Loading