Skip to content

Commit

Permalink
feat: bump extension versions and gen extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
ss2165 committed Nov 26, 2024
1 parent b4e9a2e commit f75954e
Show file tree
Hide file tree
Showing 4 changed files with 120 additions and 30 deletions.
87 changes: 60 additions & 27 deletions tket2-exts/src/tket2_exts/data/tket2/hseries.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.1.0",
"version": "0.2.0",
"name": "tket2.hseries",
"extension_reqs": [
"arithmetic.float.types",
Expand All @@ -12,7 +12,7 @@
"LazyMeasure": {
"extension": "tket2.hseries",
"name": "LazyMeasure",
"description": "LazyMeasure",
"description": "Lazily Measure a qubit and lose it.",
"signature": {
"params": [],
"body": {
Expand Down Expand Up @@ -50,7 +50,31 @@
"Measure": {
"extension": "tket2.hseries",
"name": "Measure",
"description": "Measure",
"description": "Measure a qubit and lose it.",
"signature": {
"params": [],
"body": {
"input": [
{
"t": "Q"
}
],
"output": [
{
"t": "Sum",
"s": "Unit",
"size": 2
}
],
"extension_reqs": []
}
},
"binary": false
},
"MeasureReset": {
"extension": "tket2.hseries",
"name": "MeasureReset",
"description": "Measure a qubit and reset it to the Z |0> eigenstate.",
"signature": {
"params": [],
"body": {
Expand All @@ -77,7 +101,7 @@
"PhasedX": {
"extension": "tket2.hseries",
"name": "PhasedX",
"description": "PhasedX",
"description": "PhasedX gate.",
"signature": {
"params": [],
"body": {
Expand Down Expand Up @@ -110,28 +134,10 @@
},
"binary": false
},
"QAlloc": {
"extension": "tket2.hseries",
"name": "QAlloc",
"description": "QAlloc",
"signature": {
"params": [],
"body": {
"input": [],
"output": [
{
"t": "Q"
}
],
"extension_reqs": []
}
},
"binary": false
},
"QFree": {
"extension": "tket2.hseries",
"name": "QFree",
"description": "QFree",
"description": "Free a qubit (lose track of it).",
"signature": {
"params": [],
"body": {
Expand All @@ -149,7 +155,7 @@
"Reset": {
"extension": "tket2.hseries",
"name": "Reset",
"description": "Reset",
"description": "Reset a qubit to the Z |0> eigenstate.",
"signature": {
"params": [],
"body": {
Expand All @@ -171,7 +177,7 @@
"Rz": {
"extension": "tket2.hseries",
"name": "Rz",
"description": "Rz",
"description": "Rotate a qubit around the Z axis. Not physical.",
"signature": {
"params": [],
"body": {
Expand All @@ -197,10 +203,37 @@
},
"binary": false
},
"TryQAlloc": {
"extension": "tket2.hseries",
"name": "TryQAlloc",
"description": "Allocate a qubit in the Z |0> eigenstate.",
"signature": {
"params": [],
"body": {
"input": [],
"output": [
{
"t": "Sum",
"s": "General",
"rows": [
[],
[
{
"t": "Q"
}
]
]
}
],
"extension_reqs": []
}
},
"binary": false
},
"ZZMax": {
"extension": "tket2.hseries",
"name": "ZZMax",
"description": "ZZMax",
"description": "Maximally entangling ZZ gate.",
"signature": {
"params": [],
"body": {
Expand Down Expand Up @@ -228,7 +261,7 @@
"ZZPhase": {
"extension": "tket2.hseries",
"name": "ZZPhase",
"description": "ZZPhase",
"description": "ZZ gate with an angle.",
"signature": {
"params": [],
"body": {
Expand Down
59 changes: 58 additions & 1 deletion tket2-exts/src/tket2_exts/data/tket2/quantum.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.1.0",
"version": "0.1.1",
"name": "tket2.quantum",
"extension_reqs": [],
"types": {},
Expand Down Expand Up @@ -214,6 +214,33 @@
},
"binary": false
},
"MeasureFree": {
"extension": "tket2.quantum",
"name": "MeasureFree",
"description": "MeasureFree",
"misc": {
"commutation": []
},
"signature": {
"params": [],
"body": {
"input": [
{
"t": "Q"
}
],
"output": [
{
"t": "Sum",
"s": "Unit",
"size": 2
}
],
"extension_reqs": []
}
},
"binary": false
},
"QAlloc": {
"extension": "tket2.quantum",
"name": "QAlloc",
Expand Down Expand Up @@ -544,6 +571,36 @@
},
"binary": false
},
"TryQAlloc": {
"extension": "tket2.quantum",
"name": "TryQAlloc",
"description": "TryQAlloc",
"misc": {
"commutation": []
},
"signature": {
"params": [],
"body": {
"input": [],
"output": [
{
"t": "Sum",
"s": "General",
"rows": [
[],
[
{
"t": "Q"
}
]
]
}
],
"extension_reqs": []
}
},
"binary": false
},
"X": {
"extension": "tket2.quantum",
"name": "X",
Expand Down
2 changes: 1 addition & 1 deletion tket2-hseries/src/extension/hseries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub use lower::{check_lowered, lower_tk2_op, LowerTk2Error, LowerTket2ToHSeriesP
/// The "tket2.hseries" extension id.
pub const EXTENSION_ID: ExtensionId = ExtensionId::new_unchecked("tket2.hseries");
/// The "tket2.hseries" extension version.
pub const EXTENSION_VERSION: Version = Version::new(0, 1, 0);
pub const EXTENSION_VERSION: Version = Version::new(0, 2, 0);

lazy_static! {
/// The "tket2.hseries" extension.
Expand Down
2 changes: 1 addition & 1 deletion tket2/src/extension.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ impl CustomSignatureFunc for Tk1Signature {
pub const TKET2_EXTENSION_ID: ExtensionId = ExtensionId::new_unchecked("tket2.quantum");

/// Current version of the TKET 2 extension
pub const TKET2_EXTENSION_VERSION: Version = Version::new(0, 1, 0);
pub const TKET2_EXTENSION_VERSION: Version = Version::new(0, 1, 1);

lazy_static! {
/// The extension definition for TKET2 ops and types.
Expand Down

0 comments on commit f75954e

Please sign in to comment.