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

Elaborate on types of transpiler passes #1086

Merged
merged 5 commits into from
Apr 15, 2024
Merged
Changes from 4 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
2 changes: 1 addition & 1 deletion docs/transpile/custom-transpiler-pass.ipynb
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when you say "these are passes which will translate circuits to its ISA...." are you referring to both analysis and transformation passes? or just the transformation pass? the rest is great, just the last sentence im confused about which we're talking about

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just the transformation pass. I just changed that sentence up a bit to make it clearer.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that looks great, it is clearer and more detailed.

The only thing I could think of was maybe altering the last sentence a tiny bit.
You could add something like :
"For example, transformation passes will translate a circuit to its ISA which defines the set of instructions supported by a specific quantum device."

This would be for someone who just wants the gist and not to read a new page

Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"source": [
"## Transpiler passes\n",
"\n",
"Transpiler passes are classified as analysis or transformation passes. Passes in general work with the [DAG](../api/qiskit/qiskit.dagcircuit.DAGCircuit) and the `property_set`, a dictionary-like object for storing properties determined by analysis passes. Analysis passes work with the DAG but cannot modify it. This contrasts with transformation passes, which do modify the DAG, and can read (but not write to) `property_set`."
"Transpiler passes are classified either as an [`AnalysisPass`](../api/qiskit/qiskit.transpiler.AnalysisPass) or a [`TransformationPass`](../api/qiskit/qiskit.transpiler.TransformationPass). Passes in general work with the [DAG](../api/qiskit/qiskit.dagcircuit.DAGCircuit) and the `property_set`, a dictionary-like object for storing properties determined by analysis passes. Analysis passes work with both the DAG and its `property_set`. They cannot modify the DAG, but can modify the `property_set`. This contrasts with transformation passes, which do modify the DAG, and can read (but not write to) `property_set`. For example, transformation passes will translate a circuit to its [ISA](/transpile/index#instruction-set-architecture) or perform routing passes to insert SWAP gates where needed."
kaelynj marked this conversation as resolved.
Show resolved Hide resolved
]
},
{
Expand Down
Loading