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

feat!: update measurement and alloc operations #702

Merged
merged 9 commits into from
Dec 2, 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
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
Loading
Loading