Skip to content

Commit

Permalink
chore: update hugr
Browse files Browse the repository at this point in the history
api change to `instantiate_concrete` -> `instantiate`
  • Loading branch information
ss2165 committed Nov 9, 2023
1 parent 54b61c1 commit f25eb53
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ license-file = "LICENCE"
[workspace.dependencies]

tket2 = { path = "./tket2" }
quantinuum-hugr = { git = "https://github.com/CQCL-DEV/hugr", rev = "b71cae6" }
quantinuum-hugr = { git = "https://github.com/CQCL-DEV/hugr", rev = "d0499ad" }
portgraph = { version = "0.10" }
pyo3 = { version = "0.20" }
itertools = { version = "0.11.0" }
Expand Down
6 changes: 3 additions & 3 deletions tket2/src/extension.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub const JSON_PAYLOAD_NAME: SmolStr = SmolStr::new_inline("TKET1 Json Payload")
lazy_static! {
/// A custom type for the encoded TKET1 operation
static ref TKET1_OP_PAYLOAD : CustomType =
TKET1_EXTENSION.get_type(&JSON_PAYLOAD_NAME).unwrap().instantiate_concrete([]).unwrap();
TKET1_EXTENSION.get_type(&JSON_PAYLOAD_NAME).unwrap().instantiate([]).unwrap();

/// The TKET1 extension, containing the opaque TKET1 operations.
pub static ref TKET1_EXTENSION: Extension = {
Expand All @@ -42,7 +42,7 @@ pub static ref TKET1_EXTENSION: Extension = {
res.add_type(LINEAR_BIT_NAME, vec![], "A linear bit.".into(), TypeBound::Any.into()).unwrap();

let json_op_payload_def = res.add_type(JSON_PAYLOAD_NAME, vec![], "Opaque TKET1 operation metadata.".into(), TypeBound::Eq.into()).unwrap();
let json_op_payload = TypeParam::Opaque(json_op_payload_def.instantiate_concrete([]).unwrap());
let json_op_payload = TypeParam::Opaque(json_op_payload_def.instantiate([]).unwrap());
res.add_op_custom_sig(
JSON_OP_NAME,
"An opaque TKET1 operation.".into(),
Expand All @@ -60,7 +60,7 @@ pub static ref LINEAR_BIT: Type = {
Type::new_extension(TKET1_EXTENSION
.get_type(&LINEAR_BIT_NAME)
.unwrap()
.instantiate_concrete([])
.instantiate([])
.unwrap())
};

Expand Down
4 changes: 2 additions & 2 deletions tket2/src/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ const SYM_OP_ID: SmolStr = SmolStr::new_inline("symbolic_float");
lazy_static! {
/// The type of the symbolic expression opaque type arg.
pub static ref SYM_EXPR_T: CustomType =
EXTENSION.get_type(&SYM_EXPR_NAME).unwrap().instantiate_concrete([]).unwrap();
EXTENSION.get_type(&SYM_EXPR_NAME).unwrap().instantiate([]).unwrap();

pub static ref EXTENSION: Extension = {
let mut e = Extension::new(EXTENSION_ID);
Expand All @@ -277,7 +277,7 @@ pub static ref EXTENSION: Extension = {
TypeBound::Eq.into(),
)
.unwrap();
let sym_expr_param = TypeParam::Opaque(sym_expr_opdef.instantiate_concrete([]).unwrap());
let sym_expr_param = TypeParam::Opaque(sym_expr_opdef.instantiate([]).unwrap());

e.add_op_custom_sig_simple(
SYM_OP_ID,
Expand Down

0 comments on commit f25eb53

Please sign in to comment.