Skip to content

Commit

Permalink
Upgrade: Switch to released version of quil-rs
Browse files Browse the repository at this point in the history
  • Loading branch information
dbanty committed Oct 19, 2021
1 parent a8bd891 commit df5b481
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 20 deletions.
2 changes: 2 additions & 0 deletions .releaserc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ plugins:
release: minor
- tag: Update
release: patch
- tag: Upgrade
release: patch
- tag: New
release: patch
- - '@semantic-release/release-notes-generator'
Expand Down
15 changes: 8 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion qcs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ lazy_static = "1.4.0"
log = "0.4.14"
num = "0.4.0"
qcs-api = { version ="0.0.1", path = "../qcs-api" }
quil = { version = "0.5.0", git = "https://github.com/rigetti/quil-rust.git", branch = "sdk-requirements" }
quil-rs = "0.8.0"
reqwest = { version = "0.11.4", features = ["rustls", "json"] }
rmp-serde = "0.15.5"
serde = { version = "1.0.126", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion qcs/src/qpu/execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::convert::TryFrom;

use eyre::{eyre, Report, Result, WrapErr};
use log::trace;
use quil::expression::Expression;
use quil_rs::expression::Expression;

use qcs_api::models::EngagementWithCredentials;

Expand Down
4 changes: 2 additions & 2 deletions qcs/src/qpu/quilc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::convert::TryFrom;
use std::str::FromStr;

use eyre::{Report, Result, WrapErr};
use quil::Program;
use quil_rs::Program;
use serde::{Deserialize, Serialize};

use isa::CompilerIsa;
Expand Down Expand Up @@ -60,7 +60,7 @@ impl From<NativeQuil> for String {
/// A wrapper around [`Program`] which indicates it has been converted to `NativeQuil` (has been run
/// through `quilc` and therefore is suitable to use on QPUs.
#[derive(Debug, PartialEq)]
pub struct NativeQuilProgram(Program);
pub(super) struct NativeQuilProgram(Program);

impl TryFrom<NativeQuil> for NativeQuilProgram {
type Error = Report;
Expand Down
14 changes: 8 additions & 6 deletions qcs/src/qpu/rewrite_arithmetic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ use std::convert::TryFrom;
use eyre::{eyre, Report, Result};
use indexmap::set::IndexSet;
use num::complex::Complex64;
use quil::expression::{Expression, InfixOperator};
use quil::instruction::{
AttributeValue, FrameIdentifier, Gate, Instruction, MemoryReference, ScalarType, SetFrequency,
SetPhase, SetScale, ShiftFrequency, ShiftPhase, Vector,
use quil_rs::{
expression::{Expression, InfixOperator},
instruction::{
AttributeValue, FrameIdentifier, Gate, Instruction, MemoryReference, ScalarType,
SetFrequency, SetPhase, SetScale, ShiftFrequency, ShiftPhase, Vector,
},
program::{FrameSet, MemoryRegion},
Program,
};
use quil::program::{FrameSet, MemoryRegion};
use quil::Program;

use crate::qpu::quilc::NativeQuilProgram;

Expand Down
8 changes: 5 additions & 3 deletions qcs/src/qvm/execution.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
use std::collections::HashMap;
use std::str::FromStr;

use eyre::{eyre, Result, WrapErr};
use quil::instruction::{ArithmeticOperand, Instruction, MemoryReference, Move};
use quil::Program;
use quil_rs::{
instruction::{ArithmeticOperand, Instruction, MemoryReference, Move},
Program,
};

use crate::configuration::Configuration;
use crate::executable::Parameters;
use crate::ExecutionResult;

use super::{QVMRequest, QVMResponse};
use std::collections::HashMap;

/// Contains all the info needed to execute on a QVM a single time, with the ability to be reused for
/// faster subsequent runs.
Expand Down

0 comments on commit df5b481

Please sign in to comment.