From 94cc65c53e7edb575997e73dd60e0d5d824ffecb Mon Sep 17 00:00:00 2001 From: Arnau Casau Date: Thu, 2 May 2024 16:01:22 +0200 Subject: [PATCH 01/31] detect prior header level --- scripts/lib/api/generateApiComponents.ts | 72 ++++++++++++++++++++---- 1 file changed, 61 insertions(+), 11 deletions(-) diff --git a/scripts/lib/api/generateApiComponents.ts b/scripts/lib/api/generateApiComponents.ts index 58878ac1f81..66b9e1794a5 100644 --- a/scripts/lib/api/generateApiComponents.ts +++ b/scripts/lib/api/generateApiComponents.ts @@ -88,17 +88,17 @@ function prepareProps( id: string, ): ComponentProps { const preparePropsPerApiType: Record ComponentProps> = { - class: () => prepareClassProps($child, $dl, githubSourceLink, id), + class: () => + prepareClassOrExceptionProps($, $main, $child, $dl, githubSourceLink, id), property: () => preparePropertyProps($child, $dl, priorApiType, githubSourceLink, id), method: () => - prepareMethodProps($, $child, $dl, priorApiType, githubSourceLink, id), + prepareMethodProps($, $main, $child, $dl, priorApiType, githubSourceLink, id), attribute: () => - prepareAttributeProps($, $child, $dl, priorApiType, githubSourceLink, id), - function: () => - prepareFunctionOrExceptionProps($, $child, $dl, id, githubSourceLink), + prepareAttributeProps($, $main, $child, $dl, priorApiType, githubSourceLink, id), + function: () => prepareFunctionProps($, $main, $child, $dl, id, githubSourceLink), exception: () => - prepareFunctionOrExceptionProps($, $child, $dl, id, githubSourceLink), + prepareClassOrExceptionProps($, $main, $child, $dl, githubSourceLink, id), }; const githubSourceLink = prepareGitHubLink($child, apiType === "method"); @@ -111,7 +111,9 @@ function prepareProps( return preparePropsPerApiType[apiType](); } -function prepareClassProps( +function prepareClassOrExceptionProps( + $: CheerioAPI, + $main: Cheerio, $child: Cheerio, $dl: Cheerio, githubSourceLink: string | undefined, @@ -131,6 +133,10 @@ function prepareClassProps( isDedicatedPage: true, }; } + const headerLevel = getHeaderLevel($, $main, $dl); + $( + `${getLastPartFromFullIdentifier(id)}`, + ).insertBefore($dl); return props; } @@ -162,6 +168,7 @@ function preparePropertyProps( function prepareMethodProps( $: CheerioAPI, + $main: Cheerio, $child: Cheerio, $dl: Cheerio, priorApiType: string | undefined, @@ -183,7 +190,10 @@ function prepareMethodProps( isDedicatedPage: true, }; } else if ($child.attr("id")) { - $(`

${getLastPartFromFullIdentifier(id)}

`).insertBefore($dl); + const headerLevel = getHeaderLevel($, $main, $dl); + $( + `${getLastPartFromFullIdentifier(id)}`, + ).insertBefore($dl); } } return props; @@ -191,6 +201,7 @@ function prepareMethodProps( function prepareAttributeProps( $: CheerioAPI, + $main: Cheerio, $child: Cheerio, $dl: Cheerio, priorApiType: string | undefined, @@ -234,7 +245,8 @@ function prepareAttributeProps( .trim(); const attributeValue = text.slice(equalIndex + 1, text.length).trim(); - $(`

${name}

`).insertBefore($dl); + const headerLevel = getHeaderLevel($, $main, $dl); + $(`${name}`).insertBefore($dl); return { id, @@ -244,8 +256,9 @@ function prepareAttributeProps( }; } -function prepareFunctionOrExceptionProps( +function prepareFunctionProps( $: CheerioAPI, + $main: Cheerio, $child: Cheerio, $dl: Cheerio, id: string, @@ -266,7 +279,10 @@ function prepareFunctionOrExceptionProps( isDedicatedPage: true, }; } - $(`

${getLastPartFromFullIdentifier(id)}

`).insertBefore($dl); + const headerLevel = getHeaderLevel($, $main, $dl); + $( + `${getLastPartFromFullIdentifier(id)}`, + ).insertBefore($dl); return props; } @@ -383,3 +399,37 @@ export async function htmlSignatureToMd( .replace(/^`/, "") .replace(/`$/, ""); } + +function getHeaderLevel($: CheerioAPI, $main: Cheerio, $dl: Cheerio){ + const priorHeaderLevel = getPriorHeaderLevel($, $main, $dl); + if (priorHeaderLevel){ + return +priorHeaderLevel + 1; + } + return 1; +} + +function getPriorHeaderLevel( + $: CheerioAPI, + $main: Cheerio, + $dl: Cheerio, +): string | undefined { + const siblings = $dl.siblings(); + for (const sibling of siblings) { + const $sibling = $(sibling); + if ( + // todo: probably we need to remove inline classes too + $sibling.hasClass("method-header") || + $sibling.hasClass("attribute-header") + ) { + continue; + } + const tagName = $sibling.get(0)?.tagName; + if (tagName?.startsWith("h") && tagName.length == 2) { + return $sibling.get(0)?.tagName.substring(1); + } + } + + // If there's no header among the siblings, we look for the prior + // inline class becuase the child will be inline + return $main.find(".class-header").last().get(0)?.tagName.substring(1); +} From 455e01dad05c88f1678c05b400064d9c6d0e2aa3 Mon Sep 17 00:00:00 2001 From: Arnau Casau Date: Thu, 2 May 2024 18:06:31 +0200 Subject: [PATCH 02/31] properties headers and replace CSS class for data --- scripts/lib/api/generateApiComponents.ts | 32 +++++++++++++++--------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/scripts/lib/api/generateApiComponents.ts b/scripts/lib/api/generateApiComponents.ts index 66b9e1794a5..65d44cc74d0 100644 --- a/scripts/lib/api/generateApiComponents.ts +++ b/scripts/lib/api/generateApiComponents.ts @@ -91,7 +91,7 @@ function prepareProps( class: () => prepareClassOrExceptionProps($, $main, $child, $dl, githubSourceLink, id), property: () => - preparePropertyProps($child, $dl, priorApiType, githubSourceLink, id), + preparePropertyProps($, $main, $child, $dl, priorApiType, githubSourceLink, id), method: () => prepareMethodProps($, $main, $child, $dl, priorApiType, githubSourceLink, id), attribute: () => @@ -135,12 +135,14 @@ function prepareClassOrExceptionProps( } const headerLevel = getHeaderLevel($, $main, $dl); $( - `${getLastPartFromFullIdentifier(id)}`, + `${getLastPartFromFullIdentifier(id)}`, ).insertBefore($dl); return props; } function preparePropertyProps( + $: CheerioAPI, + $main: Cheerio, $child: Cheerio, $dl: Cheerio, priorApiType: string | undefined, @@ -163,6 +165,9 @@ function preparePropertyProps( }; } + const headerLevel = getHeaderLevel($, $main, $dl); + $(`${getLastPartFromFullIdentifier(id)}`).insertBefore($dl); + return props; } @@ -192,7 +197,7 @@ function prepareMethodProps( } else if ($child.attr("id")) { const headerLevel = getHeaderLevel($, $main, $dl); $( - `${getLastPartFromFullIdentifier(id)}`, + `${getLastPartFromFullIdentifier(id)}`, ).insertBefore($dl); } } @@ -246,7 +251,7 @@ function prepareAttributeProps( const attributeValue = text.slice(equalIndex + 1, text.length).trim(); const headerLevel = getHeaderLevel($, $main, $dl); - $(`${name}`).insertBefore($dl); + $(`${name}`).insertBefore($dl); return { id, @@ -281,7 +286,7 @@ function prepareFunctionProps( } const headerLevel = getHeaderLevel($, $main, $dl); $( - `${getLastPartFromFullIdentifier(id)}`, + `${getLastPartFromFullIdentifier(id)}`, ).insertBefore($dl); return props; @@ -403,9 +408,16 @@ export async function htmlSignatureToMd( function getHeaderLevel($: CheerioAPI, $main: Cheerio, $dl: Cheerio){ const priorHeaderLevel = getPriorHeaderLevel($, $main, $dl); if (priorHeaderLevel){ + + if(+priorHeaderLevel == 6){ + throw new Error("API component cannot set inexisting header: "); + } + return +priorHeaderLevel + 1; } - return 1; + + // Minimum header possible + return 3; } function getPriorHeaderLevel( @@ -416,11 +428,7 @@ function getPriorHeaderLevel( const siblings = $dl.siblings(); for (const sibling of siblings) { const $sibling = $(sibling); - if ( - // todo: probably we need to remove inline classes too - $sibling.hasClass("method-header") || - $sibling.hasClass("attribute-header") - ) { + if ($sibling.data("header-type")) { continue; } const tagName = $sibling.get(0)?.tagName; @@ -431,5 +439,5 @@ function getPriorHeaderLevel( // If there's no header among the siblings, we look for the prior // inline class becuase the child will be inline - return $main.find(".class-header").last().get(0)?.tagName.substring(1); + return $main.find("[data-header-type=class-header]").last().get(0)?.tagName.substring(1); } From c291ec3744c059006d142d4adbe268a77e3d8bd2 Mon Sep 17 00:00:00 2001 From: Arnau Casau Date: Thu, 2 May 2024 18:27:50 +0200 Subject: [PATCH 03/31] new comments and fmt --- scripts/lib/api/generateApiComponents.ts | 75 ++++++++++++++++++------ 1 file changed, 58 insertions(+), 17 deletions(-) diff --git a/scripts/lib/api/generateApiComponents.ts b/scripts/lib/api/generateApiComponents.ts index 65d44cc74d0..3161eb1fdfe 100644 --- a/scripts/lib/api/generateApiComponents.ts +++ b/scripts/lib/api/generateApiComponents.ts @@ -91,12 +91,37 @@ function prepareProps( class: () => prepareClassOrExceptionProps($, $main, $child, $dl, githubSourceLink, id), property: () => - preparePropertyProps($, $main, $child, $dl, priorApiType, githubSourceLink, id), + preparePropertyProps( + $, + $main, + $child, + $dl, + priorApiType, + githubSourceLink, + id, + ), method: () => - prepareMethodProps($, $main, $child, $dl, priorApiType, githubSourceLink, id), + prepareMethodProps( + $, + $main, + $child, + $dl, + priorApiType, + githubSourceLink, + id, + ), attribute: () => - prepareAttributeProps($, $main, $child, $dl, priorApiType, githubSourceLink, id), - function: () => prepareFunctionProps($, $main, $child, $dl, id, githubSourceLink), + prepareAttributeProps( + $, + $main, + $child, + $dl, + priorApiType, + githubSourceLink, + id, + ), + function: () => + prepareFunctionProps($, $main, $child, $dl, id, githubSourceLink), exception: () => prepareClassOrExceptionProps($, $main, $child, $dl, githubSourceLink, id), }; @@ -135,7 +160,9 @@ function prepareClassOrExceptionProps( } const headerLevel = getHeaderLevel($, $main, $dl); $( - `${getLastPartFromFullIdentifier(id)}`, + `${getLastPartFromFullIdentifier( + id, + )}`, ).insertBefore($dl); return props; } @@ -166,7 +193,11 @@ function preparePropertyProps( } const headerLevel = getHeaderLevel($, $main, $dl); - $(`${getLastPartFromFullIdentifier(id)}`).insertBefore($dl); + $( + `${getLastPartFromFullIdentifier( + id, + )}`, + ).insertBefore($dl); return props; } @@ -197,7 +228,9 @@ function prepareMethodProps( } else if ($child.attr("id")) { const headerLevel = getHeaderLevel($, $main, $dl); $( - `${getLastPartFromFullIdentifier(id)}`, + `${getLastPartFromFullIdentifier( + id, + )}`, ).insertBefore($dl); } } @@ -251,7 +284,9 @@ function prepareAttributeProps( const attributeValue = text.slice(equalIndex + 1, text.length).trim(); const headerLevel = getHeaderLevel($, $main, $dl); - $(`${name}`).insertBefore($dl); + $( + `${name}`, + ).insertBefore($dl); return { id, @@ -286,7 +321,9 @@ function prepareFunctionProps( } const headerLevel = getHeaderLevel($, $main, $dl); $( - `${getLastPartFromFullIdentifier(id)}`, + `${getLastPartFromFullIdentifier( + id, + )}`, ).insertBefore($dl); return props; @@ -405,18 +442,18 @@ export async function htmlSignatureToMd( .replace(/`$/, ""); } -function getHeaderLevel($: CheerioAPI, $main: Cheerio, $dl: Cheerio){ +function getHeaderLevel($: CheerioAPI, $main: Cheerio, $dl: Cheerio) { const priorHeaderLevel = getPriorHeaderLevel($, $main, $dl); - if (priorHeaderLevel){ - - if(+priorHeaderLevel == 6){ + if (priorHeaderLevel) { + if (+priorHeaderLevel == 6) { throw new Error("API component cannot set inexisting header: "); } return +priorHeaderLevel + 1; } - // Minimum header possible + // Minimum header level for components without a dedicated page. This components are + // guaranteed to have an

for the page and

to define the section they belong to. return 3; } @@ -437,7 +474,11 @@ function getPriorHeaderLevel( } } - // If there's no header among the siblings, we look for the prior - // inline class becuase the child will be inline - return $main.find("[data-header-type=class-header]").last().get(0)?.tagName.substring(1); + // If there's no header among the siblings, we look for the prior inline class in some + // parent node previously set + return $main + .find("[data-header-type=class-header]") + .last() + .get(0) + ?.tagName.substring(1); } From 11fbec44d26d82eb57cc364addde922cf5ab7e33 Mon Sep 17 00:00:00 2001 From: Arnau Casau Date: Fri, 3 May 2024 10:38:22 +0200 Subject: [PATCH 04/31] Regenerate qiskit 0.19.6 --- docs/api/qiskit/0.19/execute.mdx | 2 +- docs/api/qiskit/0.19/logging.mdx | 2 ++ ...t.finance.applications.ising.portfolio.mdx | 10 +++---- ...ations.ising.portfolio_diversification.mdx | 6 ++--- ...optimization.applications.ising.clique.mdx | 6 ++--- ...ptimization.applications.ising.docplex.mdx | 2 +- ...ization.applications.ising.exact_cover.mdx | 6 ++--- ...ion.applications.ising.graph_partition.mdx | 6 ++--- ...timization.applications.ising.knapsack.mdx | 6 ++--- ...ptimization.applications.ising.max_cut.mdx | 6 ++--- ...imization.applications.ising.partition.mdx | 4 +-- ...ization.applications.ising.set_packing.mdx | 6 ++--- ...mization.applications.ising.stable_set.mdx | 6 ++--- ...it.optimization.applications.ising.tsp.mdx | 16 +++++++----- ...ion.applications.ising.vehicle_routing.mdx | 8 +++--- ...zation.applications.ising.vertex_cover.mdx | 6 ++--- .../api/qiskit/0.19/qiskit.pulse.channels.mdx | 18 +++++++++++++ .../0.19/qiskit.pulse.pulse_lib.discrete.mdx | 26 +++++++++---------- .../0.19/qiskit.scheduler.methods.basic.mdx | 8 +++--- .../qiskit/0.19/qiskit.scheduler.utils.mdx | 6 ++--- ...skit.visualization.pulse.interpolation.mdx | 8 +++--- .../qiskit.visualization.pulse.qcstyle.mdx | 4 +++ 22 files changed, 98 insertions(+), 70 deletions(-) diff --git a/docs/api/qiskit/0.19/execute.mdx b/docs/api/qiskit/0.19/execute.mdx index 9b7594f5157..1c1771f92ce 100644 --- a/docs/api/qiskit/0.19/execute.mdx +++ b/docs/api/qiskit/0.19/execute.mdx @@ -16,7 +16,7 @@ python_api_name: qiskit.execute `qiskit.execute` -### execute +## execute Execute a list of [`qiskit.circuit.QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") or [`qiskit.pulse.Schedule`](qiskit.pulse.Schedule "qiskit.pulse.Schedule") on a backend. diff --git a/docs/api/qiskit/0.19/logging.mdx b/docs/api/qiskit/0.19/logging.mdx index 7beef88f612..b64c90589ba 100644 --- a/docs/api/qiskit/0.19/logging.mdx +++ b/docs/api/qiskit/0.19/logging.mdx @@ -22,6 +22,8 @@ python_api_name: qiskit.ignis.logging | [`IgnisLogging`](qiskit.ignis.logging.IgnisLogging "qiskit.ignis.logging.IgnisLogging")() | Singleton class to configure file logging via IgnisLogger | | [`IgnisLogReader`](qiskit.ignis.logging.IgnisLogReader "qiskit.ignis.logging.IgnisLogReader")() | Class to read from Ignis log files | +### + A logger class for Ignis diff --git a/docs/api/qiskit/0.19/qiskit.finance.applications.ising.portfolio.mdx b/docs/api/qiskit/0.19/qiskit.finance.applications.ising.portfolio.mdx index ece3205ff48..45cadef9b2b 100644 --- a/docs/api/qiskit/0.19/qiskit.finance.applications.ising.portfolio.mdx +++ b/docs/api/qiskit/0.19/qiskit.finance.applications.ising.portfolio.mdx @@ -22,31 +22,31 @@ Convert portfolio optimization instances into Pauli list | [`portfolio_variance`](#qiskit.finance.applications.ising.portfolio.portfolio_variance "qiskit.finance.applications.ising.portfolio.portfolio_variance")(x, sigma) | returns portfolio variance | | [`random_model`](#qiskit.finance.applications.ising.portfolio.random_model "qiskit.finance.applications.ising.portfolio.random_model")(n\[, seed]) | Generate random model (mu, sigma) for portfolio optimization problem. | -### get\_operator +## get\_operator get qubit op -### portfolio\_expected\_value +## portfolio\_expected\_value returns portfolio expected value -### portfolio\_value +## portfolio\_value returns portfolio value -### portfolio\_variance +## portfolio\_variance returns portfolio variance -### random\_model +## random\_model Generate random model (mu, sigma) for portfolio optimization problem. diff --git a/docs/api/qiskit/0.19/qiskit.finance.applications.ising.portfolio_diversification.mdx b/docs/api/qiskit/0.19/qiskit.finance.applications.ising.portfolio_diversification.mdx index 1eeb99822e5..26f7fac24c0 100644 --- a/docs/api/qiskit/0.19/qiskit.finance.applications.ising.portfolio_diversification.mdx +++ b/docs/api/qiskit/0.19/qiskit.finance.applications.ising.portfolio_diversification.mdx @@ -20,7 +20,7 @@ portfolio diversification | [`get_portfoliodiversification_solution`](#qiskit.finance.applications.ising.portfolio_diversification.get_portfoliodiversification_solution "qiskit.finance.applications.ising.portfolio_diversification.get_portfoliodiversification_solution")(rho, …) | Tries to obtain a feasible solution (in vector form) of an instance of portfolio diversification from the results dictionary. | | [`get_portfoliodiversification_value`](#qiskit.finance.applications.ising.portfolio_diversification.get_portfoliodiversification_value "qiskit.finance.applications.ising.portfolio_diversification.get_portfoliodiversification_value")(rho, n, …) | Evaluates an objective function of an instance of portfolio diversification and its solution (in vector form). | -### get\_operator +## get\_operator Converts an instance of portfolio optimization into a list of Paulis. @@ -40,7 +40,7 @@ portfolio diversification [WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator") -### get\_portfoliodiversification\_solution +## get\_portfoliodiversification\_solution Tries to obtain a feasible solution (in vector form) of an instance of portfolio diversification from the results dictionary. @@ -61,7 +61,7 @@ portfolio diversification numpy.ndarray -### get\_portfoliodiversification\_value +## get\_portfoliodiversification\_value Evaluates an objective function of an instance of portfolio diversification and its solution (in vector form). diff --git a/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.clique.mdx b/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.clique.mdx index 4f36b56cb22..7c6babaf186 100644 --- a/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.clique.mdx +++ b/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.clique.mdx @@ -22,7 +22,7 @@ Deal with Gset format. See [https://web.stanford.edu/\~yyye/yyye/Gset/](https:// | [`get_operator`](#qiskit.optimization.applications.ising.clique.get_operator "qiskit.optimization.applications.ising.clique.get_operator")(weight\_matrix, K) | Generate Hamiltonian for the clique. | | [`satisfy_or_not`](#qiskit.optimization.applications.ising.clique.satisfy_or_not "qiskit.optimization.applications.ising.clique.satisfy_or_not")(x, w, K) | Compute the value of a cut. | -### get\_graph\_solution +## get\_graph\_solution Get graph solution from binary string. @@ -40,7 +40,7 @@ Deal with Gset format. See [https://web.stanford.edu/\~yyye/yyye/Gset/](https:// numpy.ndarray -### get\_operator +## get\_operator Generate Hamiltonian for the clique. @@ -81,7 +81,7 @@ Deal with Gset format. See [https://web.stanford.edu/\~yyye/yyye/Gset/](https:// tuple([WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator"), float) -### satisfy\_or\_not +## satisfy\_or\_not Compute the value of a cut. diff --git a/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.docplex.mdx b/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.docplex.mdx index ba7d5e69722..05472c1f9da 100644 --- a/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.docplex.mdx +++ b/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.docplex.mdx @@ -58,7 +58,7 @@ print('tsp objective:', result['energy'] + offset) | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- | | [`get_operator`](#qiskit.optimization.applications.ising.docplex.get_operator "qiskit.optimization.applications.ising.docplex.get_operator")(mdl\[, auto\_penalty, …]) | Generate Ising Hamiltonian from a model of DOcplex. | -### get\_operator +## get\_operator Generate Ising Hamiltonian from a model of DOcplex. diff --git a/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.exact_cover.mdx b/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.exact_cover.mdx index 4a631b462b8..2124a5c89b0 100644 --- a/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.exact_cover.mdx +++ b/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.exact_cover.mdx @@ -20,13 +20,13 @@ exact cover | [`get_operator`](#qiskit.optimization.applications.ising.exact_cover.get_operator "qiskit.optimization.applications.ising.exact_cover.get_operator")(list\_of\_subsets) | Construct the Hamiltonian for the exact solver problem. | | [`get_solution`](#qiskit.optimization.applications.ising.exact_cover.get_solution "qiskit.optimization.applications.ising.exact_cover.get_solution")(x) | **param x**binary string as numpy array. | -### check\_solution\_satisfiability +## check\_solution\_satisfiability check solution satisfiability -### get\_operator +## get\_operator Construct the Hamiltonian for the exact solver problem. @@ -54,7 +54,7 @@ exact cover tuple([WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator"), float) -### get\_solution +## get\_solution **Parameters** diff --git a/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.graph_partition.mdx b/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.graph_partition.mdx index d83399d739b..1e9c584c8eb 100644 --- a/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.graph_partition.mdx +++ b/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.graph_partition.mdx @@ -20,7 +20,7 @@ Convert graph partitioning instances into Pauli list Deal with Gset format. See | [`get_operator`](#qiskit.optimization.applications.ising.graph_partition.get_operator "qiskit.optimization.applications.ising.graph_partition.get_operator")(weight\_matrix) | Generate Hamiltonian for the graph partitioning | | [`objective_value`](#qiskit.optimization.applications.ising.graph_partition.objective_value "qiskit.optimization.applications.ising.graph_partition.objective_value")(x, w) | Compute the value of a cut. | -### get\_graph\_solution +## get\_graph\_solution Get graph solution from binary string. @@ -38,7 +38,7 @@ Convert graph partitioning instances into Pauli list Deal with Gset format. See numpy.ndarray -### get\_operator +## get\_operator Generate Hamiltonian for the graph partitioning @@ -66,7 +66,7 @@ Convert graph partitioning instances into Pauli list Deal with Gset format. See [WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator") -### objective\_value +## objective\_value Compute the value of a cut. diff --git a/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.knapsack.mdx b/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.knapsack.mdx index a94545026fd..01ffb47c97f 100644 --- a/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.knapsack.mdx +++ b/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.knapsack.mdx @@ -24,7 +24,7 @@ If we have the weights w\[i], the values v\[i] and the maximum weight W\_max. We | [`get_solution`](#qiskit.optimization.applications.ising.knapsack.get_solution "qiskit.optimization.applications.ising.knapsack.get_solution")(x, values) | Get the solution to the knapsack problem from the bitstring that represents to the ground state of the Hamiltonian | | [`knapsack_value_weight`](#qiskit.optimization.applications.ising.knapsack.knapsack_value_weight "qiskit.optimization.applications.ising.knapsack.knapsack_value_weight")(solution, values, weights) | Get the total wight and value of the items taken in the knapsack. | -### get\_operator +## get\_operator Generate Hamiltonian for the knapsack problem. @@ -61,7 +61,7 @@ If we have the weights w\[i], the values v\[i] and the maximum weight W\_max. We * **ValueError** – max\_weight is negative -### get\_solution +## get\_solution Get the solution to the knapsack problem from the bitstring that represents to the ground state of the Hamiltonian @@ -82,7 +82,7 @@ If we have the weights w\[i], the values v\[i] and the maximum weight W\_max. We numpy.ndarray -### knapsack\_value\_weight +## knapsack\_value\_weight Get the total wight and value of the items taken in the knapsack. diff --git a/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.max_cut.mdx b/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.max_cut.mdx index 92b3689f00d..26b434d3cf9 100644 --- a/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.max_cut.mdx +++ b/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.max_cut.mdx @@ -20,7 +20,7 @@ Convert max-cut instances into Pauli list Deal with Gset format. See [https://we | [`get_operator`](#qiskit.optimization.applications.ising.max_cut.get_operator "qiskit.optimization.applications.ising.max_cut.get_operator")(weight\_matrix) | Generate Hamiltonian for the max-cut problem of a graph. | | [`max_cut_value`](#qiskit.optimization.applications.ising.max_cut.max_cut_value "qiskit.optimization.applications.ising.max_cut.max_cut_value")(x, w) | Compute the value of a cut. | -### get\_graph\_solution +## get\_graph\_solution Get graph solution from binary string. @@ -38,7 +38,7 @@ Convert max-cut instances into Pauli list Deal with Gset format. See [https://we numpy.ndarray -### get\_operator +## get\_operator Generate Hamiltonian for the max-cut problem of a graph. @@ -56,7 +56,7 @@ Convert max-cut instances into Pauli list Deal with Gset format. See [https://we [WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator") -### max\_cut\_value +## max\_cut\_value Compute the value of a cut. diff --git a/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.partition.mdx b/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.partition.mdx index 187feb73078..85adc8e5033 100644 --- a/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.partition.mdx +++ b/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.partition.mdx @@ -19,7 +19,7 @@ Generate Number Partitioning (Partition) instances, and convert them into a Hami | [`get_operator`](#qiskit.optimization.applications.ising.partition.get_operator "qiskit.optimization.applications.ising.partition.get_operator")(values) | Construct the Hamiltonian for a given Partition instance. | | [`partition_value`](#qiskit.optimization.applications.ising.partition.partition_value "qiskit.optimization.applications.ising.partition.partition_value")(x, number\_list) | Compute the value of a partition. | -### get\_operator +## get\_operator Construct the Hamiltonian for a given Partition instance. @@ -39,7 +39,7 @@ Generate Number Partitioning (Partition) instances, and convert them into a Hami tuple([WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator"), float) -### partition\_value +## partition\_value Compute the value of a partition. diff --git a/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.set_packing.mdx b/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.set_packing.mdx index 07b4b978022..d2e69aad491 100644 --- a/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.set_packing.mdx +++ b/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.set_packing.mdx @@ -20,13 +20,13 @@ set packing module | [`get_operator`](#qiskit.optimization.applications.ising.set_packing.get_operator "qiskit.optimization.applications.ising.set_packing.get_operator")(list\_of\_subsets) | Construct the Hamiltonian for the set packing. | | [`get_solution`](#qiskit.optimization.applications.ising.set_packing.get_solution "qiskit.optimization.applications.ising.set_packing.get_solution")(x) | **param x**binary string as numpy array. | -### check\_disjoint +## check\_disjoint check disjoint -### get\_operator +## get\_operator Construct the Hamiltonian for the set packing. @@ -56,7 +56,7 @@ set packing module tuple([WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator"), float) -### get\_solution +## get\_solution **Parameters** diff --git a/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.stable_set.mdx b/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.stable_set.mdx index fc4aab45352..2faec4982b2 100644 --- a/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.stable_set.mdx +++ b/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.stable_set.mdx @@ -20,7 +20,7 @@ Convert stable set instances into Pauli list. We read instances in the Gset form | [`get_operator`](#qiskit.optimization.applications.ising.stable_set.get_operator "qiskit.optimization.applications.ising.stable_set.get_operator")(w) | Generate Hamiltonian for the maximum stable set in a graph. | | [`stable_set_value`](#qiskit.optimization.applications.ising.stable_set.stable_set_value "qiskit.optimization.applications.ising.stable_set.stable_set_value")(x, w) | Compute the value of a stable set, and its feasibility. | -### get\_graph\_solution +## get\_graph\_solution Get graph solution from binary string. @@ -38,7 +38,7 @@ Convert stable set instances into Pauli list. We read instances in the Gset form numpy.ndarray -### get\_operator +## get\_operator Generate Hamiltonian for the maximum stable set in a graph. @@ -56,7 +56,7 @@ Convert stable set instances into Pauli list. We read instances in the Gset form tuple([WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator"), float) -### stable\_set\_value +## stable\_set\_value Compute the value of a stable set, and its feasibility. diff --git a/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.tsp.mdx b/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.tsp.mdx index 3758f8942b1..1f101f3bc9b 100644 --- a/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.tsp.mdx +++ b/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.tsp.mdx @@ -30,6 +30,8 @@ Convert symmetric TSP instances into Pauli list Deal with TSPLIB format. It supp | ------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------- | | [`TspData`](#qiskit.optimization.applications.ising.tsp.TspData "qiskit.optimization.applications.ising.tsp.TspData")(name, dim, coord, w) | Create new instance of TspData(name, dim, coord, w) | +## TspData + Create new instance of TspData(name, dim, coord, w) @@ -72,13 +74,13 @@ Convert symmetric TSP instances into Pauli list Deal with TSPLIB format. It supp -### calc\_distance +## calc\_distance calculate distance -### get\_operator +## get\_operator Generate Hamiltonian for TSP of a graph. @@ -97,7 +99,7 @@ Convert symmetric TSP instances into Pauli list Deal with TSPLIB format. It supp tuple([WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator"), float) -### get\_tsp\_solution +## get\_tsp\_solution Get graph solution from binary string. @@ -119,7 +121,7 @@ Convert symmetric TSP instances into Pauli list Deal with TSPLIB format. It supp Instance data of TSP -### parse\_tsplib\_format +## parse\_tsplib\_format Read graph in TSPLIB format from file. @@ -137,7 +139,7 @@ Instance data of TSP [TspData](#qiskit.optimization.applications.ising.tsp.TspData "qiskit.optimization.applications.ising.tsp.TspData") -### random\_tsp +## random\_tsp Generate a random instance for TSP. @@ -160,7 +162,7 @@ Instance data of TSP [TspData](#qiskit.optimization.applications.ising.tsp.TspData "qiskit.optimization.applications.ising.tsp.TspData") -### tsp\_feasible +## tsp\_feasible Check whether a solution is feasible or not. @@ -178,7 +180,7 @@ Instance data of TSP bool -### tsp\_value +## tsp\_value Compute the TSP value of a solution. diff --git a/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.vehicle_routing.mdx b/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.vehicle_routing.mdx index 148fad594c2..313fbac6bb5 100644 --- a/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.vehicle_routing.mdx +++ b/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.vehicle_routing.mdx @@ -21,7 +21,7 @@ Converts vehicle routing instances into a list of Paulis, and provides some rela | [`get_vehiclerouting_matrices`](#qiskit.optimization.applications.ising.vehicle_routing.get_vehiclerouting_matrices "qiskit.optimization.applications.ising.vehicle_routing.get_vehiclerouting_matrices")(instance, n, K) | Constructs auxiliary matrices from a vehicle routing instance, | | [`get_vehiclerouting_solution`](#qiskit.optimization.applications.ising.vehicle_routing.get_vehiclerouting_solution "qiskit.optimization.applications.ising.vehicle_routing.get_vehiclerouting_solution")(instance, n, K, …) | Tries to obtain a feasible solution (in vector form) of an instance | -### get\_operator +## get\_operator Converts an instance of a vehicle routing problem into a list of Paulis. @@ -41,7 +41,7 @@ Converts vehicle routing instances into a list of Paulis, and provides some rela [WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator") -### get\_vehiclerouting\_cost +## get\_vehiclerouting\_cost Computes the cost of a solution to an instance of a vehicle routing problem. @@ -62,7 +62,7 @@ Converts vehicle routing instances into a list of Paulis, and provides some rela float -### get\_vehiclerouting\_matrices +## get\_vehiclerouting\_matrices **Constructs auxiliary matrices from a vehicle routing instance,** @@ -84,7 +84,7 @@ Converts vehicle routing instances into a list of Paulis, and provides some rela tuple(numpy.ndarray, numpy.ndarray, float) -### get\_vehiclerouting\_solution +## get\_vehiclerouting\_solution **Tries to obtain a feasible solution (in vector form) of an instance** diff --git a/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.vertex_cover.mdx b/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.vertex_cover.mdx index f053b904452..58bedbe30d3 100644 --- a/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.vertex_cover.mdx +++ b/docs/api/qiskit/0.19/qiskit.optimization.applications.ising.vertex_cover.mdx @@ -20,7 +20,7 @@ Convert vertex cover instances into Pauli list Deal with Gset format. See [https | [`get_graph_solution`](#qiskit.optimization.applications.ising.vertex_cover.get_graph_solution "qiskit.optimization.applications.ising.vertex_cover.get_graph_solution")(x) | Get graph solution from binary string. | | [`get_operator`](#qiskit.optimization.applications.ising.vertex_cover.get_operator "qiskit.optimization.applications.ising.vertex_cover.get_operator")(weight\_matrix) | Generate Hamiltonian for the vertex cover :param weight\_matrix: adjacency matrix. | -### check\_full\_edge\_coverage +## check\_full\_edge\_coverage **Parameters** @@ -37,7 +37,7 @@ Convert vertex cover instances into Pauli list Deal with Gset format. See [https float -### get\_graph\_solution +## get\_graph\_solution Get graph solution from binary string. @@ -55,7 +55,7 @@ Convert vertex cover instances into Pauli list Deal with Gset format. See [https numpy.ndarray -### get\_operator +## get\_operator Generate Hamiltonian for the vertex cover :param weight\_matrix: adjacency matrix. :type weight\_matrix: numpy.ndarray diff --git a/docs/api/qiskit/0.19/qiskit.pulse.channels.mdx b/docs/api/qiskit/0.19/qiskit.pulse.channels.mdx index 2c8d9a126c6..59564d88550 100644 --- a/docs/api/qiskit/0.19/qiskit.pulse.channels.mdx +++ b/docs/api/qiskit/0.19/qiskit.pulse.channels.mdx @@ -30,6 +30,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s | [`RegisterSlot`](#qiskit.pulse.channels.RegisterSlot "qiskit.pulse.channels.RegisterSlot")(index) | Classical resister slot channels represent classical registers (low-latency classical memory). | | [`SnapshotChannel`](#qiskit.pulse.channels.SnapshotChannel "qiskit.pulse.channels.SnapshotChannel")() | Snapshot channels are used to specify commands for simulators. | +## AcquireChannel + Acquire channels are used to collect data. @@ -64,6 +66,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## Channel + Base class of channels. Channels provide a Qiskit-side label for typical quantum control hardware signal channels. The final label -> physical channel mapping is the responsibility of the hardware backend. For instance, `DriveChannel(0)` holds instructions which the backend should map to the signal line driving gate operations on the qubit labeled (indexed) 0. @@ -104,6 +108,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## ControlChannel + Control channels provide supplementary control over the qubit to the drive channel. These are often associated with multi-qubit gate operations. They may not map trivially to a particular qubit index. @@ -138,6 +144,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## DriveChannel + Drive channels transmit signals to qubits which enact gate operations. @@ -172,6 +180,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## MeasureChannel + Measure channels transmit measurement stimulus pulses for readout. @@ -206,6 +216,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## MemorySlot + Memory slot channels represent classical memory storage. @@ -240,6 +252,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## PulseChannel + Base class of transmit Channels. Pulses can be played on these channels. @@ -274,6 +288,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## RegisterSlot + Classical resister slot channels represent classical registers (low-latency classical memory). @@ -308,6 +324,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## SnapshotChannel + Snapshot channels are used to specify commands for simulators. diff --git a/docs/api/qiskit/0.19/qiskit.pulse.pulse_lib.discrete.mdx b/docs/api/qiskit/0.19/qiskit.pulse.pulse_lib.discrete.mdx index f660c0caba5..9410a55c56c 100644 --- a/docs/api/qiskit/0.19/qiskit.pulse.pulse_lib.discrete.mdx +++ b/docs/api/qiskit/0.19/qiskit.pulse.pulse_lib.discrete.mdx @@ -30,7 +30,7 @@ Note the sampling strategy use for all discrete pulses is midpoint. | [`triangle`](#qiskit.pulse.pulse_lib.discrete.triangle "qiskit.pulse.pulse_lib.discrete.triangle")(duration, amp\[, freq, period, …]) | Generates triangle wave [`SamplePulse`](qiskit.pulse.SamplePulse "qiskit.pulse.SamplePulse"). | | [`zero`](#qiskit.pulse.pulse_lib.discrete.zero "qiskit.pulse.pulse_lib.discrete.zero")(duration\[, name]) | Generates zero-sampled [`SamplePulse`](qiskit.pulse.SamplePulse "qiskit.pulse.SamplePulse"). | -### constant +## constant Generates constant-sampled [`SamplePulse`](qiskit.pulse.SamplePulse "qiskit.pulse.SamplePulse"). @@ -52,7 +52,7 @@ $$ [`SamplePulse`](qiskit.pulse.pulse_lib.SamplePulse "qiskit.pulse.pulse_lib.sample_pulse.SamplePulse") -### cos +## cos Generates cosine wave [`SamplePulse`](qiskit.pulse.SamplePulse "qiskit.pulse.SamplePulse"). @@ -76,7 +76,7 @@ $$ [`SamplePulse`](qiskit.pulse.pulse_lib.SamplePulse "qiskit.pulse.pulse_lib.sample_pulse.SamplePulse") -### drag +## drag Generates Y-only correction DRAG [`SamplePulse`](qiskit.pulse.SamplePulse "qiskit.pulse.SamplePulse") for standard nonlinear oscillator (SNO) \[1]. @@ -109,7 +109,7 @@ $$ [`SamplePulse`](qiskit.pulse.pulse_lib.SamplePulse "qiskit.pulse.pulse_lib.sample_pulse.SamplePulse") -### gaussian +## gaussian Generates unnormalized gaussian [`SamplePulse`](qiskit.pulse.SamplePulse "qiskit.pulse.SamplePulse"). @@ -145,7 +145,7 @@ $$ [`SamplePulse`](qiskit.pulse.pulse_lib.SamplePulse "qiskit.pulse.pulse_lib.sample_pulse.SamplePulse") -### gaussian\_deriv +## gaussian\_deriv Generates unnormalized gaussian derivative [`SamplePulse`](qiskit.pulse.SamplePulse "qiskit.pulse.SamplePulse"). @@ -170,7 +170,7 @@ $$ [`SamplePulse`](qiskit.pulse.pulse_lib.SamplePulse "qiskit.pulse.pulse_lib.sample_pulse.SamplePulse") -### gaussian\_square +## gaussian\_square Generates gaussian square [`SamplePulse`](qiskit.pulse.SamplePulse "qiskit.pulse.SamplePulse"). @@ -208,7 +208,7 @@ $$ [`SamplePulse`](qiskit.pulse.pulse_lib.SamplePulse "qiskit.pulse.pulse_lib.sample_pulse.SamplePulse") -### sawtooth +## sawtooth Generates sawtooth wave [`SamplePulse`](qiskit.pulse.SamplePulse "qiskit.pulse.SamplePulse"). @@ -253,7 +253,7 @@ $$ [`SamplePulse`](qiskit.pulse.pulse_lib.SamplePulse "qiskit.pulse.pulse_lib.sample_pulse.SamplePulse") -### sech +## sech Generates unnormalized sech [`SamplePulse`](qiskit.pulse.SamplePulse "qiskit.pulse.SamplePulse"). @@ -287,7 +287,7 @@ $$ [`SamplePulse`](qiskit.pulse.pulse_lib.SamplePulse "qiskit.pulse.pulse_lib.sample_pulse.SamplePulse") -### sech\_deriv +## sech\_deriv Generates unnormalized sech derivative [`SamplePulse`](qiskit.pulse.SamplePulse "qiskit.pulse.SamplePulse"). @@ -312,7 +312,7 @@ $$ [`SamplePulse`](qiskit.pulse.pulse_lib.SamplePulse "qiskit.pulse.pulse_lib.sample_pulse.SamplePulse") -### sin +## sin Generates sine wave [`SamplePulse`](qiskit.pulse.SamplePulse "qiskit.pulse.SamplePulse"). @@ -336,7 +336,7 @@ $$ [`SamplePulse`](qiskit.pulse.pulse_lib.SamplePulse "qiskit.pulse.pulse_lib.sample_pulse.SamplePulse") -### square +## square Generates square wave [`SamplePulse`](qiskit.pulse.SamplePulse "qiskit.pulse.SamplePulse"). @@ -363,7 +363,7 @@ $$ [`SamplePulse`](qiskit.pulse.pulse_lib.SamplePulse "qiskit.pulse.pulse_lib.sample_pulse.SamplePulse") -### triangle +## triangle Generates triangle wave [`SamplePulse`](qiskit.pulse.SamplePulse "qiskit.pulse.SamplePulse"). @@ -408,7 +408,7 @@ $$ [`SamplePulse`](qiskit.pulse.pulse_lib.SamplePulse "qiskit.pulse.pulse_lib.sample_pulse.SamplePulse") -### zero +## zero Generates zero-sampled [`SamplePulse`](qiskit.pulse.SamplePulse "qiskit.pulse.SamplePulse"). diff --git a/docs/api/qiskit/0.19/qiskit.scheduler.methods.basic.mdx b/docs/api/qiskit/0.19/qiskit.scheduler.methods.basic.mdx index 8b4904fad62..d5a6146d9d9 100644 --- a/docs/api/qiskit/0.19/qiskit.scheduler.methods.basic.mdx +++ b/docs/api/qiskit/0.19/qiskit.scheduler.methods.basic.mdx @@ -24,6 +24,8 @@ The most straightforward scheduling methods: scheduling **as early** or **as lat | --------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- | | [`CircuitPulseDef`](#qiskit.scheduler.methods.basic.CircuitPulseDef "qiskit.scheduler.methods.basic.CircuitPulseDef")(schedule, qubits) | Create new instance of CircuitPulseDef(schedule, qubits) | +## CircuitPulseDef + Create new instance of CircuitPulseDef(schedule, qubits) @@ -54,7 +56,7 @@ The most straightforward scheduling methods: scheduling **as early** or **as lat -### as\_late\_as\_possible +## as\_late\_as\_possible Return the pulse Schedule which implements the input circuit using an “as late as possible” (alap) scheduling policy. @@ -77,7 +79,7 @@ The most straightforward scheduling methods: scheduling **as early** or **as lat A schedule corresponding to the input `circuit` with pulses occurring as late as possible. -### as\_soon\_as\_possible +## as\_soon\_as\_possible Return the pulse Schedule which implements the input circuit using an “as soon as possible” (asap) scheduling policy. @@ -98,7 +100,7 @@ The most straightforward scheduling methods: scheduling **as early** or **as lat A schedule corresponding to the input `circuit` with pulses occurring as early as possible. -### translate\_gates\_to\_pulse\_defs +## translate\_gates\_to\_pulse\_defs Return a list of Schedules and the qubits they operate on, for each element encountered in th input circuit. diff --git a/docs/api/qiskit/0.19/qiskit.scheduler.utils.mdx b/docs/api/qiskit/0.19/qiskit.scheduler.utils.mdx index d1f84c0e703..7e85023bc0d 100644 --- a/docs/api/qiskit/0.19/qiskit.scheduler.utils.mdx +++ b/docs/api/qiskit/0.19/qiskit.scheduler.utils.mdx @@ -18,7 +18,7 @@ Scheduling utility functions. | [`measure`](#qiskit.scheduler.utils.measure "qiskit.scheduler.utils.measure")(qubits\[, backend, inst\_map, …]) | Return a schedule which measures the requested qubits according to the given instruction mapping and measure map, or by using the defaults provided by the backend. | | [`measure_all`](#qiskit.scheduler.utils.measure_all "qiskit.scheduler.utils.measure_all")(backend) | Return a Schedule which measures all qubits of the given backend. | -### format\_meas\_map +## format\_meas\_map Return a mapping from qubit label to measurement group given the nested list meas\_map returned by a backend configuration. (Qubits can not always be measured independently.) Sorts the measurement group for consistency. @@ -36,7 +36,7 @@ Scheduling utility functions. Measure map in map format -### measure +## measure Return a schedule which measures the requested qubits according to the given instruction mapping and measure map, or by using the defaults provided by the backend. @@ -65,7 +65,7 @@ Scheduling utility functions. [**PulseError**](qiskit.pulse.PulseError "qiskit.pulse.PulseError") – If both `inst_map` or `meas_map`, and `backend` is None. -### measure\_all +## measure\_all Return a Schedule which measures all qubits of the given backend. diff --git a/docs/api/qiskit/0.19/qiskit.visualization.pulse.interpolation.mdx b/docs/api/qiskit/0.19/qiskit.visualization.pulse.interpolation.mdx index c909d37d13d..3d9d8174448 100644 --- a/docs/api/qiskit/0.19/qiskit.visualization.pulse.interpolation.mdx +++ b/docs/api/qiskit/0.19/qiskit.visualization.pulse.interpolation.mdx @@ -17,7 +17,7 @@ interpolation module for pulse visualization. | [`interp1d`](#qiskit.visualization.pulse.interpolation.interp1d "qiskit.visualization.pulse.interpolation.interp1d")(time, samples, nop\[, kind]) | Scipy interpolation wrapper. | | [`step_wise`](#qiskit.visualization.pulse.interpolation.step_wise "qiskit.visualization.pulse.interpolation.step_wise")(time, samples, nop) | Keep uniform variation between sample values. | -### cubic\_spline +## cubic\_spline Apply cubic interpolation between sampling points. @@ -33,7 +33,7 @@ interpolation module for pulse visualization. Interpolated time vector and real and imaginary part of waveform. -### interp1d +## interp1d Scipy interpolation wrapper. @@ -54,7 +54,7 @@ interpolation module for pulse visualization. Interpolated time vector and real and imaginary part of waveform. -### linear +## linear Apply linear interpolation between sampling points. @@ -70,7 +70,7 @@ interpolation module for pulse visualization. Interpolated time vector and real and imaginary part of waveform. -### step\_wise +## step\_wise Keep uniform variation between sample values. No interpolation is applied. :type time: `ndarray` :param time: Time vector with length of `samples` + 1. :type samples: `ndarray` :param samples: Complex pulse envelope. :type nop: `int` :param nop: This argument is not used. diff --git a/docs/api/qiskit/0.19/qiskit.visualization.pulse.qcstyle.mdx b/docs/api/qiskit/0.19/qiskit.visualization.pulse.qcstyle.mdx index f8430314b39..73d7cc5d3d0 100644 --- a/docs/api/qiskit/0.19/qiskit.visualization.pulse.qcstyle.mdx +++ b/docs/api/qiskit/0.19/qiskit.visualization.pulse.qcstyle.mdx @@ -17,6 +17,8 @@ Style sheets for pulse visualization. | [`PulseStyle`](#qiskit.visualization.pulse.qcstyle.PulseStyle "qiskit.visualization.pulse.qcstyle.PulseStyle")(\[figsize, title\_font\_size, …]) | Style sheet for Qiskit-Pulse sample pulse drawer. | | [`SchedStyle`](#qiskit.visualization.pulse.qcstyle.SchedStyle "qiskit.visualization.pulse.qcstyle.SchedStyle")(\[figsize, fig\_unit\_h\_table, …]) | Style sheet for Qiskit-Pulse schedule drawer. | +## PulseStyle + Style sheet for Qiskit-Pulse sample pulse drawer. @@ -32,6 +34,8 @@ Style sheets for pulse visualization. * **dpi** (`Optional`\[`int`]) – Resolution in the unit of dot per inch to save image. +## SchedStyle + Style sheet for Qiskit-Pulse schedule drawer. From f648bd59e2092c0fb181a01427dfe3bf7c9b4a5e Mon Sep 17 00:00:00 2001 From: Arnau Casau Date: Fri, 3 May 2024 10:41:45 +0200 Subject: [PATCH 05/31] Regenerate qiskit 0.24.1 --- docs/api/qiskit/0.24/execute.mdx | 2 +- docs/api/qiskit/0.24/logging.mdx | 2 ++ ...t.finance.applications.ising.portfolio.mdx | 10 +++---- ...ations.ising.portfolio_diversification.mdx | 6 ++--- ...optimization.applications.ising.clique.mdx | 6 ++--- ...optimization.applications.ising.common.mdx | 12 ++++----- ...ptimization.applications.ising.docplex.mdx | 2 +- ...ization.applications.ising.exact_cover.mdx | 6 ++--- ...ion.applications.ising.graph_partition.mdx | 6 ++--- ...timization.applications.ising.knapsack.mdx | 6 ++--- ...ptimization.applications.ising.max_cut.mdx | 6 ++--- ...imization.applications.ising.partition.mdx | 4 +-- ...ization.applications.ising.set_packing.mdx | 6 ++--- ...mization.applications.ising.stable_set.mdx | 6 ++--- ...it.optimization.applications.ising.tsp.mdx | 16 +++++++----- ...ion.applications.ising.vehicle_routing.mdx | 8 +++--- ...zation.applications.ising.vertex_cover.mdx | 6 ++--- .../api/qiskit/0.24/qiskit.pulse.channels.mdx | 18 +++++++++++++ .../0.24/qiskit.pulse.library.discrete.mdx | 26 +++++++++---------- .../0.24/qiskit.scheduler.methods.basic.mdx | 4 +-- .../qiskit.scheduler.schedule_circuit.mdx | 2 +- ...skit.visualization.pulse.interpolation.mdx | 8 +++--- .../qiskit.visualization.pulse.qcstyle.mdx | 8 ++++++ 23 files changed, 103 insertions(+), 73 deletions(-) diff --git a/docs/api/qiskit/0.24/execute.mdx b/docs/api/qiskit/0.24/execute.mdx index 853bfb2e4f7..e46573299b1 100644 --- a/docs/api/qiskit/0.24/execute.mdx +++ b/docs/api/qiskit/0.24/execute.mdx @@ -18,7 +18,7 @@ python_api_name: qiskit.execute `qiskit.execute` -### execute +## execute Execute a list of [`qiskit.circuit.QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") or [`qiskit.pulse.Schedule`](qiskit.pulse.Schedule "qiskit.pulse.Schedule") on a backend. diff --git a/docs/api/qiskit/0.24/logging.mdx b/docs/api/qiskit/0.24/logging.mdx index 60f8a7944ac..5fde953ae16 100644 --- a/docs/api/qiskit/0.24/logging.mdx +++ b/docs/api/qiskit/0.24/logging.mdx @@ -24,6 +24,8 @@ python_api_name: qiskit.ignis.logging | [`IgnisLogging`](qiskit.ignis.logging.IgnisLogging "qiskit.ignis.logging.IgnisLogging")(\[log\_config\_path]) | Singleton class to configure file logging via IgnisLogger | | [`IgnisLogReader`](qiskit.ignis.logging.IgnisLogReader "qiskit.ignis.logging.IgnisLogReader")() | Class to read from Ignis log files | +### + A logger class for Ignis diff --git a/docs/api/qiskit/0.24/qiskit.finance.applications.ising.portfolio.mdx b/docs/api/qiskit/0.24/qiskit.finance.applications.ising.portfolio.mdx index 52fb6e5ef36..555792aa7e9 100644 --- a/docs/api/qiskit/0.24/qiskit.finance.applications.ising.portfolio.mdx +++ b/docs/api/qiskit/0.24/qiskit.finance.applications.ising.portfolio.mdx @@ -24,31 +24,31 @@ Convert portfolio optimization instances into Pauli list | [`portfolio_variance`](#qiskit.finance.applications.ising.portfolio.portfolio_variance "qiskit.finance.applications.ising.portfolio.portfolio_variance")(x, sigma) | returns portfolio variance | | [`random_model`](#qiskit.finance.applications.ising.portfolio.random_model "qiskit.finance.applications.ising.portfolio.random_model")(n\[, seed]) | Generate random model (mu, sigma) for portfolio optimization problem. | -### get\_operator +## get\_operator get qubit op -### portfolio\_expected\_value +## portfolio\_expected\_value returns portfolio expected value -### portfolio\_value +## portfolio\_value returns portfolio value -### portfolio\_variance +## portfolio\_variance returns portfolio variance -### random\_model +## random\_model Generate random model (mu, sigma) for portfolio optimization problem. diff --git a/docs/api/qiskit/0.24/qiskit.finance.applications.ising.portfolio_diversification.mdx b/docs/api/qiskit/0.24/qiskit.finance.applications.ising.portfolio_diversification.mdx index 08cb0a57a24..da9fd8ac887 100644 --- a/docs/api/qiskit/0.24/qiskit.finance.applications.ising.portfolio_diversification.mdx +++ b/docs/api/qiskit/0.24/qiskit.finance.applications.ising.portfolio_diversification.mdx @@ -22,7 +22,7 @@ portfolio diversification | [`get_portfoliodiversification_solution`](#qiskit.finance.applications.ising.portfolio_diversification.get_portfoliodiversification_solution "qiskit.finance.applications.ising.portfolio_diversification.get_portfoliodiversification_solution")(rho, …) | Tries to obtain a feasible solution (in vector form) of an instance of portfolio diversification from the results dictionary. | | [`get_portfoliodiversification_value`](#qiskit.finance.applications.ising.portfolio_diversification.get_portfoliodiversification_value "qiskit.finance.applications.ising.portfolio_diversification.get_portfoliodiversification_value")(rho, n, …) | Evaluates an objective function of an instance of portfolio diversification and its solution (in vector form). | -### get\_operator +## get\_operator Converts an instance of portfolio optimization into a list of Paulis. @@ -42,7 +42,7 @@ portfolio diversification operator for the Hamiltonian -### get\_portfoliodiversification\_solution +## get\_portfoliodiversification\_solution Tries to obtain a feasible solution (in vector form) of an instance of portfolio diversification from the results dictionary. @@ -63,7 +63,7 @@ portfolio diversification a vector describing the solution. -### get\_portfoliodiversification\_value +## get\_portfoliodiversification\_value Evaluates an objective function of an instance of portfolio diversification and its solution (in vector form). diff --git a/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.clique.mdx b/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.clique.mdx index 3fd13a3599c..4cd38d0163f 100644 --- a/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.clique.mdx +++ b/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.clique.mdx @@ -24,7 +24,7 @@ Deal with Gset format. See [https://web.stanford.edu/\~yyye/yyye/Gset/](https:// | [`get_operator`](#qiskit.optimization.applications.ising.clique.get_operator "qiskit.optimization.applications.ising.clique.get_operator")(weight\_matrix, K) | Generate Hamiltonian for the clique. | | [`satisfy_or_not`](#qiskit.optimization.applications.ising.clique.satisfy_or_not "qiskit.optimization.applications.ising.clique.satisfy_or_not")(x, w, K) | Compute the value of a cut. | -### get\_graph\_solution +## get\_graph\_solution Get graph solution from binary string. @@ -42,7 +42,7 @@ Deal with Gset format. See [https://web.stanford.edu/\~yyye/yyye/Gset/](https:// numpy.ndarray -### get\_operator +## get\_operator Generate Hamiltonian for the clique. @@ -83,7 +83,7 @@ Deal with Gset format. See [https://web.stanford.edu/\~yyye/yyye/Gset/](https:// tuple([WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator"), float) -### satisfy\_or\_not +## satisfy\_or\_not Compute the value of a cut. diff --git a/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.common.mdx b/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.common.mdx index 4d7e5736215..88b48eda47a 100644 --- a/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.common.mdx +++ b/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.common.mdx @@ -25,7 +25,7 @@ common module | [`read_numbers_from_file`](#qiskit.optimization.applications.ising.common.read_numbers_from_file "qiskit.optimization.applications.ising.common.read_numbers_from_file")(filename) | Read numbers from a file | | [`sample_most_likely`](#qiskit.optimization.applications.ising.common.sample_most_likely "qiskit.optimization.applications.ising.common.sample_most_likely")(state\_vector) | Compute the most likely binary string from state vector. | -### get\_gset\_result +## get\_gset\_result Get graph solution in Gset format from binary string. @@ -43,7 +43,7 @@ common module Dict\[int, int] -### parse\_gset\_format +## parse\_gset\_format Read graph in Gset format from file. @@ -61,7 +61,7 @@ common module numpy.ndarray -### random\_graph +## random\_graph Generate random Erdos-Renyi graph. @@ -84,7 +84,7 @@ common module numpy.ndarray -### random\_number\_list +## random\_number\_list Generate a set of positive integers within the given range. @@ -105,7 +105,7 @@ common module numpy.ndarray -### read\_numbers\_from\_file +## read\_numbers\_from\_file Read numbers from a file @@ -123,7 +123,7 @@ common module numpy.ndarray -### sample\_most\_likely +## sample\_most\_likely Compute the most likely binary string from state vector. :param state\_vector: state vector or counts. :type state\_vector: numpy.ndarray or dict diff --git a/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.docplex.mdx b/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.docplex.mdx index 2ef57f16b03..6aa05ffce12 100644 --- a/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.docplex.mdx +++ b/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.docplex.mdx @@ -60,7 +60,7 @@ print('tsp objective:', result['energy'] + offset) | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- | | [`get_operator`](#qiskit.optimization.applications.ising.docplex.get_operator "qiskit.optimization.applications.ising.docplex.get_operator")(mdl\[, auto\_penalty, …]) | Generate Ising Hamiltonian from a model of DOcplex. | -### get\_operator +## get\_operator Generate Ising Hamiltonian from a model of DOcplex. diff --git a/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.exact_cover.mdx b/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.exact_cover.mdx index 60071ade9da..0dc99a93c17 100644 --- a/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.exact_cover.mdx +++ b/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.exact_cover.mdx @@ -22,13 +22,13 @@ exact cover | [`get_operator`](#qiskit.optimization.applications.ising.exact_cover.get_operator "qiskit.optimization.applications.ising.exact_cover.get_operator")(list\_of\_subsets) | Construct the Hamiltonian for the exact solver problem. | | [`get_solution`](#qiskit.optimization.applications.ising.exact_cover.get_solution "qiskit.optimization.applications.ising.exact_cover.get_solution")(x) | **param x**binary string as numpy array. | -### check\_solution\_satisfiability +## check\_solution\_satisfiability check solution satisfiability -### get\_operator +## get\_operator Construct the Hamiltonian for the exact solver problem. @@ -56,7 +56,7 @@ exact cover tuple([WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator"), float) -### get\_solution +## get\_solution **Parameters** diff --git a/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.graph_partition.mdx b/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.graph_partition.mdx index 542051aaef3..f6a482a6e09 100644 --- a/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.graph_partition.mdx +++ b/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.graph_partition.mdx @@ -22,7 +22,7 @@ Convert graph partitioning instances into Pauli list Deal with Gset format. See | [`get_operator`](#qiskit.optimization.applications.ising.graph_partition.get_operator "qiskit.optimization.applications.ising.graph_partition.get_operator")(weight\_matrix) | Generate Hamiltonian for the graph partitioning | | [`objective_value`](#qiskit.optimization.applications.ising.graph_partition.objective_value "qiskit.optimization.applications.ising.graph_partition.objective_value")(x, w) | Compute the value of a cut. | -### get\_graph\_solution +## get\_graph\_solution Get graph solution from binary string. @@ -40,7 +40,7 @@ Convert graph partitioning instances into Pauli list Deal with Gset format. See numpy.ndarray -### get\_operator +## get\_operator Generate Hamiltonian for the graph partitioning @@ -68,7 +68,7 @@ Convert graph partitioning instances into Pauli list Deal with Gset format. See [WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator") -### objective\_value +## objective\_value Compute the value of a cut. diff --git a/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.knapsack.mdx b/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.knapsack.mdx index 3fd8e6e9732..2d32302810a 100644 --- a/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.knapsack.mdx +++ b/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.knapsack.mdx @@ -26,7 +26,7 @@ If we have the weights w\[i], the values v\[i] and the maximum weight W\_max. We | [`get_solution`](#qiskit.optimization.applications.ising.knapsack.get_solution "qiskit.optimization.applications.ising.knapsack.get_solution")(x, values) | Get the solution to the knapsack problem from the bitstring that represents to the ground state of the Hamiltonian | | [`knapsack_value_weight`](#qiskit.optimization.applications.ising.knapsack.knapsack_value_weight "qiskit.optimization.applications.ising.knapsack.knapsack_value_weight")(solution, values, weights) | Get the total wight and value of the items taken in the knapsack. | -### get\_operator +## get\_operator Generate Hamiltonian for the knapsack problem. @@ -63,7 +63,7 @@ If we have the weights w\[i], the values v\[i] and the maximum weight W\_max. We * **ValueError** – max\_weight is negative -### get\_solution +## get\_solution Get the solution to the knapsack problem from the bitstring that represents to the ground state of the Hamiltonian @@ -84,7 +84,7 @@ If we have the weights w\[i], the values v\[i] and the maximum weight W\_max. We numpy.ndarray -### knapsack\_value\_weight +## knapsack\_value\_weight Get the total wight and value of the items taken in the knapsack. diff --git a/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.max_cut.mdx b/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.max_cut.mdx index f9a8071f493..04b3473375d 100644 --- a/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.max_cut.mdx +++ b/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.max_cut.mdx @@ -22,7 +22,7 @@ Convert max-cut instances into Pauli list Deal with Gset format. See [https://we | [`get_operator`](#qiskit.optimization.applications.ising.max_cut.get_operator "qiskit.optimization.applications.ising.max_cut.get_operator")(weight\_matrix) | Generate Hamiltonian for the max-cut problem of a graph. | | [`max_cut_value`](#qiskit.optimization.applications.ising.max_cut.max_cut_value "qiskit.optimization.applications.ising.max_cut.max_cut_value")(x, w) | Compute the value of a cut. | -### get\_graph\_solution +## get\_graph\_solution Get graph solution from binary string. @@ -40,7 +40,7 @@ Convert max-cut instances into Pauli list Deal with Gset format. See [https://we numpy.ndarray -### get\_operator +## get\_operator Generate Hamiltonian for the max-cut problem of a graph. @@ -58,7 +58,7 @@ Convert max-cut instances into Pauli list Deal with Gset format. See [https://we [WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator") -### max\_cut\_value +## max\_cut\_value Compute the value of a cut. diff --git a/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.partition.mdx b/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.partition.mdx index 13b307ea3dd..3c8ebae9c12 100644 --- a/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.partition.mdx +++ b/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.partition.mdx @@ -21,7 +21,7 @@ Generate Number Partitioning (Partition) instances, and convert them into a Hami | [`get_operator`](#qiskit.optimization.applications.ising.partition.get_operator "qiskit.optimization.applications.ising.partition.get_operator")(values) | Construct the Hamiltonian for a given Partition instance. | | [`partition_value`](#qiskit.optimization.applications.ising.partition.partition_value "qiskit.optimization.applications.ising.partition.partition_value")(x, number\_list) | Compute the value of a partition. | -### get\_operator +## get\_operator Construct the Hamiltonian for a given Partition instance. @@ -41,7 +41,7 @@ Generate Number Partitioning (Partition) instances, and convert them into a Hami tuple([WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator"), float) -### partition\_value +## partition\_value Compute the value of a partition. diff --git a/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.set_packing.mdx b/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.set_packing.mdx index 74ccc734f49..6762c2e35ba 100644 --- a/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.set_packing.mdx +++ b/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.set_packing.mdx @@ -22,13 +22,13 @@ set packing module | [`get_operator`](#qiskit.optimization.applications.ising.set_packing.get_operator "qiskit.optimization.applications.ising.set_packing.get_operator")(list\_of\_subsets) | Construct the Hamiltonian for the set packing. | | [`get_solution`](#qiskit.optimization.applications.ising.set_packing.get_solution "qiskit.optimization.applications.ising.set_packing.get_solution")(x) | **param x**binary string as numpy array. | -### check\_disjoint +## check\_disjoint check disjoint -### get\_operator +## get\_operator Construct the Hamiltonian for the set packing. @@ -58,7 +58,7 @@ set packing module tuple([WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator"), float) -### get\_solution +## get\_solution **Parameters** diff --git a/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.stable_set.mdx b/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.stable_set.mdx index 18c39702b94..8490966e5e1 100644 --- a/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.stable_set.mdx +++ b/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.stable_set.mdx @@ -22,7 +22,7 @@ Convert stable set instances into Pauli list. We read instances in the Gset form | [`get_operator`](#qiskit.optimization.applications.ising.stable_set.get_operator "qiskit.optimization.applications.ising.stable_set.get_operator")(w) | Generate Hamiltonian for the maximum stable set in a graph. | | [`stable_set_value`](#qiskit.optimization.applications.ising.stable_set.stable_set_value "qiskit.optimization.applications.ising.stable_set.stable_set_value")(x, w) | Compute the value of a stable set, and its feasibility. | -### get\_graph\_solution +## get\_graph\_solution Get graph solution from binary string. @@ -40,7 +40,7 @@ Convert stable set instances into Pauli list. We read instances in the Gset form numpy.ndarray -### get\_operator +## get\_operator Generate Hamiltonian for the maximum stable set in a graph. @@ -58,7 +58,7 @@ Convert stable set instances into Pauli list. We read instances in the Gset form tuple([WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator"), float) -### stable\_set\_value +## stable\_set\_value Compute the value of a stable set, and its feasibility. diff --git a/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.tsp.mdx b/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.tsp.mdx index d222729604a..f6fd3af475a 100644 --- a/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.tsp.mdx +++ b/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.tsp.mdx @@ -32,6 +32,8 @@ Convert symmetric TSP instances into Pauli list Deal with TSPLIB format. It supp | ------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------- | | [`TspData`](#qiskit.optimization.applications.ising.tsp.TspData "qiskit.optimization.applications.ising.tsp.TspData")(name, dim, coord, w) | Create new instance of TspData(name, dim, coord, w) | +## TspData + Create new instance of TspData(name, dim, coord, w) @@ -74,13 +76,13 @@ Convert symmetric TSP instances into Pauli list Deal with TSPLIB format. It supp -### calc\_distance +## calc\_distance calculate distance -### get\_operator +## get\_operator Generate Hamiltonian for TSP of a graph. @@ -99,7 +101,7 @@ Convert symmetric TSP instances into Pauli list Deal with TSPLIB format. It supp tuple([WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator"), float) -### get\_tsp\_solution +## get\_tsp\_solution Get graph solution from binary string. @@ -123,7 +125,7 @@ Convert symmetric TSP instances into Pauli list Deal with TSPLIB format. It supp Instance data of TSP -### parse\_tsplib\_format +## parse\_tsplib\_format Read graph in TSPLIB format from file. @@ -141,7 +143,7 @@ Instance data of TSP [TspData](#qiskit.optimization.applications.ising.tsp.TspData "qiskit.optimization.applications.ising.tsp.TspData") -### random\_tsp +## random\_tsp Generate a random instance for TSP. @@ -164,7 +166,7 @@ Instance data of TSP [TspData](#qiskit.optimization.applications.ising.tsp.TspData "qiskit.optimization.applications.ising.tsp.TspData") -### tsp\_feasible +## tsp\_feasible Check whether a solution is feasible or not. @@ -182,7 +184,7 @@ Instance data of TSP bool -### tsp\_value +## tsp\_value Compute the TSP value of a solution. diff --git a/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.vehicle_routing.mdx b/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.vehicle_routing.mdx index d94aa119b38..653b8de7ba7 100644 --- a/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.vehicle_routing.mdx +++ b/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.vehicle_routing.mdx @@ -23,7 +23,7 @@ Converts vehicle routing instances into a list of Paulis, and provides some rela | [`get_vehiclerouting_matrices`](#qiskit.optimization.applications.ising.vehicle_routing.get_vehiclerouting_matrices "qiskit.optimization.applications.ising.vehicle_routing.get_vehiclerouting_matrices")(instance, n, K) | Constructs auxiliary matrices from a vehicle routing instance, | | [`get_vehiclerouting_solution`](#qiskit.optimization.applications.ising.vehicle_routing.get_vehiclerouting_solution "qiskit.optimization.applications.ising.vehicle_routing.get_vehiclerouting_solution")(instance, n, K, …) | Tries to obtain a feasible solution (in vector form) of an instance | -### get\_operator +## get\_operator Converts an instance of a vehicle routing problem into a list of Paulis. @@ -43,7 +43,7 @@ Converts vehicle routing instances into a list of Paulis, and provides some rela operator for the Hamiltonian. -### get\_vehiclerouting\_cost +## get\_vehiclerouting\_cost Computes the cost of a solution to an instance of a vehicle routing problem. @@ -64,7 +64,7 @@ Converts vehicle routing instances into a list of Paulis, and provides some rela objective function value. -### get\_vehiclerouting\_matrices +## get\_vehiclerouting\_matrices **Constructs auxiliary matrices from a vehicle routing instance,** @@ -86,7 +86,7 @@ Converts vehicle routing instances into a list of Paulis, and provides some rela a matrix defining the interactions between variables. a matrix defining the contribution from the individual variables. the constant offset. -### get\_vehiclerouting\_solution +## get\_vehiclerouting\_solution **Tries to obtain a feasible solution (in vector form) of an instance** diff --git a/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.vertex_cover.mdx b/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.vertex_cover.mdx index 3c1f01526e3..49c59400edf 100644 --- a/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.vertex_cover.mdx +++ b/docs/api/qiskit/0.24/qiskit.optimization.applications.ising.vertex_cover.mdx @@ -22,7 +22,7 @@ Convert vertex cover instances into Pauli list Deal with Gset format. See [https | [`get_graph_solution`](#qiskit.optimization.applications.ising.vertex_cover.get_graph_solution "qiskit.optimization.applications.ising.vertex_cover.get_graph_solution")(x) | Get graph solution from binary string. | | [`get_operator`](#qiskit.optimization.applications.ising.vertex_cover.get_operator "qiskit.optimization.applications.ising.vertex_cover.get_operator")(weight\_matrix) | Generate Hamiltonian for the vertex cover :param weight\_matrix: adjacency matrix. | -### check\_full\_edge\_coverage +## check\_full\_edge\_coverage **Parameters** @@ -39,7 +39,7 @@ Convert vertex cover instances into Pauli list Deal with Gset format. See [https float -### get\_graph\_solution +## get\_graph\_solution Get graph solution from binary string. @@ -57,7 +57,7 @@ Convert vertex cover instances into Pauli list Deal with Gset format. See [https numpy.ndarray -### get\_operator +## get\_operator Generate Hamiltonian for the vertex cover :param weight\_matrix: adjacency matrix. :type weight\_matrix: numpy.ndarray diff --git a/docs/api/qiskit/0.24/qiskit.pulse.channels.mdx b/docs/api/qiskit/0.24/qiskit.pulse.channels.mdx index c5f412d4600..c1436e88da3 100644 --- a/docs/api/qiskit/0.24/qiskit.pulse.channels.mdx +++ b/docs/api/qiskit/0.24/qiskit.pulse.channels.mdx @@ -34,6 +34,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s | [`RegisterSlot`](#qiskit.pulse.channels.RegisterSlot "qiskit.pulse.channels.RegisterSlot")(index) | Classical resister slot channels represent classical registers (low-latency classical memory). | | [`SnapshotChannel`](#qiskit.pulse.channels.SnapshotChannel "qiskit.pulse.channels.SnapshotChannel")() | Snapshot channels are used to specify instructions for simulators. | +## AcquireChannel + Acquire channels are used to collect data. @@ -68,6 +70,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## Channel + Base class of channels. Channels provide a Qiskit-side label for typical quantum control hardware signal channels. The final label -> physical channel mapping is the responsibility of the hardware backend. For instance, `DriveChannel(0)` holds instructions which the backend should map to the signal line driving gate operations on the qubit labeled (indexed) 0. @@ -108,6 +112,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## ControlChannel + Control channels provide supplementary control over the qubit to the drive channel. These are often associated with multi-qubit gate operations. They may not map trivially to a particular qubit index. @@ -142,6 +148,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## DriveChannel + Drive channels transmit signals to qubits which enact gate operations. @@ -176,6 +184,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## MeasureChannel + Measure channels transmit measurement stimulus pulses for readout. @@ -210,6 +220,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## MemorySlot + Memory slot channels represent classical memory storage. @@ -244,6 +256,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## PulseChannel + Base class of transmit Channels. Pulses can be played on these channels. @@ -278,6 +292,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## RegisterSlot + Classical resister slot channels represent classical registers (low-latency classical memory). @@ -312,6 +328,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## SnapshotChannel + Snapshot channels are used to specify instructions for simulators. diff --git a/docs/api/qiskit/0.24/qiskit.pulse.library.discrete.mdx b/docs/api/qiskit/0.24/qiskit.pulse.library.discrete.mdx index aa9909414bf..8415ae2b760 100644 --- a/docs/api/qiskit/0.24/qiskit.pulse.library.discrete.mdx +++ b/docs/api/qiskit/0.24/qiskit.pulse.library.discrete.mdx @@ -34,7 +34,7 @@ Note the sampling strategy use for all discrete pulses is `midpoint`. | [`triangle`](#qiskit.pulse.library.discrete.triangle "qiskit.pulse.library.discrete.triangle")(duration, amp\[, freq, phase, name]) | Generates triangle wave [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). | | [`zero`](#qiskit.pulse.library.discrete.zero "qiskit.pulse.library.discrete.zero")(duration\[, name]) | Generates zero-sampled [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). | -### constant +## constant Generates constant-sampled [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -56,7 +56,7 @@ $$ `Waveform` -### cos +## cos Generates cosine wave [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -80,7 +80,7 @@ $$ `Waveform` -### drag +## drag Generates Y-only correction DRAG [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform") for standard nonlinear oscillator (SNO) \[1]. @@ -113,7 +113,7 @@ $$ `Waveform` -### gaussian +## gaussian Generates unnormalized gaussian [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -149,7 +149,7 @@ $$ `Waveform` -### gaussian\_deriv +## gaussian\_deriv Generates unnormalized gaussian derivative [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -174,7 +174,7 @@ $$ `Waveform` -### gaussian\_square +## gaussian\_square Generates gaussian square [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -212,7 +212,7 @@ $$ `Waveform` -### sawtooth +## sawtooth Generates sawtooth wave [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -258,7 +258,7 @@ $$ `Waveform` -### sech +## sech Generates unnormalized sech [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -292,7 +292,7 @@ $$ `Waveform` -### sech\_deriv +## sech\_deriv Generates unnormalized sech derivative [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -317,7 +317,7 @@ $$ `Waveform` -### sin +## sin Generates sine wave [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -341,7 +341,7 @@ $$ `Waveform` -### square +## square Generates square wave [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -367,7 +367,7 @@ $$ `Waveform` -### triangle +## triangle Generates triangle wave [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -413,7 +413,7 @@ $$ `Waveform` -### zero +## zero Generates zero-sampled [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). diff --git a/docs/api/qiskit/0.24/qiskit.scheduler.methods.basic.mdx b/docs/api/qiskit/0.24/qiskit.scheduler.methods.basic.mdx index 86ab3a4938c..774817de5ff 100644 --- a/docs/api/qiskit/0.24/qiskit.scheduler.methods.basic.mdx +++ b/docs/api/qiskit/0.24/qiskit.scheduler.methods.basic.mdx @@ -21,7 +21,7 @@ The most straightforward scheduling methods: scheduling **as early** or **as lat | [`as_late_as_possible`](#qiskit.scheduler.methods.basic.as_late_as_possible "qiskit.scheduler.methods.basic.as_late_as_possible")(circuit, schedule\_config) | Return the pulse Schedule which implements the input circuit using an “as late as possible” (alap) scheduling policy. | | [`as_soon_as_possible`](#qiskit.scheduler.methods.basic.as_soon_as_possible "qiskit.scheduler.methods.basic.as_soon_as_possible")(circuit, schedule\_config) | Return the pulse Schedule which implements the input circuit using an “as soon as possible” (asap) scheduling policy. | -### as\_late\_as\_possible +## as\_late\_as\_possible Return the pulse Schedule which implements the input circuit using an “as late as possible” (alap) scheduling policy. @@ -44,7 +44,7 @@ The most straightforward scheduling methods: scheduling **as early** or **as lat A schedule corresponding to the input `circuit` with pulses occurring as late as possible. -### as\_soon\_as\_possible +## as\_soon\_as\_possible Return the pulse Schedule which implements the input circuit using an “as soon as possible” (asap) scheduling policy. diff --git a/docs/api/qiskit/0.24/qiskit.scheduler.schedule_circuit.mdx b/docs/api/qiskit/0.24/qiskit.scheduler.schedule_circuit.mdx index c34f2b39a93..43210172332 100644 --- a/docs/api/qiskit/0.24/qiskit.scheduler.schedule_circuit.mdx +++ b/docs/api/qiskit/0.24/qiskit.scheduler.schedule_circuit.mdx @@ -20,7 +20,7 @@ QuantumCircuit to Pulse scheduler. | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | | [`schedule_circuit`](#qiskit.scheduler.schedule_circuit.schedule_circuit "qiskit.scheduler.schedule_circuit.schedule_circuit")(circuit, schedule\_config\[, …]) | Basic scheduling pass from a circuit to a pulse Schedule, using the backend. | -### schedule\_circuit +## schedule\_circuit Basic scheduling pass from a circuit to a pulse Schedule, using the backend. If no method is specified, then a basic, as late as possible scheduling pass is performed, i.e. pulses are scheduled to occur as late as possible. diff --git a/docs/api/qiskit/0.24/qiskit.visualization.pulse.interpolation.mdx b/docs/api/qiskit/0.24/qiskit.visualization.pulse.interpolation.mdx index 69dbaabfc76..a92498bc321 100644 --- a/docs/api/qiskit/0.24/qiskit.visualization.pulse.interpolation.mdx +++ b/docs/api/qiskit/0.24/qiskit.visualization.pulse.interpolation.mdx @@ -21,7 +21,7 @@ interpolation module for pulse visualization. | [`interp1d`](#qiskit.visualization.pulse.interpolation.interp1d "qiskit.visualization.pulse.interpolation.interp1d")(time, samples, nop\[, kind]) | Scipy interpolation wrapper. | | [`step_wise`](#qiskit.visualization.pulse.interpolation.step_wise "qiskit.visualization.pulse.interpolation.step_wise")(time, samples, nop) | Keep uniform variation between sample values. | -### cubic\_spline +## cubic\_spline Apply cubic interpolation between sampling points. @@ -37,7 +37,7 @@ interpolation module for pulse visualization. Interpolated time vector and real and imaginary part of waveform. -### interp1d +## interp1d Scipy interpolation wrapper. @@ -58,7 +58,7 @@ interpolation module for pulse visualization. Interpolated time vector and real and imaginary part of waveform. -### linear +## linear Apply linear interpolation between sampling points. @@ -74,7 +74,7 @@ interpolation module for pulse visualization. Interpolated time vector and real and imaginary part of waveform. -### step\_wise +## step\_wise Keep uniform variation between sample values. No interpolation is applied. :type time: `ndarray` :param time: Time vector with length of `samples` + 1. :type samples: `ndarray` :param samples: Complex pulse envelope. :type nop: `int` :param nop: This argument is not used. diff --git a/docs/api/qiskit/0.24/qiskit.visualization.pulse.qcstyle.mdx b/docs/api/qiskit/0.24/qiskit.visualization.pulse.qcstyle.mdx index 5c57081b8f2..ca84319cc6f 100644 --- a/docs/api/qiskit/0.24/qiskit.visualization.pulse.qcstyle.mdx +++ b/docs/api/qiskit/0.24/qiskit.visualization.pulse.qcstyle.mdx @@ -23,6 +23,8 @@ Style sheets for pulse visualization. | [`SchedStyle`](#qiskit.visualization.pulse.qcstyle.SchedStyle "qiskit.visualization.pulse.qcstyle.SchedStyle")(\[figsize, fig\_unit\_h\_table, …]) | Style sheet for Qiskit-Pulse schedule drawer. | | [`SchedTableColors`](#qiskit.visualization.pulse.qcstyle.SchedTableColors "qiskit.visualization.pulse.qcstyle.SchedTableColors")(time, channel, event) | Create new instance of SchedTableColors(time, channel, event) | +## ComplexColors + Create new instance of ComplexColors(real, imaginary) @@ -53,6 +55,8 @@ Style sheets for pulse visualization. +## PulseStyle + Style sheet for Qiskit-Pulse sample pulse drawer. @@ -70,6 +74,8 @@ Style sheets for pulse visualization. * **dpi** (`Optional`\[`int`]) – Resolution in the unit of dot per inch to save image. If `None`, will revert to the DPI setting of the drawing backend. If the output is `matplotlib`, the default parameter is `rcParams['figure.dpi']`. +## SchedStyle + Style sheet for Qiskit-Pulse schedule drawer. @@ -119,6 +125,8 @@ Style sheets for pulse visualization. With this setup, events are shown in double-column style with each line height of 0.4 inch and the table cannot exceed 5 inch. Thus 12 lines are maximum and up to 24 events can be shown. If you want to show more events, increase figure height or reduce size of line height and table font size. +## SchedTableColors + Create new instance of SchedTableColors(time, channel, event) From 53a3a49a37aceb99b4db90b05f8973fb41fa387d Mon Sep 17 00:00:00 2001 From: Arnau Casau Date: Fri, 3 May 2024 10:46:25 +0200 Subject: [PATCH 06/31] Regenerate qiskit 0.25.4 --- docs/api/qiskit/0.25/execute.mdx | 2 +- docs/api/qiskit/0.25/logging.mdx | 2 ++ ...t.finance.applications.ising.portfolio.mdx | 10 +++---- ...ations.ising.portfolio_diversification.mdx | 6 ++--- ...optimization.applications.ising.clique.mdx | 6 ++--- ...optimization.applications.ising.common.mdx | 12 ++++----- ...ptimization.applications.ising.docplex.mdx | 2 +- ...ization.applications.ising.exact_cover.mdx | 6 ++--- ...ion.applications.ising.graph_partition.mdx | 6 ++--- ...timization.applications.ising.knapsack.mdx | 6 ++--- ...ptimization.applications.ising.max_cut.mdx | 6 ++--- ...imization.applications.ising.partition.mdx | 4 +-- ...ization.applications.ising.set_packing.mdx | 6 ++--- ...mization.applications.ising.stable_set.mdx | 6 ++--- ...it.optimization.applications.ising.tsp.mdx | 16 +++++++----- ...ion.applications.ising.vehicle_routing.mdx | 8 +++--- ...zation.applications.ising.vertex_cover.mdx | 6 ++--- .../api/qiskit/0.25/qiskit.pulse.channels.mdx | 18 +++++++++++++ .../0.25/qiskit.pulse.library.discrete.mdx | 26 +++++++++---------- .../0.25/qiskit.scheduler.methods.basic.mdx | 4 +-- .../qiskit.scheduler.schedule_circuit.mdx | 2 +- 21 files changed, 91 insertions(+), 69 deletions(-) diff --git a/docs/api/qiskit/0.25/execute.mdx b/docs/api/qiskit/0.25/execute.mdx index a04860100a1..94099ab8a40 100644 --- a/docs/api/qiskit/0.25/execute.mdx +++ b/docs/api/qiskit/0.25/execute.mdx @@ -16,7 +16,7 @@ python_api_name: qiskit.execute_function `qiskit.execute_function` -### execute +## execute Execute a list of [`qiskit.circuit.QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") or [`qiskit.pulse.Schedule`](qiskit.pulse.Schedule "qiskit.pulse.Schedule") on a backend. diff --git a/docs/api/qiskit/0.25/logging.mdx b/docs/api/qiskit/0.25/logging.mdx index 423000acd53..0bbcd2aac82 100644 --- a/docs/api/qiskit/0.25/logging.mdx +++ b/docs/api/qiskit/0.25/logging.mdx @@ -22,6 +22,8 @@ python_api_name: qiskit.ignis.logging | [`IgnisLogging`](qiskit.ignis.logging.IgnisLogging "qiskit.ignis.logging.IgnisLogging")(\[log\_config\_path]) | Singleton class to configure file logging via IgnisLogger | | [`IgnisLogReader`](qiskit.ignis.logging.IgnisLogReader "qiskit.ignis.logging.IgnisLogReader")() | Class to read from Ignis log files | +### + A logger class for Ignis diff --git a/docs/api/qiskit/0.25/qiskit.finance.applications.ising.portfolio.mdx b/docs/api/qiskit/0.25/qiskit.finance.applications.ising.portfolio.mdx index f18caa2feb6..e0294179645 100644 --- a/docs/api/qiskit/0.25/qiskit.finance.applications.ising.portfolio.mdx +++ b/docs/api/qiskit/0.25/qiskit.finance.applications.ising.portfolio.mdx @@ -22,31 +22,31 @@ Convert portfolio optimization instances into Pauli list | [`portfolio_variance`](#qiskit.finance.applications.ising.portfolio.portfolio_variance "qiskit.finance.applications.ising.portfolio.portfolio_variance")(x, sigma) | returns portfolio variance | | [`random_model`](#qiskit.finance.applications.ising.portfolio.random_model "qiskit.finance.applications.ising.portfolio.random_model")(n\[, seed]) | Generate random model (mu, sigma) for portfolio optimization problem. | -### get\_operator +## get\_operator get qubit op -### portfolio\_expected\_value +## portfolio\_expected\_value returns portfolio expected value -### portfolio\_value +## portfolio\_value returns portfolio value -### portfolio\_variance +## portfolio\_variance returns portfolio variance -### random\_model +## random\_model Generate random model (mu, sigma) for portfolio optimization problem. diff --git a/docs/api/qiskit/0.25/qiskit.finance.applications.ising.portfolio_diversification.mdx b/docs/api/qiskit/0.25/qiskit.finance.applications.ising.portfolio_diversification.mdx index fe7f32b7f77..cf668990693 100644 --- a/docs/api/qiskit/0.25/qiskit.finance.applications.ising.portfolio_diversification.mdx +++ b/docs/api/qiskit/0.25/qiskit.finance.applications.ising.portfolio_diversification.mdx @@ -20,7 +20,7 @@ portfolio diversification | [`get_portfoliodiversification_solution`](#qiskit.finance.applications.ising.portfolio_diversification.get_portfoliodiversification_solution "qiskit.finance.applications.ising.portfolio_diversification.get_portfoliodiversification_solution")(rho, …) | Tries to obtain a feasible solution (in vector form) of an instance of portfolio diversification from the results dictionary. | | [`get_portfoliodiversification_value`](#qiskit.finance.applications.ising.portfolio_diversification.get_portfoliodiversification_value "qiskit.finance.applications.ising.portfolio_diversification.get_portfoliodiversification_value")(rho, n, …) | Evaluates an objective function of an instance of portfolio diversification and its solution (in vector form). | -### get\_operator +## get\_operator Converts an instance of portfolio optimization into a list of Paulis. @@ -40,7 +40,7 @@ portfolio diversification operator for the Hamiltonian -### get\_portfoliodiversification\_solution +## get\_portfoliodiversification\_solution Tries to obtain a feasible solution (in vector form) of an instance of portfolio diversification from the results dictionary. @@ -61,7 +61,7 @@ portfolio diversification a vector describing the solution. -### get\_portfoliodiversification\_value +## get\_portfoliodiversification\_value Evaluates an objective function of an instance of portfolio diversification and its solution (in vector form). diff --git a/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.clique.mdx b/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.clique.mdx index f669f8f060a..35741b1b529 100644 --- a/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.clique.mdx +++ b/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.clique.mdx @@ -22,7 +22,7 @@ Deal with Gset format. See [https://web.stanford.edu/\~yyye/yyye/Gset/](https:// | [`get_operator`](#qiskit.optimization.applications.ising.clique.get_operator "qiskit.optimization.applications.ising.clique.get_operator")(weight\_matrix, K) | Generate Hamiltonian for the clique. | | [`satisfy_or_not`](#qiskit.optimization.applications.ising.clique.satisfy_or_not "qiskit.optimization.applications.ising.clique.satisfy_or_not")(x, w, K) | Compute the value of a cut. | -### get\_graph\_solution +## get\_graph\_solution Get graph solution from binary string. @@ -40,7 +40,7 @@ Deal with Gset format. See [https://web.stanford.edu/\~yyye/yyye/Gset/](https:// numpy.ndarray -### get\_operator +## get\_operator Generate Hamiltonian for the clique. @@ -81,7 +81,7 @@ Deal with Gset format. See [https://web.stanford.edu/\~yyye/yyye/Gset/](https:// tuple([WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator"), float) -### satisfy\_or\_not +## satisfy\_or\_not Compute the value of a cut. diff --git a/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.common.mdx b/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.common.mdx index a5f743f7334..fa50b3495e6 100644 --- a/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.common.mdx +++ b/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.common.mdx @@ -23,7 +23,7 @@ common module | [`read_numbers_from_file`](#qiskit.optimization.applications.ising.common.read_numbers_from_file "qiskit.optimization.applications.ising.common.read_numbers_from_file")(filename) | Read numbers from a file | | [`sample_most_likely`](#qiskit.optimization.applications.ising.common.sample_most_likely "qiskit.optimization.applications.ising.common.sample_most_likely")(state\_vector) | Compute the most likely binary string from state vector. | -### get\_gset\_result +## get\_gset\_result Get graph solution in Gset format from binary string. @@ -41,7 +41,7 @@ common module Dict\[int, int] -### parse\_gset\_format +## parse\_gset\_format Read graph in Gset format from file. @@ -59,7 +59,7 @@ common module numpy.ndarray -### random\_graph +## random\_graph Generate random Erdos-Renyi graph. @@ -82,7 +82,7 @@ common module numpy.ndarray -### random\_number\_list +## random\_number\_list Generate a set of positive integers within the given range. @@ -103,7 +103,7 @@ common module numpy.ndarray -### read\_numbers\_from\_file +## read\_numbers\_from\_file Read numbers from a file @@ -121,7 +121,7 @@ common module numpy.ndarray -### sample\_most\_likely +## sample\_most\_likely Compute the most likely binary string from state vector. :param state\_vector: state vector or counts. :type state\_vector: numpy.ndarray or dict diff --git a/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.docplex.mdx b/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.docplex.mdx index b2b31b7a696..66792a0de9d 100644 --- a/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.docplex.mdx +++ b/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.docplex.mdx @@ -58,7 +58,7 @@ print('tsp objective:', result['energy'] + offset) | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- | | [`get_operator`](#qiskit.optimization.applications.ising.docplex.get_operator "qiskit.optimization.applications.ising.docplex.get_operator")(mdl\[, auto\_penalty, …]) | Generate Ising Hamiltonian from a model of DOcplex. | -### get\_operator +## get\_operator Generate Ising Hamiltonian from a model of DOcplex. diff --git a/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.exact_cover.mdx b/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.exact_cover.mdx index 28d740b7457..059a91fed55 100644 --- a/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.exact_cover.mdx +++ b/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.exact_cover.mdx @@ -20,13 +20,13 @@ exact cover | [`get_operator`](#qiskit.optimization.applications.ising.exact_cover.get_operator "qiskit.optimization.applications.ising.exact_cover.get_operator")(list\_of\_subsets) | Construct the Hamiltonian for the exact solver problem. | | [`get_solution`](#qiskit.optimization.applications.ising.exact_cover.get_solution "qiskit.optimization.applications.ising.exact_cover.get_solution")(x) | **param x**binary string as numpy array. | -### check\_solution\_satisfiability +## check\_solution\_satisfiability check solution satisfiability -### get\_operator +## get\_operator Construct the Hamiltonian for the exact solver problem. @@ -54,7 +54,7 @@ exact cover tuple([WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator"), float) -### get\_solution +## get\_solution **Parameters** diff --git a/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.graph_partition.mdx b/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.graph_partition.mdx index 121bdcbef22..a7db2c3b37b 100644 --- a/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.graph_partition.mdx +++ b/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.graph_partition.mdx @@ -20,7 +20,7 @@ Convert graph partitioning instances into Pauli list Deal with Gset format. See | [`get_operator`](#qiskit.optimization.applications.ising.graph_partition.get_operator "qiskit.optimization.applications.ising.graph_partition.get_operator")(weight\_matrix) | Generate Hamiltonian for the graph partitioning | | [`objective_value`](#qiskit.optimization.applications.ising.graph_partition.objective_value "qiskit.optimization.applications.ising.graph_partition.objective_value")(x, w) | Compute the value of a cut. | -### get\_graph\_solution +## get\_graph\_solution Get graph solution from binary string. @@ -38,7 +38,7 @@ Convert graph partitioning instances into Pauli list Deal with Gset format. See numpy.ndarray -### get\_operator +## get\_operator Generate Hamiltonian for the graph partitioning @@ -66,7 +66,7 @@ Convert graph partitioning instances into Pauli list Deal with Gset format. See [WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator") -### objective\_value +## objective\_value Compute the value of a cut. diff --git a/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.knapsack.mdx b/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.knapsack.mdx index 489c461335a..54844e44843 100644 --- a/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.knapsack.mdx +++ b/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.knapsack.mdx @@ -24,7 +24,7 @@ If we have the weights w\[i], the values v\[i] and the maximum weight W\_max. We | [`get_solution`](#qiskit.optimization.applications.ising.knapsack.get_solution "qiskit.optimization.applications.ising.knapsack.get_solution")(x, values) | Get the solution to the knapsack problem from the bitstring that represents to the ground state of the Hamiltonian | | [`knapsack_value_weight`](#qiskit.optimization.applications.ising.knapsack.knapsack_value_weight "qiskit.optimization.applications.ising.knapsack.knapsack_value_weight")(solution, values, weights) | Get the total wight and value of the items taken in the knapsack. | -### get\_operator +## get\_operator Generate Hamiltonian for the knapsack problem. @@ -61,7 +61,7 @@ If we have the weights w\[i], the values v\[i] and the maximum weight W\_max. We * **ValueError** – max\_weight is negative -### get\_solution +## get\_solution Get the solution to the knapsack problem from the bitstring that represents to the ground state of the Hamiltonian @@ -82,7 +82,7 @@ If we have the weights w\[i], the values v\[i] and the maximum weight W\_max. We numpy.ndarray -### knapsack\_value\_weight +## knapsack\_value\_weight Get the total wight and value of the items taken in the knapsack. diff --git a/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.max_cut.mdx b/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.max_cut.mdx index 7dea52d672e..381092f365d 100644 --- a/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.max_cut.mdx +++ b/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.max_cut.mdx @@ -20,7 +20,7 @@ Convert max-cut instances into Pauli list Deal with Gset format. See [https://we | [`get_operator`](#qiskit.optimization.applications.ising.max_cut.get_operator "qiskit.optimization.applications.ising.max_cut.get_operator")(weight\_matrix) | Generate Hamiltonian for the max-cut problem of a graph. | | [`max_cut_value`](#qiskit.optimization.applications.ising.max_cut.max_cut_value "qiskit.optimization.applications.ising.max_cut.max_cut_value")(x, w) | Compute the value of a cut. | -### get\_graph\_solution +## get\_graph\_solution Get graph solution from binary string. @@ -38,7 +38,7 @@ Convert max-cut instances into Pauli list Deal with Gset format. See [https://we numpy.ndarray -### get\_operator +## get\_operator Generate Hamiltonian for the max-cut problem of a graph. @@ -56,7 +56,7 @@ Convert max-cut instances into Pauli list Deal with Gset format. See [https://we [WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator") -### max\_cut\_value +## max\_cut\_value Compute the value of a cut. diff --git a/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.partition.mdx b/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.partition.mdx index fb7326ebaa1..b4b6fc09c3c 100644 --- a/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.partition.mdx +++ b/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.partition.mdx @@ -19,7 +19,7 @@ Generate Number Partitioning (Partition) instances, and convert them into a Hami | [`get_operator`](#qiskit.optimization.applications.ising.partition.get_operator "qiskit.optimization.applications.ising.partition.get_operator")(values) | Construct the Hamiltonian for a given Partition instance. | | [`partition_value`](#qiskit.optimization.applications.ising.partition.partition_value "qiskit.optimization.applications.ising.partition.partition_value")(x, number\_list) | Compute the value of a partition. | -### get\_operator +## get\_operator Construct the Hamiltonian for a given Partition instance. @@ -39,7 +39,7 @@ Generate Number Partitioning (Partition) instances, and convert them into a Hami tuple([WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator"), float) -### partition\_value +## partition\_value Compute the value of a partition. diff --git a/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.set_packing.mdx b/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.set_packing.mdx index b3b839d6ccc..d888d9624c3 100644 --- a/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.set_packing.mdx +++ b/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.set_packing.mdx @@ -20,13 +20,13 @@ set packing module | [`get_operator`](#qiskit.optimization.applications.ising.set_packing.get_operator "qiskit.optimization.applications.ising.set_packing.get_operator")(list\_of\_subsets) | Construct the Hamiltonian for the set packing. | | [`get_solution`](#qiskit.optimization.applications.ising.set_packing.get_solution "qiskit.optimization.applications.ising.set_packing.get_solution")(x) | **param x**binary string as numpy array. | -### check\_disjoint +## check\_disjoint check disjoint -### get\_operator +## get\_operator Construct the Hamiltonian for the set packing. @@ -56,7 +56,7 @@ set packing module tuple([WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator"), float) -### get\_solution +## get\_solution **Parameters** diff --git a/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.stable_set.mdx b/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.stable_set.mdx index 3763b10ecd0..24b8facaba5 100644 --- a/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.stable_set.mdx +++ b/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.stable_set.mdx @@ -20,7 +20,7 @@ Convert stable set instances into Pauli list. We read instances in the Gset form | [`get_operator`](#qiskit.optimization.applications.ising.stable_set.get_operator "qiskit.optimization.applications.ising.stable_set.get_operator")(w) | Generate Hamiltonian for the maximum stable set in a graph. | | [`stable_set_value`](#qiskit.optimization.applications.ising.stable_set.stable_set_value "qiskit.optimization.applications.ising.stable_set.stable_set_value")(x, w) | Compute the value of a stable set, and its feasibility. | -### get\_graph\_solution +## get\_graph\_solution Get graph solution from binary string. @@ -38,7 +38,7 @@ Convert stable set instances into Pauli list. We read instances in the Gset form numpy.ndarray -### get\_operator +## get\_operator Generate Hamiltonian for the maximum stable set in a graph. @@ -56,7 +56,7 @@ Convert stable set instances into Pauli list. We read instances in the Gset form tuple([WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator"), float) -### stable\_set\_value +## stable\_set\_value Compute the value of a stable set, and its feasibility. diff --git a/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.tsp.mdx b/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.tsp.mdx index 8d100a34cdc..5ee95ef151e 100644 --- a/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.tsp.mdx +++ b/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.tsp.mdx @@ -30,6 +30,8 @@ Convert symmetric TSP instances into Pauli list Deal with TSPLIB format. It supp | ------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------- | | [`TspData`](#qiskit.optimization.applications.ising.tsp.TspData "qiskit.optimization.applications.ising.tsp.TspData")(name, dim, coord, w) | Create new instance of TspData(name, dim, coord, w) | +## TspData + Create new instance of TspData(name, dim, coord, w) @@ -72,13 +74,13 @@ Convert symmetric TSP instances into Pauli list Deal with TSPLIB format. It supp -### calc\_distance +## calc\_distance calculate distance -### get\_operator +## get\_operator Generate Hamiltonian for TSP of a graph. @@ -97,7 +99,7 @@ Convert symmetric TSP instances into Pauli list Deal with TSPLIB format. It supp tuple([WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator"), float) -### get\_tsp\_solution +## get\_tsp\_solution Get graph solution from binary string. @@ -121,7 +123,7 @@ Convert symmetric TSP instances into Pauli list Deal with TSPLIB format. It supp Instance data of TSP -### parse\_tsplib\_format +## parse\_tsplib\_format Read graph in TSPLIB format from file. @@ -139,7 +141,7 @@ Instance data of TSP [TspData](#qiskit.optimization.applications.ising.tsp.TspData "qiskit.optimization.applications.ising.tsp.TspData") -### random\_tsp +## random\_tsp Generate a random instance for TSP. @@ -162,7 +164,7 @@ Instance data of TSP [TspData](#qiskit.optimization.applications.ising.tsp.TspData "qiskit.optimization.applications.ising.tsp.TspData") -### tsp\_feasible +## tsp\_feasible Check whether a solution is feasible or not. @@ -180,7 +182,7 @@ Instance data of TSP bool -### tsp\_value +## tsp\_value Compute the TSP value of a solution. diff --git a/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.vehicle_routing.mdx b/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.vehicle_routing.mdx index ea00e22f71f..af4baa5923a 100644 --- a/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.vehicle_routing.mdx +++ b/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.vehicle_routing.mdx @@ -21,7 +21,7 @@ Converts vehicle routing instances into a list of Paulis, and provides some rela | [`get_vehiclerouting_matrices`](#qiskit.optimization.applications.ising.vehicle_routing.get_vehiclerouting_matrices "qiskit.optimization.applications.ising.vehicle_routing.get_vehiclerouting_matrices")(instance, n, K) | Constructs auxiliary matrices from a vehicle routing instance, | | [`get_vehiclerouting_solution`](#qiskit.optimization.applications.ising.vehicle_routing.get_vehiclerouting_solution "qiskit.optimization.applications.ising.vehicle_routing.get_vehiclerouting_solution")(instance, n, K, …) | Tries to obtain a feasible solution (in vector form) of an instance | -### get\_operator +## get\_operator Converts an instance of a vehicle routing problem into a list of Paulis. @@ -41,7 +41,7 @@ Converts vehicle routing instances into a list of Paulis, and provides some rela operator for the Hamiltonian. -### get\_vehiclerouting\_cost +## get\_vehiclerouting\_cost Computes the cost of a solution to an instance of a vehicle routing problem. @@ -62,7 +62,7 @@ Converts vehicle routing instances into a list of Paulis, and provides some rela objective function value. -### get\_vehiclerouting\_matrices +## get\_vehiclerouting\_matrices **Constructs auxiliary matrices from a vehicle routing instance,** @@ -84,7 +84,7 @@ Converts vehicle routing instances into a list of Paulis, and provides some rela a matrix defining the interactions between variables. a matrix defining the contribution from the individual variables. the constant offset. -### get\_vehiclerouting\_solution +## get\_vehiclerouting\_solution **Tries to obtain a feasible solution (in vector form) of an instance** diff --git a/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.vertex_cover.mdx b/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.vertex_cover.mdx index ef51b82f49a..31058ef1e35 100644 --- a/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.vertex_cover.mdx +++ b/docs/api/qiskit/0.25/qiskit.optimization.applications.ising.vertex_cover.mdx @@ -20,7 +20,7 @@ Convert vertex cover instances into Pauli list Deal with Gset format. See [https | [`get_graph_solution`](#qiskit.optimization.applications.ising.vertex_cover.get_graph_solution "qiskit.optimization.applications.ising.vertex_cover.get_graph_solution")(x) | Get graph solution from binary string. | | [`get_operator`](#qiskit.optimization.applications.ising.vertex_cover.get_operator "qiskit.optimization.applications.ising.vertex_cover.get_operator")(weight\_matrix) | Generate Hamiltonian for the vertex cover :param weight\_matrix: adjacency matrix. | -### check\_full\_edge\_coverage +## check\_full\_edge\_coverage **Parameters** @@ -37,7 +37,7 @@ Convert vertex cover instances into Pauli list Deal with Gset format. See [https float -### get\_graph\_solution +## get\_graph\_solution Get graph solution from binary string. @@ -55,7 +55,7 @@ Convert vertex cover instances into Pauli list Deal with Gset format. See [https numpy.ndarray -### get\_operator +## get\_operator Generate Hamiltonian for the vertex cover :param weight\_matrix: adjacency matrix. :type weight\_matrix: numpy.ndarray diff --git a/docs/api/qiskit/0.25/qiskit.pulse.channels.mdx b/docs/api/qiskit/0.25/qiskit.pulse.channels.mdx index a515878eb41..a52b7628391 100644 --- a/docs/api/qiskit/0.25/qiskit.pulse.channels.mdx +++ b/docs/api/qiskit/0.25/qiskit.pulse.channels.mdx @@ -32,6 +32,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s | [`RegisterSlot`](#qiskit.pulse.channels.RegisterSlot "qiskit.pulse.channels.RegisterSlot")(index) | Classical resister slot channels represent classical registers (low-latency classical memory). | | [`SnapshotChannel`](#qiskit.pulse.channels.SnapshotChannel "qiskit.pulse.channels.SnapshotChannel")(\*args, \*\*kwargs) | Snapshot channels are used to specify instructions for simulators. | +## AcquireChannel + Acquire channels are used to collect data. @@ -105,6 +107,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## Channel + Base class of channels. Channels provide a Qiskit-side label for typical quantum control hardware signal channels. The final label -> physical channel mapping is the responsibility of the hardware backend. For instance, `DriveChannel(0)` holds instructions which the backend should map to the signal line driving gate operations on the qubit labeled (indexed) 0. @@ -188,6 +192,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## ControlChannel + Control channels provide supplementary control over the qubit to the drive channel. These are often associated with multi-qubit gate operations. They may not map trivially to a particular qubit index. @@ -261,6 +267,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## DriveChannel + Drive channels transmit signals to qubits which enact gate operations. @@ -334,6 +342,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## MeasureChannel + Measure channels transmit measurement stimulus pulses for readout. @@ -407,6 +417,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## MemorySlot + Memory slot channels represent classical memory storage. @@ -480,6 +492,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## PulseChannel + Base class of transmit Channels. Pulses can be played on these channels. @@ -553,6 +567,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## RegisterSlot + Classical resister slot channels represent classical registers (low-latency classical memory). @@ -626,6 +642,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## SnapshotChannel + Snapshot channels are used to specify instructions for simulators. diff --git a/docs/api/qiskit/0.25/qiskit.pulse.library.discrete.mdx b/docs/api/qiskit/0.25/qiskit.pulse.library.discrete.mdx index 6076643629c..4fb5035b96d 100644 --- a/docs/api/qiskit/0.25/qiskit.pulse.library.discrete.mdx +++ b/docs/api/qiskit/0.25/qiskit.pulse.library.discrete.mdx @@ -32,7 +32,7 @@ Note the sampling strategy use for all discrete pulses is `midpoint`. | [`triangle`](#qiskit.pulse.library.discrete.triangle "qiskit.pulse.library.discrete.triangle")(duration, amp\[, freq, phase, name]) | Generates triangle wave [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). | | [`zero`](#qiskit.pulse.library.discrete.zero "qiskit.pulse.library.discrete.zero")(duration\[, name]) | Generates zero-sampled [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). | -### constant +## constant Generates constant-sampled [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -54,7 +54,7 @@ $$ `Waveform` -### cos +## cos Generates cosine wave [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -78,7 +78,7 @@ $$ `Waveform` -### drag +## drag Generates Y-only correction DRAG [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform") for standard nonlinear oscillator (SNO) \[1]. @@ -111,7 +111,7 @@ $$ `Waveform` -### gaussian +## gaussian Generates unnormalized gaussian [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -147,7 +147,7 @@ $$ `Waveform` -### gaussian\_deriv +## gaussian\_deriv Generates unnormalized gaussian derivative [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -172,7 +172,7 @@ $$ `Waveform` -### gaussian\_square +## gaussian\_square Generates gaussian square [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -210,7 +210,7 @@ $$ `Waveform` -### sawtooth +## sawtooth Generates sawtooth wave [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -256,7 +256,7 @@ $$ `Waveform` -### sech +## sech Generates unnormalized sech [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -290,7 +290,7 @@ $$ `Waveform` -### sech\_deriv +## sech\_deriv Generates unnormalized sech derivative [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -315,7 +315,7 @@ $$ `Waveform` -### sin +## sin Generates sine wave [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -339,7 +339,7 @@ $$ `Waveform` -### square +## square Generates square wave [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -365,7 +365,7 @@ $$ `Waveform` -### triangle +## triangle Generates triangle wave [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -411,7 +411,7 @@ $$ `Waveform` -### zero +## zero Generates zero-sampled [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). diff --git a/docs/api/qiskit/0.25/qiskit.scheduler.methods.basic.mdx b/docs/api/qiskit/0.25/qiskit.scheduler.methods.basic.mdx index 734a913c529..3c43aa4c5cc 100644 --- a/docs/api/qiskit/0.25/qiskit.scheduler.methods.basic.mdx +++ b/docs/api/qiskit/0.25/qiskit.scheduler.methods.basic.mdx @@ -19,7 +19,7 @@ The most straightforward scheduling methods: scheduling **as early** or **as lat | [`as_late_as_possible`](#qiskit.scheduler.methods.basic.as_late_as_possible "qiskit.scheduler.methods.basic.as_late_as_possible")(circuit, schedule\_config) | Return the pulse Schedule which implements the input circuit using an “as late as possible” (alap) scheduling policy. | | [`as_soon_as_possible`](#qiskit.scheduler.methods.basic.as_soon_as_possible "qiskit.scheduler.methods.basic.as_soon_as_possible")(circuit, schedule\_config) | Return the pulse Schedule which implements the input circuit using an “as soon as possible” (asap) scheduling policy. | -### as\_late\_as\_possible +## as\_late\_as\_possible Return the pulse Schedule which implements the input circuit using an “as late as possible” (alap) scheduling policy. @@ -42,7 +42,7 @@ The most straightforward scheduling methods: scheduling **as early** or **as lat A schedule corresponding to the input `circuit` with pulses occurring as late as possible. -### as\_soon\_as\_possible +## as\_soon\_as\_possible Return the pulse Schedule which implements the input circuit using an “as soon as possible” (asap) scheduling policy. diff --git a/docs/api/qiskit/0.25/qiskit.scheduler.schedule_circuit.mdx b/docs/api/qiskit/0.25/qiskit.scheduler.schedule_circuit.mdx index c500ee4afa1..ff805676f53 100644 --- a/docs/api/qiskit/0.25/qiskit.scheduler.schedule_circuit.mdx +++ b/docs/api/qiskit/0.25/qiskit.scheduler.schedule_circuit.mdx @@ -18,7 +18,7 @@ QuantumCircuit to Pulse scheduler. | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | | [`schedule_circuit`](#qiskit.scheduler.schedule_circuit.schedule_circuit "qiskit.scheduler.schedule_circuit.schedule_circuit")(circuit, schedule\_config\[, …]) | Basic scheduling pass from a circuit to a pulse Schedule, using the backend. | -### schedule\_circuit +## schedule\_circuit Basic scheduling pass from a circuit to a pulse Schedule, using the backend. If no method is specified, then a basic, as late as possible scheduling pass is performed, i.e. pulses are scheduled to occur as late as possible. From ee2a7921b14337e9d6272df27d5e251e604d36ef Mon Sep 17 00:00:00 2001 From: Arnau Casau Date: Fri, 3 May 2024 10:51:04 +0200 Subject: [PATCH 07/31] Regenerate qiskit 0.26.2 --- docs/api/qiskit/0.26/execute.mdx | 2 +- docs/api/qiskit/0.26/logging.mdx | 2 ++ ...t.finance.applications.ising.portfolio.mdx | 10 +++---- ...ations.ising.portfolio_diversification.mdx | 6 ++--- ...optimization.applications.ising.clique.mdx | 6 ++--- ...optimization.applications.ising.common.mdx | 12 ++++----- ...ptimization.applications.ising.docplex.mdx | 2 +- ...ization.applications.ising.exact_cover.mdx | 6 ++--- ...ion.applications.ising.graph_partition.mdx | 6 ++--- ...timization.applications.ising.knapsack.mdx | 6 ++--- ...ptimization.applications.ising.max_cut.mdx | 6 ++--- ...imization.applications.ising.partition.mdx | 4 +-- ...ization.applications.ising.set_packing.mdx | 6 ++--- ...mization.applications.ising.stable_set.mdx | 6 ++--- ...it.optimization.applications.ising.tsp.mdx | 16 +++++++----- ...ion.applications.ising.vehicle_routing.mdx | 8 +++--- ...zation.applications.ising.vertex_cover.mdx | 6 ++--- .../api/qiskit/0.26/qiskit.pulse.channels.mdx | 18 +++++++++++++ .../0.26/qiskit.pulse.library.discrete.mdx | 26 +++++++++---------- .../0.26/qiskit.scheduler.methods.basic.mdx | 4 +-- .../qiskit.scheduler.schedule_circuit.mdx | 2 +- 21 files changed, 91 insertions(+), 69 deletions(-) diff --git a/docs/api/qiskit/0.26/execute.mdx b/docs/api/qiskit/0.26/execute.mdx index a04860100a1..94099ab8a40 100644 --- a/docs/api/qiskit/0.26/execute.mdx +++ b/docs/api/qiskit/0.26/execute.mdx @@ -16,7 +16,7 @@ python_api_name: qiskit.execute_function `qiskit.execute_function` -### execute +## execute Execute a list of [`qiskit.circuit.QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") or [`qiskit.pulse.Schedule`](qiskit.pulse.Schedule "qiskit.pulse.Schedule") on a backend. diff --git a/docs/api/qiskit/0.26/logging.mdx b/docs/api/qiskit/0.26/logging.mdx index 423000acd53..0bbcd2aac82 100644 --- a/docs/api/qiskit/0.26/logging.mdx +++ b/docs/api/qiskit/0.26/logging.mdx @@ -22,6 +22,8 @@ python_api_name: qiskit.ignis.logging | [`IgnisLogging`](qiskit.ignis.logging.IgnisLogging "qiskit.ignis.logging.IgnisLogging")(\[log\_config\_path]) | Singleton class to configure file logging via IgnisLogger | | [`IgnisLogReader`](qiskit.ignis.logging.IgnisLogReader "qiskit.ignis.logging.IgnisLogReader")() | Class to read from Ignis log files | +### + A logger class for Ignis diff --git a/docs/api/qiskit/0.26/qiskit.finance.applications.ising.portfolio.mdx b/docs/api/qiskit/0.26/qiskit.finance.applications.ising.portfolio.mdx index f18caa2feb6..e0294179645 100644 --- a/docs/api/qiskit/0.26/qiskit.finance.applications.ising.portfolio.mdx +++ b/docs/api/qiskit/0.26/qiskit.finance.applications.ising.portfolio.mdx @@ -22,31 +22,31 @@ Convert portfolio optimization instances into Pauli list | [`portfolio_variance`](#qiskit.finance.applications.ising.portfolio.portfolio_variance "qiskit.finance.applications.ising.portfolio.portfolio_variance")(x, sigma) | returns portfolio variance | | [`random_model`](#qiskit.finance.applications.ising.portfolio.random_model "qiskit.finance.applications.ising.portfolio.random_model")(n\[, seed]) | Generate random model (mu, sigma) for portfolio optimization problem. | -### get\_operator +## get\_operator get qubit op -### portfolio\_expected\_value +## portfolio\_expected\_value returns portfolio expected value -### portfolio\_value +## portfolio\_value returns portfolio value -### portfolio\_variance +## portfolio\_variance returns portfolio variance -### random\_model +## random\_model Generate random model (mu, sigma) for portfolio optimization problem. diff --git a/docs/api/qiskit/0.26/qiskit.finance.applications.ising.portfolio_diversification.mdx b/docs/api/qiskit/0.26/qiskit.finance.applications.ising.portfolio_diversification.mdx index fe7f32b7f77..cf668990693 100644 --- a/docs/api/qiskit/0.26/qiskit.finance.applications.ising.portfolio_diversification.mdx +++ b/docs/api/qiskit/0.26/qiskit.finance.applications.ising.portfolio_diversification.mdx @@ -20,7 +20,7 @@ portfolio diversification | [`get_portfoliodiversification_solution`](#qiskit.finance.applications.ising.portfolio_diversification.get_portfoliodiversification_solution "qiskit.finance.applications.ising.portfolio_diversification.get_portfoliodiversification_solution")(rho, …) | Tries to obtain a feasible solution (in vector form) of an instance of portfolio diversification from the results dictionary. | | [`get_portfoliodiversification_value`](#qiskit.finance.applications.ising.portfolio_diversification.get_portfoliodiversification_value "qiskit.finance.applications.ising.portfolio_diversification.get_portfoliodiversification_value")(rho, n, …) | Evaluates an objective function of an instance of portfolio diversification and its solution (in vector form). | -### get\_operator +## get\_operator Converts an instance of portfolio optimization into a list of Paulis. @@ -40,7 +40,7 @@ portfolio diversification operator for the Hamiltonian -### get\_portfoliodiversification\_solution +## get\_portfoliodiversification\_solution Tries to obtain a feasible solution (in vector form) of an instance of portfolio diversification from the results dictionary. @@ -61,7 +61,7 @@ portfolio diversification a vector describing the solution. -### get\_portfoliodiversification\_value +## get\_portfoliodiversification\_value Evaluates an objective function of an instance of portfolio diversification and its solution (in vector form). diff --git a/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.clique.mdx b/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.clique.mdx index f669f8f060a..35741b1b529 100644 --- a/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.clique.mdx +++ b/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.clique.mdx @@ -22,7 +22,7 @@ Deal with Gset format. See [https://web.stanford.edu/\~yyye/yyye/Gset/](https:// | [`get_operator`](#qiskit.optimization.applications.ising.clique.get_operator "qiskit.optimization.applications.ising.clique.get_operator")(weight\_matrix, K) | Generate Hamiltonian for the clique. | | [`satisfy_or_not`](#qiskit.optimization.applications.ising.clique.satisfy_or_not "qiskit.optimization.applications.ising.clique.satisfy_or_not")(x, w, K) | Compute the value of a cut. | -### get\_graph\_solution +## get\_graph\_solution Get graph solution from binary string. @@ -40,7 +40,7 @@ Deal with Gset format. See [https://web.stanford.edu/\~yyye/yyye/Gset/](https:// numpy.ndarray -### get\_operator +## get\_operator Generate Hamiltonian for the clique. @@ -81,7 +81,7 @@ Deal with Gset format. See [https://web.stanford.edu/\~yyye/yyye/Gset/](https:// tuple([WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator"), float) -### satisfy\_or\_not +## satisfy\_or\_not Compute the value of a cut. diff --git a/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.common.mdx b/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.common.mdx index a5f743f7334..fa50b3495e6 100644 --- a/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.common.mdx +++ b/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.common.mdx @@ -23,7 +23,7 @@ common module | [`read_numbers_from_file`](#qiskit.optimization.applications.ising.common.read_numbers_from_file "qiskit.optimization.applications.ising.common.read_numbers_from_file")(filename) | Read numbers from a file | | [`sample_most_likely`](#qiskit.optimization.applications.ising.common.sample_most_likely "qiskit.optimization.applications.ising.common.sample_most_likely")(state\_vector) | Compute the most likely binary string from state vector. | -### get\_gset\_result +## get\_gset\_result Get graph solution in Gset format from binary string. @@ -41,7 +41,7 @@ common module Dict\[int, int] -### parse\_gset\_format +## parse\_gset\_format Read graph in Gset format from file. @@ -59,7 +59,7 @@ common module numpy.ndarray -### random\_graph +## random\_graph Generate random Erdos-Renyi graph. @@ -82,7 +82,7 @@ common module numpy.ndarray -### random\_number\_list +## random\_number\_list Generate a set of positive integers within the given range. @@ -103,7 +103,7 @@ common module numpy.ndarray -### read\_numbers\_from\_file +## read\_numbers\_from\_file Read numbers from a file @@ -121,7 +121,7 @@ common module numpy.ndarray -### sample\_most\_likely +## sample\_most\_likely Compute the most likely binary string from state vector. :param state\_vector: state vector or counts. :type state\_vector: numpy.ndarray or dict diff --git a/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.docplex.mdx b/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.docplex.mdx index b2b31b7a696..66792a0de9d 100644 --- a/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.docplex.mdx +++ b/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.docplex.mdx @@ -58,7 +58,7 @@ print('tsp objective:', result['energy'] + offset) | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- | | [`get_operator`](#qiskit.optimization.applications.ising.docplex.get_operator "qiskit.optimization.applications.ising.docplex.get_operator")(mdl\[, auto\_penalty, …]) | Generate Ising Hamiltonian from a model of DOcplex. | -### get\_operator +## get\_operator Generate Ising Hamiltonian from a model of DOcplex. diff --git a/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.exact_cover.mdx b/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.exact_cover.mdx index 28d740b7457..059a91fed55 100644 --- a/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.exact_cover.mdx +++ b/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.exact_cover.mdx @@ -20,13 +20,13 @@ exact cover | [`get_operator`](#qiskit.optimization.applications.ising.exact_cover.get_operator "qiskit.optimization.applications.ising.exact_cover.get_operator")(list\_of\_subsets) | Construct the Hamiltonian for the exact solver problem. | | [`get_solution`](#qiskit.optimization.applications.ising.exact_cover.get_solution "qiskit.optimization.applications.ising.exact_cover.get_solution")(x) | **param x**binary string as numpy array. | -### check\_solution\_satisfiability +## check\_solution\_satisfiability check solution satisfiability -### get\_operator +## get\_operator Construct the Hamiltonian for the exact solver problem. @@ -54,7 +54,7 @@ exact cover tuple([WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator"), float) -### get\_solution +## get\_solution **Parameters** diff --git a/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.graph_partition.mdx b/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.graph_partition.mdx index 121bdcbef22..a7db2c3b37b 100644 --- a/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.graph_partition.mdx +++ b/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.graph_partition.mdx @@ -20,7 +20,7 @@ Convert graph partitioning instances into Pauli list Deal with Gset format. See | [`get_operator`](#qiskit.optimization.applications.ising.graph_partition.get_operator "qiskit.optimization.applications.ising.graph_partition.get_operator")(weight\_matrix) | Generate Hamiltonian for the graph partitioning | | [`objective_value`](#qiskit.optimization.applications.ising.graph_partition.objective_value "qiskit.optimization.applications.ising.graph_partition.objective_value")(x, w) | Compute the value of a cut. | -### get\_graph\_solution +## get\_graph\_solution Get graph solution from binary string. @@ -38,7 +38,7 @@ Convert graph partitioning instances into Pauli list Deal with Gset format. See numpy.ndarray -### get\_operator +## get\_operator Generate Hamiltonian for the graph partitioning @@ -66,7 +66,7 @@ Convert graph partitioning instances into Pauli list Deal with Gset format. See [WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator") -### objective\_value +## objective\_value Compute the value of a cut. diff --git a/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.knapsack.mdx b/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.knapsack.mdx index 489c461335a..54844e44843 100644 --- a/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.knapsack.mdx +++ b/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.knapsack.mdx @@ -24,7 +24,7 @@ If we have the weights w\[i], the values v\[i] and the maximum weight W\_max. We | [`get_solution`](#qiskit.optimization.applications.ising.knapsack.get_solution "qiskit.optimization.applications.ising.knapsack.get_solution")(x, values) | Get the solution to the knapsack problem from the bitstring that represents to the ground state of the Hamiltonian | | [`knapsack_value_weight`](#qiskit.optimization.applications.ising.knapsack.knapsack_value_weight "qiskit.optimization.applications.ising.knapsack.knapsack_value_weight")(solution, values, weights) | Get the total wight and value of the items taken in the knapsack. | -### get\_operator +## get\_operator Generate Hamiltonian for the knapsack problem. @@ -61,7 +61,7 @@ If we have the weights w\[i], the values v\[i] and the maximum weight W\_max. We * **ValueError** – max\_weight is negative -### get\_solution +## get\_solution Get the solution to the knapsack problem from the bitstring that represents to the ground state of the Hamiltonian @@ -82,7 +82,7 @@ If we have the weights w\[i], the values v\[i] and the maximum weight W\_max. We numpy.ndarray -### knapsack\_value\_weight +## knapsack\_value\_weight Get the total wight and value of the items taken in the knapsack. diff --git a/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.max_cut.mdx b/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.max_cut.mdx index 7dea52d672e..381092f365d 100644 --- a/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.max_cut.mdx +++ b/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.max_cut.mdx @@ -20,7 +20,7 @@ Convert max-cut instances into Pauli list Deal with Gset format. See [https://we | [`get_operator`](#qiskit.optimization.applications.ising.max_cut.get_operator "qiskit.optimization.applications.ising.max_cut.get_operator")(weight\_matrix) | Generate Hamiltonian for the max-cut problem of a graph. | | [`max_cut_value`](#qiskit.optimization.applications.ising.max_cut.max_cut_value "qiskit.optimization.applications.ising.max_cut.max_cut_value")(x, w) | Compute the value of a cut. | -### get\_graph\_solution +## get\_graph\_solution Get graph solution from binary string. @@ -38,7 +38,7 @@ Convert max-cut instances into Pauli list Deal with Gset format. See [https://we numpy.ndarray -### get\_operator +## get\_operator Generate Hamiltonian for the max-cut problem of a graph. @@ -56,7 +56,7 @@ Convert max-cut instances into Pauli list Deal with Gset format. See [https://we [WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator") -### max\_cut\_value +## max\_cut\_value Compute the value of a cut. diff --git a/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.partition.mdx b/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.partition.mdx index fb7326ebaa1..b4b6fc09c3c 100644 --- a/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.partition.mdx +++ b/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.partition.mdx @@ -19,7 +19,7 @@ Generate Number Partitioning (Partition) instances, and convert them into a Hami | [`get_operator`](#qiskit.optimization.applications.ising.partition.get_operator "qiskit.optimization.applications.ising.partition.get_operator")(values) | Construct the Hamiltonian for a given Partition instance. | | [`partition_value`](#qiskit.optimization.applications.ising.partition.partition_value "qiskit.optimization.applications.ising.partition.partition_value")(x, number\_list) | Compute the value of a partition. | -### get\_operator +## get\_operator Construct the Hamiltonian for a given Partition instance. @@ -39,7 +39,7 @@ Generate Number Partitioning (Partition) instances, and convert them into a Hami tuple([WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator"), float) -### partition\_value +## partition\_value Compute the value of a partition. diff --git a/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.set_packing.mdx b/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.set_packing.mdx index b3b839d6ccc..d888d9624c3 100644 --- a/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.set_packing.mdx +++ b/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.set_packing.mdx @@ -20,13 +20,13 @@ set packing module | [`get_operator`](#qiskit.optimization.applications.ising.set_packing.get_operator "qiskit.optimization.applications.ising.set_packing.get_operator")(list\_of\_subsets) | Construct the Hamiltonian for the set packing. | | [`get_solution`](#qiskit.optimization.applications.ising.set_packing.get_solution "qiskit.optimization.applications.ising.set_packing.get_solution")(x) | **param x**binary string as numpy array. | -### check\_disjoint +## check\_disjoint check disjoint -### get\_operator +## get\_operator Construct the Hamiltonian for the set packing. @@ -56,7 +56,7 @@ set packing module tuple([WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator"), float) -### get\_solution +## get\_solution **Parameters** diff --git a/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.stable_set.mdx b/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.stable_set.mdx index 3763b10ecd0..24b8facaba5 100644 --- a/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.stable_set.mdx +++ b/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.stable_set.mdx @@ -20,7 +20,7 @@ Convert stable set instances into Pauli list. We read instances in the Gset form | [`get_operator`](#qiskit.optimization.applications.ising.stable_set.get_operator "qiskit.optimization.applications.ising.stable_set.get_operator")(w) | Generate Hamiltonian for the maximum stable set in a graph. | | [`stable_set_value`](#qiskit.optimization.applications.ising.stable_set.stable_set_value "qiskit.optimization.applications.ising.stable_set.stable_set_value")(x, w) | Compute the value of a stable set, and its feasibility. | -### get\_graph\_solution +## get\_graph\_solution Get graph solution from binary string. @@ -38,7 +38,7 @@ Convert stable set instances into Pauli list. We read instances in the Gset form numpy.ndarray -### get\_operator +## get\_operator Generate Hamiltonian for the maximum stable set in a graph. @@ -56,7 +56,7 @@ Convert stable set instances into Pauli list. We read instances in the Gset form tuple([WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator"), float) -### stable\_set\_value +## stable\_set\_value Compute the value of a stable set, and its feasibility. diff --git a/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.tsp.mdx b/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.tsp.mdx index 8d100a34cdc..5ee95ef151e 100644 --- a/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.tsp.mdx +++ b/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.tsp.mdx @@ -30,6 +30,8 @@ Convert symmetric TSP instances into Pauli list Deal with TSPLIB format. It supp | ------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------- | | [`TspData`](#qiskit.optimization.applications.ising.tsp.TspData "qiskit.optimization.applications.ising.tsp.TspData")(name, dim, coord, w) | Create new instance of TspData(name, dim, coord, w) | +## TspData + Create new instance of TspData(name, dim, coord, w) @@ -72,13 +74,13 @@ Convert symmetric TSP instances into Pauli list Deal with TSPLIB format. It supp -### calc\_distance +## calc\_distance calculate distance -### get\_operator +## get\_operator Generate Hamiltonian for TSP of a graph. @@ -97,7 +99,7 @@ Convert symmetric TSP instances into Pauli list Deal with TSPLIB format. It supp tuple([WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator"), float) -### get\_tsp\_solution +## get\_tsp\_solution Get graph solution from binary string. @@ -121,7 +123,7 @@ Convert symmetric TSP instances into Pauli list Deal with TSPLIB format. It supp Instance data of TSP -### parse\_tsplib\_format +## parse\_tsplib\_format Read graph in TSPLIB format from file. @@ -139,7 +141,7 @@ Instance data of TSP [TspData](#qiskit.optimization.applications.ising.tsp.TspData "qiskit.optimization.applications.ising.tsp.TspData") -### random\_tsp +## random\_tsp Generate a random instance for TSP. @@ -162,7 +164,7 @@ Instance data of TSP [TspData](#qiskit.optimization.applications.ising.tsp.TspData "qiskit.optimization.applications.ising.tsp.TspData") -### tsp\_feasible +## tsp\_feasible Check whether a solution is feasible or not. @@ -180,7 +182,7 @@ Instance data of TSP bool -### tsp\_value +## tsp\_value Compute the TSP value of a solution. diff --git a/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.vehicle_routing.mdx b/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.vehicle_routing.mdx index ea00e22f71f..af4baa5923a 100644 --- a/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.vehicle_routing.mdx +++ b/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.vehicle_routing.mdx @@ -21,7 +21,7 @@ Converts vehicle routing instances into a list of Paulis, and provides some rela | [`get_vehiclerouting_matrices`](#qiskit.optimization.applications.ising.vehicle_routing.get_vehiclerouting_matrices "qiskit.optimization.applications.ising.vehicle_routing.get_vehiclerouting_matrices")(instance, n, K) | Constructs auxiliary matrices from a vehicle routing instance, | | [`get_vehiclerouting_solution`](#qiskit.optimization.applications.ising.vehicle_routing.get_vehiclerouting_solution "qiskit.optimization.applications.ising.vehicle_routing.get_vehiclerouting_solution")(instance, n, K, …) | Tries to obtain a feasible solution (in vector form) of an instance | -### get\_operator +## get\_operator Converts an instance of a vehicle routing problem into a list of Paulis. @@ -41,7 +41,7 @@ Converts vehicle routing instances into a list of Paulis, and provides some rela operator for the Hamiltonian. -### get\_vehiclerouting\_cost +## get\_vehiclerouting\_cost Computes the cost of a solution to an instance of a vehicle routing problem. @@ -62,7 +62,7 @@ Converts vehicle routing instances into a list of Paulis, and provides some rela objective function value. -### get\_vehiclerouting\_matrices +## get\_vehiclerouting\_matrices **Constructs auxiliary matrices from a vehicle routing instance,** @@ -84,7 +84,7 @@ Converts vehicle routing instances into a list of Paulis, and provides some rela a matrix defining the interactions between variables. a matrix defining the contribution from the individual variables. the constant offset. -### get\_vehiclerouting\_solution +## get\_vehiclerouting\_solution **Tries to obtain a feasible solution (in vector form) of an instance** diff --git a/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.vertex_cover.mdx b/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.vertex_cover.mdx index ef51b82f49a..31058ef1e35 100644 --- a/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.vertex_cover.mdx +++ b/docs/api/qiskit/0.26/qiskit.optimization.applications.ising.vertex_cover.mdx @@ -20,7 +20,7 @@ Convert vertex cover instances into Pauli list Deal with Gset format. See [https | [`get_graph_solution`](#qiskit.optimization.applications.ising.vertex_cover.get_graph_solution "qiskit.optimization.applications.ising.vertex_cover.get_graph_solution")(x) | Get graph solution from binary string. | | [`get_operator`](#qiskit.optimization.applications.ising.vertex_cover.get_operator "qiskit.optimization.applications.ising.vertex_cover.get_operator")(weight\_matrix) | Generate Hamiltonian for the vertex cover :param weight\_matrix: adjacency matrix. | -### check\_full\_edge\_coverage +## check\_full\_edge\_coverage **Parameters** @@ -37,7 +37,7 @@ Convert vertex cover instances into Pauli list Deal with Gset format. See [https float -### get\_graph\_solution +## get\_graph\_solution Get graph solution from binary string. @@ -55,7 +55,7 @@ Convert vertex cover instances into Pauli list Deal with Gset format. See [https numpy.ndarray -### get\_operator +## get\_operator Generate Hamiltonian for the vertex cover :param weight\_matrix: adjacency matrix. :type weight\_matrix: numpy.ndarray diff --git a/docs/api/qiskit/0.26/qiskit.pulse.channels.mdx b/docs/api/qiskit/0.26/qiskit.pulse.channels.mdx index a515878eb41..a52b7628391 100644 --- a/docs/api/qiskit/0.26/qiskit.pulse.channels.mdx +++ b/docs/api/qiskit/0.26/qiskit.pulse.channels.mdx @@ -32,6 +32,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s | [`RegisterSlot`](#qiskit.pulse.channels.RegisterSlot "qiskit.pulse.channels.RegisterSlot")(index) | Classical resister slot channels represent classical registers (low-latency classical memory). | | [`SnapshotChannel`](#qiskit.pulse.channels.SnapshotChannel "qiskit.pulse.channels.SnapshotChannel")(\*args, \*\*kwargs) | Snapshot channels are used to specify instructions for simulators. | +## AcquireChannel + Acquire channels are used to collect data. @@ -105,6 +107,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## Channel + Base class of channels. Channels provide a Qiskit-side label for typical quantum control hardware signal channels. The final label -> physical channel mapping is the responsibility of the hardware backend. For instance, `DriveChannel(0)` holds instructions which the backend should map to the signal line driving gate operations on the qubit labeled (indexed) 0. @@ -188,6 +192,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## ControlChannel + Control channels provide supplementary control over the qubit to the drive channel. These are often associated with multi-qubit gate operations. They may not map trivially to a particular qubit index. @@ -261,6 +267,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## DriveChannel + Drive channels transmit signals to qubits which enact gate operations. @@ -334,6 +342,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## MeasureChannel + Measure channels transmit measurement stimulus pulses for readout. @@ -407,6 +417,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## MemorySlot + Memory slot channels represent classical memory storage. @@ -480,6 +492,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## PulseChannel + Base class of transmit Channels. Pulses can be played on these channels. @@ -553,6 +567,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## RegisterSlot + Classical resister slot channels represent classical registers (low-latency classical memory). @@ -626,6 +642,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## SnapshotChannel + Snapshot channels are used to specify instructions for simulators. diff --git a/docs/api/qiskit/0.26/qiskit.pulse.library.discrete.mdx b/docs/api/qiskit/0.26/qiskit.pulse.library.discrete.mdx index 4de3cc49145..27e86d5dea1 100644 --- a/docs/api/qiskit/0.26/qiskit.pulse.library.discrete.mdx +++ b/docs/api/qiskit/0.26/qiskit.pulse.library.discrete.mdx @@ -32,7 +32,7 @@ Note the sampling strategy use for all discrete pulses is `midpoint`. | [`triangle`](#qiskit.pulse.library.discrete.triangle "qiskit.pulse.library.discrete.triangle")(duration, amp\[, freq, phase, name]) | Generates triangle wave [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). | | [`zero`](#qiskit.pulse.library.discrete.zero "qiskit.pulse.library.discrete.zero")(duration\[, name]) | Generates zero-sampled [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). | -### constant +## constant Generates constant-sampled [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -54,7 +54,7 @@ $$ `Waveform` -### cos +## cos Generates cosine wave [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -78,7 +78,7 @@ $$ `Waveform` -### drag +## drag Generates Y-only correction DRAG [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform") for standard nonlinear oscillator (SNO) \[1]. @@ -111,7 +111,7 @@ $$ `Waveform` -### gaussian +## gaussian Generates unnormalized gaussian [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -147,7 +147,7 @@ $$ `Waveform` -### gaussian\_deriv +## gaussian\_deriv Generates unnormalized gaussian derivative [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -172,7 +172,7 @@ $$ `Waveform` -### gaussian\_square +## gaussian\_square Generates gaussian square [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -210,7 +210,7 @@ $$ `Waveform` -### sawtooth +## sawtooth Generates sawtooth wave [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -256,7 +256,7 @@ $$ `Waveform` -### sech +## sech Generates unnormalized sech [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -290,7 +290,7 @@ $$ `Waveform` -### sech\_deriv +## sech\_deriv Generates unnormalized sech derivative [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -315,7 +315,7 @@ $$ `Waveform` -### sin +## sin Generates sine wave [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -339,7 +339,7 @@ $$ `Waveform` -### square +## square Generates square wave [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -365,7 +365,7 @@ $$ `Waveform` -### triangle +## triangle Generates triangle wave [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -411,7 +411,7 @@ $$ `Waveform` -### zero +## zero Generates zero-sampled [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). diff --git a/docs/api/qiskit/0.26/qiskit.scheduler.methods.basic.mdx b/docs/api/qiskit/0.26/qiskit.scheduler.methods.basic.mdx index 734a913c529..3c43aa4c5cc 100644 --- a/docs/api/qiskit/0.26/qiskit.scheduler.methods.basic.mdx +++ b/docs/api/qiskit/0.26/qiskit.scheduler.methods.basic.mdx @@ -19,7 +19,7 @@ The most straightforward scheduling methods: scheduling **as early** or **as lat | [`as_late_as_possible`](#qiskit.scheduler.methods.basic.as_late_as_possible "qiskit.scheduler.methods.basic.as_late_as_possible")(circuit, schedule\_config) | Return the pulse Schedule which implements the input circuit using an “as late as possible” (alap) scheduling policy. | | [`as_soon_as_possible`](#qiskit.scheduler.methods.basic.as_soon_as_possible "qiskit.scheduler.methods.basic.as_soon_as_possible")(circuit, schedule\_config) | Return the pulse Schedule which implements the input circuit using an “as soon as possible” (asap) scheduling policy. | -### as\_late\_as\_possible +## as\_late\_as\_possible Return the pulse Schedule which implements the input circuit using an “as late as possible” (alap) scheduling policy. @@ -42,7 +42,7 @@ The most straightforward scheduling methods: scheduling **as early** or **as lat A schedule corresponding to the input `circuit` with pulses occurring as late as possible. -### as\_soon\_as\_possible +## as\_soon\_as\_possible Return the pulse Schedule which implements the input circuit using an “as soon as possible” (asap) scheduling policy. diff --git a/docs/api/qiskit/0.26/qiskit.scheduler.schedule_circuit.mdx b/docs/api/qiskit/0.26/qiskit.scheduler.schedule_circuit.mdx index c500ee4afa1..ff805676f53 100644 --- a/docs/api/qiskit/0.26/qiskit.scheduler.schedule_circuit.mdx +++ b/docs/api/qiskit/0.26/qiskit.scheduler.schedule_circuit.mdx @@ -18,7 +18,7 @@ QuantumCircuit to Pulse scheduler. | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | | [`schedule_circuit`](#qiskit.scheduler.schedule_circuit.schedule_circuit "qiskit.scheduler.schedule_circuit.schedule_circuit")(circuit, schedule\_config\[, …]) | Basic scheduling pass from a circuit to a pulse Schedule, using the backend. | -### schedule\_circuit +## schedule\_circuit Basic scheduling pass from a circuit to a pulse Schedule, using the backend. If no method is specified, then a basic, as late as possible scheduling pass is performed, i.e. pulses are scheduled to occur as late as possible. From e31b98e815af760d62e196230b8b03ae3a2009c1 Mon Sep 17 00:00:00 2001 From: Arnau Casau Date: Fri, 3 May 2024 10:55:47 +0200 Subject: [PATCH 08/31] Regenerate qiskit 0.27.0 --- docs/api/qiskit/0.27/execute.mdx | 2 +- docs/api/qiskit/0.27/logging.mdx | 2 ++ ...t.finance.applications.ising.portfolio.mdx | 10 +++---- ...ations.ising.portfolio_diversification.mdx | 6 ++--- ...optimization.applications.ising.clique.mdx | 6 ++--- ...optimization.applications.ising.common.mdx | 12 ++++----- ...ptimization.applications.ising.docplex.mdx | 2 +- ...ization.applications.ising.exact_cover.mdx | 6 ++--- ...ion.applications.ising.graph_partition.mdx | 6 ++--- ...timization.applications.ising.knapsack.mdx | 6 ++--- ...ptimization.applications.ising.max_cut.mdx | 6 ++--- ...imization.applications.ising.partition.mdx | 4 +-- ...ization.applications.ising.set_packing.mdx | 6 ++--- ...mization.applications.ising.stable_set.mdx | 6 ++--- ...it.optimization.applications.ising.tsp.mdx | 16 +++++++----- ...ion.applications.ising.vehicle_routing.mdx | 8 +++--- ...zation.applications.ising.vertex_cover.mdx | 6 ++--- .../api/qiskit/0.27/qiskit.pulse.channels.mdx | 18 +++++++++++++ .../0.27/qiskit.pulse.library.discrete.mdx | 26 +++++++++---------- .../0.27/qiskit.scheduler.methods.basic.mdx | 4 +-- .../qiskit.scheduler.schedule_circuit.mdx | 2 +- 21 files changed, 91 insertions(+), 69 deletions(-) diff --git a/docs/api/qiskit/0.27/execute.mdx b/docs/api/qiskit/0.27/execute.mdx index a04860100a1..94099ab8a40 100644 --- a/docs/api/qiskit/0.27/execute.mdx +++ b/docs/api/qiskit/0.27/execute.mdx @@ -16,7 +16,7 @@ python_api_name: qiskit.execute_function `qiskit.execute_function` -### execute +## execute Execute a list of [`qiskit.circuit.QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") or [`qiskit.pulse.Schedule`](qiskit.pulse.Schedule "qiskit.pulse.Schedule") on a backend. diff --git a/docs/api/qiskit/0.27/logging.mdx b/docs/api/qiskit/0.27/logging.mdx index 423000acd53..0bbcd2aac82 100644 --- a/docs/api/qiskit/0.27/logging.mdx +++ b/docs/api/qiskit/0.27/logging.mdx @@ -22,6 +22,8 @@ python_api_name: qiskit.ignis.logging | [`IgnisLogging`](qiskit.ignis.logging.IgnisLogging "qiskit.ignis.logging.IgnisLogging")(\[log\_config\_path]) | Singleton class to configure file logging via IgnisLogger | | [`IgnisLogReader`](qiskit.ignis.logging.IgnisLogReader "qiskit.ignis.logging.IgnisLogReader")() | Class to read from Ignis log files | +### + A logger class for Ignis diff --git a/docs/api/qiskit/0.27/qiskit.finance.applications.ising.portfolio.mdx b/docs/api/qiskit/0.27/qiskit.finance.applications.ising.portfolio.mdx index f18caa2feb6..e0294179645 100644 --- a/docs/api/qiskit/0.27/qiskit.finance.applications.ising.portfolio.mdx +++ b/docs/api/qiskit/0.27/qiskit.finance.applications.ising.portfolio.mdx @@ -22,31 +22,31 @@ Convert portfolio optimization instances into Pauli list | [`portfolio_variance`](#qiskit.finance.applications.ising.portfolio.portfolio_variance "qiskit.finance.applications.ising.portfolio.portfolio_variance")(x, sigma) | returns portfolio variance | | [`random_model`](#qiskit.finance.applications.ising.portfolio.random_model "qiskit.finance.applications.ising.portfolio.random_model")(n\[, seed]) | Generate random model (mu, sigma) for portfolio optimization problem. | -### get\_operator +## get\_operator get qubit op -### portfolio\_expected\_value +## portfolio\_expected\_value returns portfolio expected value -### portfolio\_value +## portfolio\_value returns portfolio value -### portfolio\_variance +## portfolio\_variance returns portfolio variance -### random\_model +## random\_model Generate random model (mu, sigma) for portfolio optimization problem. diff --git a/docs/api/qiskit/0.27/qiskit.finance.applications.ising.portfolio_diversification.mdx b/docs/api/qiskit/0.27/qiskit.finance.applications.ising.portfolio_diversification.mdx index fe7f32b7f77..cf668990693 100644 --- a/docs/api/qiskit/0.27/qiskit.finance.applications.ising.portfolio_diversification.mdx +++ b/docs/api/qiskit/0.27/qiskit.finance.applications.ising.portfolio_diversification.mdx @@ -20,7 +20,7 @@ portfolio diversification | [`get_portfoliodiversification_solution`](#qiskit.finance.applications.ising.portfolio_diversification.get_portfoliodiversification_solution "qiskit.finance.applications.ising.portfolio_diversification.get_portfoliodiversification_solution")(rho, …) | Tries to obtain a feasible solution (in vector form) of an instance of portfolio diversification from the results dictionary. | | [`get_portfoliodiversification_value`](#qiskit.finance.applications.ising.portfolio_diversification.get_portfoliodiversification_value "qiskit.finance.applications.ising.portfolio_diversification.get_portfoliodiversification_value")(rho, n, …) | Evaluates an objective function of an instance of portfolio diversification and its solution (in vector form). | -### get\_operator +## get\_operator Converts an instance of portfolio optimization into a list of Paulis. @@ -40,7 +40,7 @@ portfolio diversification operator for the Hamiltonian -### get\_portfoliodiversification\_solution +## get\_portfoliodiversification\_solution Tries to obtain a feasible solution (in vector form) of an instance of portfolio diversification from the results dictionary. @@ -61,7 +61,7 @@ portfolio diversification a vector describing the solution. -### get\_portfoliodiversification\_value +## get\_portfoliodiversification\_value Evaluates an objective function of an instance of portfolio diversification and its solution (in vector form). diff --git a/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.clique.mdx b/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.clique.mdx index f669f8f060a..35741b1b529 100644 --- a/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.clique.mdx +++ b/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.clique.mdx @@ -22,7 +22,7 @@ Deal with Gset format. See [https://web.stanford.edu/\~yyye/yyye/Gset/](https:// | [`get_operator`](#qiskit.optimization.applications.ising.clique.get_operator "qiskit.optimization.applications.ising.clique.get_operator")(weight\_matrix, K) | Generate Hamiltonian for the clique. | | [`satisfy_or_not`](#qiskit.optimization.applications.ising.clique.satisfy_or_not "qiskit.optimization.applications.ising.clique.satisfy_or_not")(x, w, K) | Compute the value of a cut. | -### get\_graph\_solution +## get\_graph\_solution Get graph solution from binary string. @@ -40,7 +40,7 @@ Deal with Gset format. See [https://web.stanford.edu/\~yyye/yyye/Gset/](https:// numpy.ndarray -### get\_operator +## get\_operator Generate Hamiltonian for the clique. @@ -81,7 +81,7 @@ Deal with Gset format. See [https://web.stanford.edu/\~yyye/yyye/Gset/](https:// tuple([WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator"), float) -### satisfy\_or\_not +## satisfy\_or\_not Compute the value of a cut. diff --git a/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.common.mdx b/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.common.mdx index a5f743f7334..fa50b3495e6 100644 --- a/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.common.mdx +++ b/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.common.mdx @@ -23,7 +23,7 @@ common module | [`read_numbers_from_file`](#qiskit.optimization.applications.ising.common.read_numbers_from_file "qiskit.optimization.applications.ising.common.read_numbers_from_file")(filename) | Read numbers from a file | | [`sample_most_likely`](#qiskit.optimization.applications.ising.common.sample_most_likely "qiskit.optimization.applications.ising.common.sample_most_likely")(state\_vector) | Compute the most likely binary string from state vector. | -### get\_gset\_result +## get\_gset\_result Get graph solution in Gset format from binary string. @@ -41,7 +41,7 @@ common module Dict\[int, int] -### parse\_gset\_format +## parse\_gset\_format Read graph in Gset format from file. @@ -59,7 +59,7 @@ common module numpy.ndarray -### random\_graph +## random\_graph Generate random Erdos-Renyi graph. @@ -82,7 +82,7 @@ common module numpy.ndarray -### random\_number\_list +## random\_number\_list Generate a set of positive integers within the given range. @@ -103,7 +103,7 @@ common module numpy.ndarray -### read\_numbers\_from\_file +## read\_numbers\_from\_file Read numbers from a file @@ -121,7 +121,7 @@ common module numpy.ndarray -### sample\_most\_likely +## sample\_most\_likely Compute the most likely binary string from state vector. :param state\_vector: state vector or counts. :type state\_vector: numpy.ndarray or dict diff --git a/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.docplex.mdx b/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.docplex.mdx index b2b31b7a696..66792a0de9d 100644 --- a/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.docplex.mdx +++ b/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.docplex.mdx @@ -58,7 +58,7 @@ print('tsp objective:', result['energy'] + offset) | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- | | [`get_operator`](#qiskit.optimization.applications.ising.docplex.get_operator "qiskit.optimization.applications.ising.docplex.get_operator")(mdl\[, auto\_penalty, …]) | Generate Ising Hamiltonian from a model of DOcplex. | -### get\_operator +## get\_operator Generate Ising Hamiltonian from a model of DOcplex. diff --git a/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.exact_cover.mdx b/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.exact_cover.mdx index 28d740b7457..059a91fed55 100644 --- a/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.exact_cover.mdx +++ b/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.exact_cover.mdx @@ -20,13 +20,13 @@ exact cover | [`get_operator`](#qiskit.optimization.applications.ising.exact_cover.get_operator "qiskit.optimization.applications.ising.exact_cover.get_operator")(list\_of\_subsets) | Construct the Hamiltonian for the exact solver problem. | | [`get_solution`](#qiskit.optimization.applications.ising.exact_cover.get_solution "qiskit.optimization.applications.ising.exact_cover.get_solution")(x) | **param x**binary string as numpy array. | -### check\_solution\_satisfiability +## check\_solution\_satisfiability check solution satisfiability -### get\_operator +## get\_operator Construct the Hamiltonian for the exact solver problem. @@ -54,7 +54,7 @@ exact cover tuple([WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator"), float) -### get\_solution +## get\_solution **Parameters** diff --git a/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.graph_partition.mdx b/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.graph_partition.mdx index 121bdcbef22..a7db2c3b37b 100644 --- a/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.graph_partition.mdx +++ b/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.graph_partition.mdx @@ -20,7 +20,7 @@ Convert graph partitioning instances into Pauli list Deal with Gset format. See | [`get_operator`](#qiskit.optimization.applications.ising.graph_partition.get_operator "qiskit.optimization.applications.ising.graph_partition.get_operator")(weight\_matrix) | Generate Hamiltonian for the graph partitioning | | [`objective_value`](#qiskit.optimization.applications.ising.graph_partition.objective_value "qiskit.optimization.applications.ising.graph_partition.objective_value")(x, w) | Compute the value of a cut. | -### get\_graph\_solution +## get\_graph\_solution Get graph solution from binary string. @@ -38,7 +38,7 @@ Convert graph partitioning instances into Pauli list Deal with Gset format. See numpy.ndarray -### get\_operator +## get\_operator Generate Hamiltonian for the graph partitioning @@ -66,7 +66,7 @@ Convert graph partitioning instances into Pauli list Deal with Gset format. See [WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator") -### objective\_value +## objective\_value Compute the value of a cut. diff --git a/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.knapsack.mdx b/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.knapsack.mdx index 489c461335a..54844e44843 100644 --- a/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.knapsack.mdx +++ b/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.knapsack.mdx @@ -24,7 +24,7 @@ If we have the weights w\[i], the values v\[i] and the maximum weight W\_max. We | [`get_solution`](#qiskit.optimization.applications.ising.knapsack.get_solution "qiskit.optimization.applications.ising.knapsack.get_solution")(x, values) | Get the solution to the knapsack problem from the bitstring that represents to the ground state of the Hamiltonian | | [`knapsack_value_weight`](#qiskit.optimization.applications.ising.knapsack.knapsack_value_weight "qiskit.optimization.applications.ising.knapsack.knapsack_value_weight")(solution, values, weights) | Get the total wight and value of the items taken in the knapsack. | -### get\_operator +## get\_operator Generate Hamiltonian for the knapsack problem. @@ -61,7 +61,7 @@ If we have the weights w\[i], the values v\[i] and the maximum weight W\_max. We * **ValueError** – max\_weight is negative -### get\_solution +## get\_solution Get the solution to the knapsack problem from the bitstring that represents to the ground state of the Hamiltonian @@ -82,7 +82,7 @@ If we have the weights w\[i], the values v\[i] and the maximum weight W\_max. We numpy.ndarray -### knapsack\_value\_weight +## knapsack\_value\_weight Get the total wight and value of the items taken in the knapsack. diff --git a/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.max_cut.mdx b/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.max_cut.mdx index 7dea52d672e..381092f365d 100644 --- a/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.max_cut.mdx +++ b/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.max_cut.mdx @@ -20,7 +20,7 @@ Convert max-cut instances into Pauli list Deal with Gset format. See [https://we | [`get_operator`](#qiskit.optimization.applications.ising.max_cut.get_operator "qiskit.optimization.applications.ising.max_cut.get_operator")(weight\_matrix) | Generate Hamiltonian for the max-cut problem of a graph. | | [`max_cut_value`](#qiskit.optimization.applications.ising.max_cut.max_cut_value "qiskit.optimization.applications.ising.max_cut.max_cut_value")(x, w) | Compute the value of a cut. | -### get\_graph\_solution +## get\_graph\_solution Get graph solution from binary string. @@ -38,7 +38,7 @@ Convert max-cut instances into Pauli list Deal with Gset format. See [https://we numpy.ndarray -### get\_operator +## get\_operator Generate Hamiltonian for the max-cut problem of a graph. @@ -56,7 +56,7 @@ Convert max-cut instances into Pauli list Deal with Gset format. See [https://we [WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator") -### max\_cut\_value +## max\_cut\_value Compute the value of a cut. diff --git a/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.partition.mdx b/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.partition.mdx index fb7326ebaa1..b4b6fc09c3c 100644 --- a/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.partition.mdx +++ b/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.partition.mdx @@ -19,7 +19,7 @@ Generate Number Partitioning (Partition) instances, and convert them into a Hami | [`get_operator`](#qiskit.optimization.applications.ising.partition.get_operator "qiskit.optimization.applications.ising.partition.get_operator")(values) | Construct the Hamiltonian for a given Partition instance. | | [`partition_value`](#qiskit.optimization.applications.ising.partition.partition_value "qiskit.optimization.applications.ising.partition.partition_value")(x, number\_list) | Compute the value of a partition. | -### get\_operator +## get\_operator Construct the Hamiltonian for a given Partition instance. @@ -39,7 +39,7 @@ Generate Number Partitioning (Partition) instances, and convert them into a Hami tuple([WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator"), float) -### partition\_value +## partition\_value Compute the value of a partition. diff --git a/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.set_packing.mdx b/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.set_packing.mdx index b3b839d6ccc..d888d9624c3 100644 --- a/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.set_packing.mdx +++ b/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.set_packing.mdx @@ -20,13 +20,13 @@ set packing module | [`get_operator`](#qiskit.optimization.applications.ising.set_packing.get_operator "qiskit.optimization.applications.ising.set_packing.get_operator")(list\_of\_subsets) | Construct the Hamiltonian for the set packing. | | [`get_solution`](#qiskit.optimization.applications.ising.set_packing.get_solution "qiskit.optimization.applications.ising.set_packing.get_solution")(x) | **param x**binary string as numpy array. | -### check\_disjoint +## check\_disjoint check disjoint -### get\_operator +## get\_operator Construct the Hamiltonian for the set packing. @@ -56,7 +56,7 @@ set packing module tuple([WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator"), float) -### get\_solution +## get\_solution **Parameters** diff --git a/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.stable_set.mdx b/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.stable_set.mdx index 3763b10ecd0..24b8facaba5 100644 --- a/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.stable_set.mdx +++ b/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.stable_set.mdx @@ -20,7 +20,7 @@ Convert stable set instances into Pauli list. We read instances in the Gset form | [`get_operator`](#qiskit.optimization.applications.ising.stable_set.get_operator "qiskit.optimization.applications.ising.stable_set.get_operator")(w) | Generate Hamiltonian for the maximum stable set in a graph. | | [`stable_set_value`](#qiskit.optimization.applications.ising.stable_set.stable_set_value "qiskit.optimization.applications.ising.stable_set.stable_set_value")(x, w) | Compute the value of a stable set, and its feasibility. | -### get\_graph\_solution +## get\_graph\_solution Get graph solution from binary string. @@ -38,7 +38,7 @@ Convert stable set instances into Pauli list. We read instances in the Gset form numpy.ndarray -### get\_operator +## get\_operator Generate Hamiltonian for the maximum stable set in a graph. @@ -56,7 +56,7 @@ Convert stable set instances into Pauli list. We read instances in the Gset form tuple([WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator"), float) -### stable\_set\_value +## stable\_set\_value Compute the value of a stable set, and its feasibility. diff --git a/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.tsp.mdx b/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.tsp.mdx index 8d100a34cdc..5ee95ef151e 100644 --- a/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.tsp.mdx +++ b/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.tsp.mdx @@ -30,6 +30,8 @@ Convert symmetric TSP instances into Pauli list Deal with TSPLIB format. It supp | ------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------- | | [`TspData`](#qiskit.optimization.applications.ising.tsp.TspData "qiskit.optimization.applications.ising.tsp.TspData")(name, dim, coord, w) | Create new instance of TspData(name, dim, coord, w) | +## TspData + Create new instance of TspData(name, dim, coord, w) @@ -72,13 +74,13 @@ Convert symmetric TSP instances into Pauli list Deal with TSPLIB format. It supp -### calc\_distance +## calc\_distance calculate distance -### get\_operator +## get\_operator Generate Hamiltonian for TSP of a graph. @@ -97,7 +99,7 @@ Convert symmetric TSP instances into Pauli list Deal with TSPLIB format. It supp tuple([WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator"), float) -### get\_tsp\_solution +## get\_tsp\_solution Get graph solution from binary string. @@ -121,7 +123,7 @@ Convert symmetric TSP instances into Pauli list Deal with TSPLIB format. It supp Instance data of TSP -### parse\_tsplib\_format +## parse\_tsplib\_format Read graph in TSPLIB format from file. @@ -139,7 +141,7 @@ Instance data of TSP [TspData](#qiskit.optimization.applications.ising.tsp.TspData "qiskit.optimization.applications.ising.tsp.TspData") -### random\_tsp +## random\_tsp Generate a random instance for TSP. @@ -162,7 +164,7 @@ Instance data of TSP [TspData](#qiskit.optimization.applications.ising.tsp.TspData "qiskit.optimization.applications.ising.tsp.TspData") -### tsp\_feasible +## tsp\_feasible Check whether a solution is feasible or not. @@ -180,7 +182,7 @@ Instance data of TSP bool -### tsp\_value +## tsp\_value Compute the TSP value of a solution. diff --git a/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.vehicle_routing.mdx b/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.vehicle_routing.mdx index ea00e22f71f..af4baa5923a 100644 --- a/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.vehicle_routing.mdx +++ b/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.vehicle_routing.mdx @@ -21,7 +21,7 @@ Converts vehicle routing instances into a list of Paulis, and provides some rela | [`get_vehiclerouting_matrices`](#qiskit.optimization.applications.ising.vehicle_routing.get_vehiclerouting_matrices "qiskit.optimization.applications.ising.vehicle_routing.get_vehiclerouting_matrices")(instance, n, K) | Constructs auxiliary matrices from a vehicle routing instance, | | [`get_vehiclerouting_solution`](#qiskit.optimization.applications.ising.vehicle_routing.get_vehiclerouting_solution "qiskit.optimization.applications.ising.vehicle_routing.get_vehiclerouting_solution")(instance, n, K, …) | Tries to obtain a feasible solution (in vector form) of an instance | -### get\_operator +## get\_operator Converts an instance of a vehicle routing problem into a list of Paulis. @@ -41,7 +41,7 @@ Converts vehicle routing instances into a list of Paulis, and provides some rela operator for the Hamiltonian. -### get\_vehiclerouting\_cost +## get\_vehiclerouting\_cost Computes the cost of a solution to an instance of a vehicle routing problem. @@ -62,7 +62,7 @@ Converts vehicle routing instances into a list of Paulis, and provides some rela objective function value. -### get\_vehiclerouting\_matrices +## get\_vehiclerouting\_matrices **Constructs auxiliary matrices from a vehicle routing instance,** @@ -84,7 +84,7 @@ Converts vehicle routing instances into a list of Paulis, and provides some rela a matrix defining the interactions between variables. a matrix defining the contribution from the individual variables. the constant offset. -### get\_vehiclerouting\_solution +## get\_vehiclerouting\_solution **Tries to obtain a feasible solution (in vector form) of an instance** diff --git a/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.vertex_cover.mdx b/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.vertex_cover.mdx index ef51b82f49a..31058ef1e35 100644 --- a/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.vertex_cover.mdx +++ b/docs/api/qiskit/0.27/qiskit.optimization.applications.ising.vertex_cover.mdx @@ -20,7 +20,7 @@ Convert vertex cover instances into Pauli list Deal with Gset format. See [https | [`get_graph_solution`](#qiskit.optimization.applications.ising.vertex_cover.get_graph_solution "qiskit.optimization.applications.ising.vertex_cover.get_graph_solution")(x) | Get graph solution from binary string. | | [`get_operator`](#qiskit.optimization.applications.ising.vertex_cover.get_operator "qiskit.optimization.applications.ising.vertex_cover.get_operator")(weight\_matrix) | Generate Hamiltonian for the vertex cover :param weight\_matrix: adjacency matrix. | -### check\_full\_edge\_coverage +## check\_full\_edge\_coverage **Parameters** @@ -37,7 +37,7 @@ Convert vertex cover instances into Pauli list Deal with Gset format. See [https float -### get\_graph\_solution +## get\_graph\_solution Get graph solution from binary string. @@ -55,7 +55,7 @@ Convert vertex cover instances into Pauli list Deal with Gset format. See [https numpy.ndarray -### get\_operator +## get\_operator Generate Hamiltonian for the vertex cover :param weight\_matrix: adjacency matrix. :type weight\_matrix: numpy.ndarray diff --git a/docs/api/qiskit/0.27/qiskit.pulse.channels.mdx b/docs/api/qiskit/0.27/qiskit.pulse.channels.mdx index a515878eb41..a52b7628391 100644 --- a/docs/api/qiskit/0.27/qiskit.pulse.channels.mdx +++ b/docs/api/qiskit/0.27/qiskit.pulse.channels.mdx @@ -32,6 +32,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s | [`RegisterSlot`](#qiskit.pulse.channels.RegisterSlot "qiskit.pulse.channels.RegisterSlot")(index) | Classical resister slot channels represent classical registers (low-latency classical memory). | | [`SnapshotChannel`](#qiskit.pulse.channels.SnapshotChannel "qiskit.pulse.channels.SnapshotChannel")(\*args, \*\*kwargs) | Snapshot channels are used to specify instructions for simulators. | +## AcquireChannel + Acquire channels are used to collect data. @@ -105,6 +107,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## Channel + Base class of channels. Channels provide a Qiskit-side label for typical quantum control hardware signal channels. The final label -> physical channel mapping is the responsibility of the hardware backend. For instance, `DriveChannel(0)` holds instructions which the backend should map to the signal line driving gate operations on the qubit labeled (indexed) 0. @@ -188,6 +192,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## ControlChannel + Control channels provide supplementary control over the qubit to the drive channel. These are often associated with multi-qubit gate operations. They may not map trivially to a particular qubit index. @@ -261,6 +267,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## DriveChannel + Drive channels transmit signals to qubits which enact gate operations. @@ -334,6 +342,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## MeasureChannel + Measure channels transmit measurement stimulus pulses for readout. @@ -407,6 +417,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## MemorySlot + Memory slot channels represent classical memory storage. @@ -480,6 +492,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## PulseChannel + Base class of transmit Channels. Pulses can be played on these channels. @@ -553,6 +567,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## RegisterSlot + Classical resister slot channels represent classical registers (low-latency classical memory). @@ -626,6 +642,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## SnapshotChannel + Snapshot channels are used to specify instructions for simulators. diff --git a/docs/api/qiskit/0.27/qiskit.pulse.library.discrete.mdx b/docs/api/qiskit/0.27/qiskit.pulse.library.discrete.mdx index 5e246df3c66..d496ea8bad2 100644 --- a/docs/api/qiskit/0.27/qiskit.pulse.library.discrete.mdx +++ b/docs/api/qiskit/0.27/qiskit.pulse.library.discrete.mdx @@ -32,7 +32,7 @@ Note the sampling strategy use for all discrete pulses is `midpoint`. | [`triangle`](#qiskit.pulse.library.discrete.triangle "qiskit.pulse.library.discrete.triangle")(duration, amp\[, freq, phase, name]) | Generates triangle wave [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). | | [`zero`](#qiskit.pulse.library.discrete.zero "qiskit.pulse.library.discrete.zero")(duration\[, name]) | Generates zero-sampled [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). | -### constant +## constant Generates constant-sampled [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -54,7 +54,7 @@ $$ `Waveform` -### cos +## cos Generates cosine wave [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -78,7 +78,7 @@ $$ `Waveform` -### drag +## drag Generates Y-only correction DRAG [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform") for standard nonlinear oscillator (SNO) \[1]. @@ -111,7 +111,7 @@ $$ `Waveform` -### gaussian +## gaussian Generates unnormalized gaussian [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -147,7 +147,7 @@ $$ `Waveform` -### gaussian\_deriv +## gaussian\_deriv Generates unnormalized gaussian derivative [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -172,7 +172,7 @@ $$ `Waveform` -### gaussian\_square +## gaussian\_square Generates gaussian square [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -210,7 +210,7 @@ $$ `Waveform` -### sawtooth +## sawtooth Generates sawtooth wave [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -256,7 +256,7 @@ $$ `Waveform` -### sech +## sech Generates unnormalized sech [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -290,7 +290,7 @@ $$ `Waveform` -### sech\_deriv +## sech\_deriv Generates unnormalized sech derivative [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -315,7 +315,7 @@ $$ `Waveform` -### sin +## sin Generates sine wave [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -339,7 +339,7 @@ $$ `Waveform` -### square +## square Generates square wave [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -365,7 +365,7 @@ $$ `Waveform` -### triangle +## triangle Generates triangle wave [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -411,7 +411,7 @@ $$ `Waveform` -### zero +## zero Generates zero-sampled [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). diff --git a/docs/api/qiskit/0.27/qiskit.scheduler.methods.basic.mdx b/docs/api/qiskit/0.27/qiskit.scheduler.methods.basic.mdx index 734a913c529..3c43aa4c5cc 100644 --- a/docs/api/qiskit/0.27/qiskit.scheduler.methods.basic.mdx +++ b/docs/api/qiskit/0.27/qiskit.scheduler.methods.basic.mdx @@ -19,7 +19,7 @@ The most straightforward scheduling methods: scheduling **as early** or **as lat | [`as_late_as_possible`](#qiskit.scheduler.methods.basic.as_late_as_possible "qiskit.scheduler.methods.basic.as_late_as_possible")(circuit, schedule\_config) | Return the pulse Schedule which implements the input circuit using an “as late as possible” (alap) scheduling policy. | | [`as_soon_as_possible`](#qiskit.scheduler.methods.basic.as_soon_as_possible "qiskit.scheduler.methods.basic.as_soon_as_possible")(circuit, schedule\_config) | Return the pulse Schedule which implements the input circuit using an “as soon as possible” (asap) scheduling policy. | -### as\_late\_as\_possible +## as\_late\_as\_possible Return the pulse Schedule which implements the input circuit using an “as late as possible” (alap) scheduling policy. @@ -42,7 +42,7 @@ The most straightforward scheduling methods: scheduling **as early** or **as lat A schedule corresponding to the input `circuit` with pulses occurring as late as possible. -### as\_soon\_as\_possible +## as\_soon\_as\_possible Return the pulse Schedule which implements the input circuit using an “as soon as possible” (asap) scheduling policy. diff --git a/docs/api/qiskit/0.27/qiskit.scheduler.schedule_circuit.mdx b/docs/api/qiskit/0.27/qiskit.scheduler.schedule_circuit.mdx index c500ee4afa1..ff805676f53 100644 --- a/docs/api/qiskit/0.27/qiskit.scheduler.schedule_circuit.mdx +++ b/docs/api/qiskit/0.27/qiskit.scheduler.schedule_circuit.mdx @@ -18,7 +18,7 @@ QuantumCircuit to Pulse scheduler. | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | | [`schedule_circuit`](#qiskit.scheduler.schedule_circuit.schedule_circuit "qiskit.scheduler.schedule_circuit.schedule_circuit")(circuit, schedule\_config\[, …]) | Basic scheduling pass from a circuit to a pulse Schedule, using the backend. | -### schedule\_circuit +## schedule\_circuit Basic scheduling pass from a circuit to a pulse Schedule, using the backend. If no method is specified, then a basic, as late as possible scheduling pass is performed, i.e. pulses are scheduled to occur as late as possible. From d6ecf7a6ad9aa91c0418a28e2feaa1dfdf986d14 Mon Sep 17 00:00:00 2001 From: Arnau Casau Date: Fri, 3 May 2024 11:01:12 +0200 Subject: [PATCH 09/31] Regenerate qiskit 0.28.0 --- docs/api/qiskit/0.28/execute.mdx | 2 +- docs/api/qiskit/0.28/logging.mdx | 2 ++ ...t.finance.applications.ising.portfolio.mdx | 10 +++---- ...ations.ising.portfolio_diversification.mdx | 6 ++--- ...optimization.applications.ising.clique.mdx | 6 ++--- ...optimization.applications.ising.common.mdx | 12 ++++----- ...ptimization.applications.ising.docplex.mdx | 2 +- ...ization.applications.ising.exact_cover.mdx | 6 ++--- ...ion.applications.ising.graph_partition.mdx | 6 ++--- ...timization.applications.ising.knapsack.mdx | 6 ++--- ...ptimization.applications.ising.max_cut.mdx | 6 ++--- ...imization.applications.ising.partition.mdx | 4 +-- ...ization.applications.ising.set_packing.mdx | 6 ++--- ...mization.applications.ising.stable_set.mdx | 6 ++--- ...it.optimization.applications.ising.tsp.mdx | 16 +++++++----- ...ion.applications.ising.vehicle_routing.mdx | 8 +++--- ...zation.applications.ising.vertex_cover.mdx | 6 ++--- .../api/qiskit/0.28/qiskit.pulse.channels.mdx | 18 +++++++++++++ .../0.28/qiskit.pulse.library.discrete.mdx | 26 +++++++++---------- .../0.28/qiskit.scheduler.methods.basic.mdx | 4 +-- .../qiskit.scheduler.schedule_circuit.mdx | 2 +- 21 files changed, 91 insertions(+), 69 deletions(-) diff --git a/docs/api/qiskit/0.28/execute.mdx b/docs/api/qiskit/0.28/execute.mdx index fc524477aee..228fee36750 100644 --- a/docs/api/qiskit/0.28/execute.mdx +++ b/docs/api/qiskit/0.28/execute.mdx @@ -16,7 +16,7 @@ python_api_name: qiskit.execute_function `qiskit.execute_function` -### execute +## execute Execute a list of [`qiskit.circuit.QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") or [`qiskit.pulse.Schedule`](qiskit.pulse.Schedule "qiskit.pulse.Schedule") on a backend. diff --git a/docs/api/qiskit/0.28/logging.mdx b/docs/api/qiskit/0.28/logging.mdx index 423000acd53..0bbcd2aac82 100644 --- a/docs/api/qiskit/0.28/logging.mdx +++ b/docs/api/qiskit/0.28/logging.mdx @@ -22,6 +22,8 @@ python_api_name: qiskit.ignis.logging | [`IgnisLogging`](qiskit.ignis.logging.IgnisLogging "qiskit.ignis.logging.IgnisLogging")(\[log\_config\_path]) | Singleton class to configure file logging via IgnisLogger | | [`IgnisLogReader`](qiskit.ignis.logging.IgnisLogReader "qiskit.ignis.logging.IgnisLogReader")() | Class to read from Ignis log files | +### + A logger class for Ignis diff --git a/docs/api/qiskit/0.28/qiskit.finance.applications.ising.portfolio.mdx b/docs/api/qiskit/0.28/qiskit.finance.applications.ising.portfolio.mdx index f18caa2feb6..e0294179645 100644 --- a/docs/api/qiskit/0.28/qiskit.finance.applications.ising.portfolio.mdx +++ b/docs/api/qiskit/0.28/qiskit.finance.applications.ising.portfolio.mdx @@ -22,31 +22,31 @@ Convert portfolio optimization instances into Pauli list | [`portfolio_variance`](#qiskit.finance.applications.ising.portfolio.portfolio_variance "qiskit.finance.applications.ising.portfolio.portfolio_variance")(x, sigma) | returns portfolio variance | | [`random_model`](#qiskit.finance.applications.ising.portfolio.random_model "qiskit.finance.applications.ising.portfolio.random_model")(n\[, seed]) | Generate random model (mu, sigma) for portfolio optimization problem. | -### get\_operator +## get\_operator get qubit op -### portfolio\_expected\_value +## portfolio\_expected\_value returns portfolio expected value -### portfolio\_value +## portfolio\_value returns portfolio value -### portfolio\_variance +## portfolio\_variance returns portfolio variance -### random\_model +## random\_model Generate random model (mu, sigma) for portfolio optimization problem. diff --git a/docs/api/qiskit/0.28/qiskit.finance.applications.ising.portfolio_diversification.mdx b/docs/api/qiskit/0.28/qiskit.finance.applications.ising.portfolio_diversification.mdx index fe7f32b7f77..cf668990693 100644 --- a/docs/api/qiskit/0.28/qiskit.finance.applications.ising.portfolio_diversification.mdx +++ b/docs/api/qiskit/0.28/qiskit.finance.applications.ising.portfolio_diversification.mdx @@ -20,7 +20,7 @@ portfolio diversification | [`get_portfoliodiversification_solution`](#qiskit.finance.applications.ising.portfolio_diversification.get_portfoliodiversification_solution "qiskit.finance.applications.ising.portfolio_diversification.get_portfoliodiversification_solution")(rho, …) | Tries to obtain a feasible solution (in vector form) of an instance of portfolio diversification from the results dictionary. | | [`get_portfoliodiversification_value`](#qiskit.finance.applications.ising.portfolio_diversification.get_portfoliodiversification_value "qiskit.finance.applications.ising.portfolio_diversification.get_portfoliodiversification_value")(rho, n, …) | Evaluates an objective function of an instance of portfolio diversification and its solution (in vector form). | -### get\_operator +## get\_operator Converts an instance of portfolio optimization into a list of Paulis. @@ -40,7 +40,7 @@ portfolio diversification operator for the Hamiltonian -### get\_portfoliodiversification\_solution +## get\_portfoliodiversification\_solution Tries to obtain a feasible solution (in vector form) of an instance of portfolio diversification from the results dictionary. @@ -61,7 +61,7 @@ portfolio diversification a vector describing the solution. -### get\_portfoliodiversification\_value +## get\_portfoliodiversification\_value Evaluates an objective function of an instance of portfolio diversification and its solution (in vector form). diff --git a/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.clique.mdx b/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.clique.mdx index f669f8f060a..35741b1b529 100644 --- a/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.clique.mdx +++ b/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.clique.mdx @@ -22,7 +22,7 @@ Deal with Gset format. See [https://web.stanford.edu/\~yyye/yyye/Gset/](https:// | [`get_operator`](#qiskit.optimization.applications.ising.clique.get_operator "qiskit.optimization.applications.ising.clique.get_operator")(weight\_matrix, K) | Generate Hamiltonian for the clique. | | [`satisfy_or_not`](#qiskit.optimization.applications.ising.clique.satisfy_or_not "qiskit.optimization.applications.ising.clique.satisfy_or_not")(x, w, K) | Compute the value of a cut. | -### get\_graph\_solution +## get\_graph\_solution Get graph solution from binary string. @@ -40,7 +40,7 @@ Deal with Gset format. See [https://web.stanford.edu/\~yyye/yyye/Gset/](https:// numpy.ndarray -### get\_operator +## get\_operator Generate Hamiltonian for the clique. @@ -81,7 +81,7 @@ Deal with Gset format. See [https://web.stanford.edu/\~yyye/yyye/Gset/](https:// tuple([WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator"), float) -### satisfy\_or\_not +## satisfy\_or\_not Compute the value of a cut. diff --git a/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.common.mdx b/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.common.mdx index a5f743f7334..fa50b3495e6 100644 --- a/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.common.mdx +++ b/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.common.mdx @@ -23,7 +23,7 @@ common module | [`read_numbers_from_file`](#qiskit.optimization.applications.ising.common.read_numbers_from_file "qiskit.optimization.applications.ising.common.read_numbers_from_file")(filename) | Read numbers from a file | | [`sample_most_likely`](#qiskit.optimization.applications.ising.common.sample_most_likely "qiskit.optimization.applications.ising.common.sample_most_likely")(state\_vector) | Compute the most likely binary string from state vector. | -### get\_gset\_result +## get\_gset\_result Get graph solution in Gset format from binary string. @@ -41,7 +41,7 @@ common module Dict\[int, int] -### parse\_gset\_format +## parse\_gset\_format Read graph in Gset format from file. @@ -59,7 +59,7 @@ common module numpy.ndarray -### random\_graph +## random\_graph Generate random Erdos-Renyi graph. @@ -82,7 +82,7 @@ common module numpy.ndarray -### random\_number\_list +## random\_number\_list Generate a set of positive integers within the given range. @@ -103,7 +103,7 @@ common module numpy.ndarray -### read\_numbers\_from\_file +## read\_numbers\_from\_file Read numbers from a file @@ -121,7 +121,7 @@ common module numpy.ndarray -### sample\_most\_likely +## sample\_most\_likely Compute the most likely binary string from state vector. :param state\_vector: state vector or counts. :type state\_vector: numpy.ndarray or dict diff --git a/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.docplex.mdx b/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.docplex.mdx index b2b31b7a696..66792a0de9d 100644 --- a/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.docplex.mdx +++ b/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.docplex.mdx @@ -58,7 +58,7 @@ print('tsp objective:', result['energy'] + offset) | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- | | [`get_operator`](#qiskit.optimization.applications.ising.docplex.get_operator "qiskit.optimization.applications.ising.docplex.get_operator")(mdl\[, auto\_penalty, …]) | Generate Ising Hamiltonian from a model of DOcplex. | -### get\_operator +## get\_operator Generate Ising Hamiltonian from a model of DOcplex. diff --git a/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.exact_cover.mdx b/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.exact_cover.mdx index 28d740b7457..059a91fed55 100644 --- a/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.exact_cover.mdx +++ b/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.exact_cover.mdx @@ -20,13 +20,13 @@ exact cover | [`get_operator`](#qiskit.optimization.applications.ising.exact_cover.get_operator "qiskit.optimization.applications.ising.exact_cover.get_operator")(list\_of\_subsets) | Construct the Hamiltonian for the exact solver problem. | | [`get_solution`](#qiskit.optimization.applications.ising.exact_cover.get_solution "qiskit.optimization.applications.ising.exact_cover.get_solution")(x) | **param x**binary string as numpy array. | -### check\_solution\_satisfiability +## check\_solution\_satisfiability check solution satisfiability -### get\_operator +## get\_operator Construct the Hamiltonian for the exact solver problem. @@ -54,7 +54,7 @@ exact cover tuple([WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator"), float) -### get\_solution +## get\_solution **Parameters** diff --git a/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.graph_partition.mdx b/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.graph_partition.mdx index 121bdcbef22..a7db2c3b37b 100644 --- a/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.graph_partition.mdx +++ b/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.graph_partition.mdx @@ -20,7 +20,7 @@ Convert graph partitioning instances into Pauli list Deal with Gset format. See | [`get_operator`](#qiskit.optimization.applications.ising.graph_partition.get_operator "qiskit.optimization.applications.ising.graph_partition.get_operator")(weight\_matrix) | Generate Hamiltonian for the graph partitioning | | [`objective_value`](#qiskit.optimization.applications.ising.graph_partition.objective_value "qiskit.optimization.applications.ising.graph_partition.objective_value")(x, w) | Compute the value of a cut. | -### get\_graph\_solution +## get\_graph\_solution Get graph solution from binary string. @@ -38,7 +38,7 @@ Convert graph partitioning instances into Pauli list Deal with Gset format. See numpy.ndarray -### get\_operator +## get\_operator Generate Hamiltonian for the graph partitioning @@ -66,7 +66,7 @@ Convert graph partitioning instances into Pauli list Deal with Gset format. See [WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator") -### objective\_value +## objective\_value Compute the value of a cut. diff --git a/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.knapsack.mdx b/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.knapsack.mdx index 489c461335a..54844e44843 100644 --- a/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.knapsack.mdx +++ b/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.knapsack.mdx @@ -24,7 +24,7 @@ If we have the weights w\[i], the values v\[i] and the maximum weight W\_max. We | [`get_solution`](#qiskit.optimization.applications.ising.knapsack.get_solution "qiskit.optimization.applications.ising.knapsack.get_solution")(x, values) | Get the solution to the knapsack problem from the bitstring that represents to the ground state of the Hamiltonian | | [`knapsack_value_weight`](#qiskit.optimization.applications.ising.knapsack.knapsack_value_weight "qiskit.optimization.applications.ising.knapsack.knapsack_value_weight")(solution, values, weights) | Get the total wight and value of the items taken in the knapsack. | -### get\_operator +## get\_operator Generate Hamiltonian for the knapsack problem. @@ -61,7 +61,7 @@ If we have the weights w\[i], the values v\[i] and the maximum weight W\_max. We * **ValueError** – max\_weight is negative -### get\_solution +## get\_solution Get the solution to the knapsack problem from the bitstring that represents to the ground state of the Hamiltonian @@ -82,7 +82,7 @@ If we have the weights w\[i], the values v\[i] and the maximum weight W\_max. We numpy.ndarray -### knapsack\_value\_weight +## knapsack\_value\_weight Get the total wight and value of the items taken in the knapsack. diff --git a/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.max_cut.mdx b/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.max_cut.mdx index 7dea52d672e..381092f365d 100644 --- a/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.max_cut.mdx +++ b/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.max_cut.mdx @@ -20,7 +20,7 @@ Convert max-cut instances into Pauli list Deal with Gset format. See [https://we | [`get_operator`](#qiskit.optimization.applications.ising.max_cut.get_operator "qiskit.optimization.applications.ising.max_cut.get_operator")(weight\_matrix) | Generate Hamiltonian for the max-cut problem of a graph. | | [`max_cut_value`](#qiskit.optimization.applications.ising.max_cut.max_cut_value "qiskit.optimization.applications.ising.max_cut.max_cut_value")(x, w) | Compute the value of a cut. | -### get\_graph\_solution +## get\_graph\_solution Get graph solution from binary string. @@ -38,7 +38,7 @@ Convert max-cut instances into Pauli list Deal with Gset format. See [https://we numpy.ndarray -### get\_operator +## get\_operator Generate Hamiltonian for the max-cut problem of a graph. @@ -56,7 +56,7 @@ Convert max-cut instances into Pauli list Deal with Gset format. See [https://we [WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator") -### max\_cut\_value +## max\_cut\_value Compute the value of a cut. diff --git a/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.partition.mdx b/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.partition.mdx index fb7326ebaa1..b4b6fc09c3c 100644 --- a/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.partition.mdx +++ b/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.partition.mdx @@ -19,7 +19,7 @@ Generate Number Partitioning (Partition) instances, and convert them into a Hami | [`get_operator`](#qiskit.optimization.applications.ising.partition.get_operator "qiskit.optimization.applications.ising.partition.get_operator")(values) | Construct the Hamiltonian for a given Partition instance. | | [`partition_value`](#qiskit.optimization.applications.ising.partition.partition_value "qiskit.optimization.applications.ising.partition.partition_value")(x, number\_list) | Compute the value of a partition. | -### get\_operator +## get\_operator Construct the Hamiltonian for a given Partition instance. @@ -39,7 +39,7 @@ Generate Number Partitioning (Partition) instances, and convert them into a Hami tuple([WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator"), float) -### partition\_value +## partition\_value Compute the value of a partition. diff --git a/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.set_packing.mdx b/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.set_packing.mdx index b3b839d6ccc..d888d9624c3 100644 --- a/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.set_packing.mdx +++ b/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.set_packing.mdx @@ -20,13 +20,13 @@ set packing module | [`get_operator`](#qiskit.optimization.applications.ising.set_packing.get_operator "qiskit.optimization.applications.ising.set_packing.get_operator")(list\_of\_subsets) | Construct the Hamiltonian for the set packing. | | [`get_solution`](#qiskit.optimization.applications.ising.set_packing.get_solution "qiskit.optimization.applications.ising.set_packing.get_solution")(x) | **param x**binary string as numpy array. | -### check\_disjoint +## check\_disjoint check disjoint -### get\_operator +## get\_operator Construct the Hamiltonian for the set packing. @@ -56,7 +56,7 @@ set packing module tuple([WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator"), float) -### get\_solution +## get\_solution **Parameters** diff --git a/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.stable_set.mdx b/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.stable_set.mdx index 3763b10ecd0..24b8facaba5 100644 --- a/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.stable_set.mdx +++ b/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.stable_set.mdx @@ -20,7 +20,7 @@ Convert stable set instances into Pauli list. We read instances in the Gset form | [`get_operator`](#qiskit.optimization.applications.ising.stable_set.get_operator "qiskit.optimization.applications.ising.stable_set.get_operator")(w) | Generate Hamiltonian for the maximum stable set in a graph. | | [`stable_set_value`](#qiskit.optimization.applications.ising.stable_set.stable_set_value "qiskit.optimization.applications.ising.stable_set.stable_set_value")(x, w) | Compute the value of a stable set, and its feasibility. | -### get\_graph\_solution +## get\_graph\_solution Get graph solution from binary string. @@ -38,7 +38,7 @@ Convert stable set instances into Pauli list. We read instances in the Gset form numpy.ndarray -### get\_operator +## get\_operator Generate Hamiltonian for the maximum stable set in a graph. @@ -56,7 +56,7 @@ Convert stable set instances into Pauli list. We read instances in the Gset form tuple([WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator"), float) -### stable\_set\_value +## stable\_set\_value Compute the value of a stable set, and its feasibility. diff --git a/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.tsp.mdx b/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.tsp.mdx index 8d100a34cdc..5ee95ef151e 100644 --- a/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.tsp.mdx +++ b/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.tsp.mdx @@ -30,6 +30,8 @@ Convert symmetric TSP instances into Pauli list Deal with TSPLIB format. It supp | ------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------- | | [`TspData`](#qiskit.optimization.applications.ising.tsp.TspData "qiskit.optimization.applications.ising.tsp.TspData")(name, dim, coord, w) | Create new instance of TspData(name, dim, coord, w) | +## TspData + Create new instance of TspData(name, dim, coord, w) @@ -72,13 +74,13 @@ Convert symmetric TSP instances into Pauli list Deal with TSPLIB format. It supp -### calc\_distance +## calc\_distance calculate distance -### get\_operator +## get\_operator Generate Hamiltonian for TSP of a graph. @@ -97,7 +99,7 @@ Convert symmetric TSP instances into Pauli list Deal with TSPLIB format. It supp tuple([WeightedPauliOperator](qiskit.aqua.operators.legacy.WeightedPauliOperator "qiskit.aqua.operators.legacy.WeightedPauliOperator"), float) -### get\_tsp\_solution +## get\_tsp\_solution Get graph solution from binary string. @@ -121,7 +123,7 @@ Convert symmetric TSP instances into Pauli list Deal with TSPLIB format. It supp Instance data of TSP -### parse\_tsplib\_format +## parse\_tsplib\_format Read graph in TSPLIB format from file. @@ -139,7 +141,7 @@ Instance data of TSP [TspData](#qiskit.optimization.applications.ising.tsp.TspData "qiskit.optimization.applications.ising.tsp.TspData") -### random\_tsp +## random\_tsp Generate a random instance for TSP. @@ -162,7 +164,7 @@ Instance data of TSP [TspData](#qiskit.optimization.applications.ising.tsp.TspData "qiskit.optimization.applications.ising.tsp.TspData") -### tsp\_feasible +## tsp\_feasible Check whether a solution is feasible or not. @@ -180,7 +182,7 @@ Instance data of TSP bool -### tsp\_value +## tsp\_value Compute the TSP value of a solution. diff --git a/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.vehicle_routing.mdx b/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.vehicle_routing.mdx index ea00e22f71f..af4baa5923a 100644 --- a/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.vehicle_routing.mdx +++ b/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.vehicle_routing.mdx @@ -21,7 +21,7 @@ Converts vehicle routing instances into a list of Paulis, and provides some rela | [`get_vehiclerouting_matrices`](#qiskit.optimization.applications.ising.vehicle_routing.get_vehiclerouting_matrices "qiskit.optimization.applications.ising.vehicle_routing.get_vehiclerouting_matrices")(instance, n, K) | Constructs auxiliary matrices from a vehicle routing instance, | | [`get_vehiclerouting_solution`](#qiskit.optimization.applications.ising.vehicle_routing.get_vehiclerouting_solution "qiskit.optimization.applications.ising.vehicle_routing.get_vehiclerouting_solution")(instance, n, K, …) | Tries to obtain a feasible solution (in vector form) of an instance | -### get\_operator +## get\_operator Converts an instance of a vehicle routing problem into a list of Paulis. @@ -41,7 +41,7 @@ Converts vehicle routing instances into a list of Paulis, and provides some rela operator for the Hamiltonian. -### get\_vehiclerouting\_cost +## get\_vehiclerouting\_cost Computes the cost of a solution to an instance of a vehicle routing problem. @@ -62,7 +62,7 @@ Converts vehicle routing instances into a list of Paulis, and provides some rela objective function value. -### get\_vehiclerouting\_matrices +## get\_vehiclerouting\_matrices **Constructs auxiliary matrices from a vehicle routing instance,** @@ -84,7 +84,7 @@ Converts vehicle routing instances into a list of Paulis, and provides some rela a matrix defining the interactions between variables. a matrix defining the contribution from the individual variables. the constant offset. -### get\_vehiclerouting\_solution +## get\_vehiclerouting\_solution **Tries to obtain a feasible solution (in vector form) of an instance** diff --git a/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.vertex_cover.mdx b/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.vertex_cover.mdx index ef51b82f49a..31058ef1e35 100644 --- a/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.vertex_cover.mdx +++ b/docs/api/qiskit/0.28/qiskit.optimization.applications.ising.vertex_cover.mdx @@ -20,7 +20,7 @@ Convert vertex cover instances into Pauli list Deal with Gset format. See [https | [`get_graph_solution`](#qiskit.optimization.applications.ising.vertex_cover.get_graph_solution "qiskit.optimization.applications.ising.vertex_cover.get_graph_solution")(x) | Get graph solution from binary string. | | [`get_operator`](#qiskit.optimization.applications.ising.vertex_cover.get_operator "qiskit.optimization.applications.ising.vertex_cover.get_operator")(weight\_matrix) | Generate Hamiltonian for the vertex cover :param weight\_matrix: adjacency matrix. | -### check\_full\_edge\_coverage +## check\_full\_edge\_coverage **Parameters** @@ -37,7 +37,7 @@ Convert vertex cover instances into Pauli list Deal with Gset format. See [https float -### get\_graph\_solution +## get\_graph\_solution Get graph solution from binary string. @@ -55,7 +55,7 @@ Convert vertex cover instances into Pauli list Deal with Gset format. See [https numpy.ndarray -### get\_operator +## get\_operator Generate Hamiltonian for the vertex cover :param weight\_matrix: adjacency matrix. :type weight\_matrix: numpy.ndarray diff --git a/docs/api/qiskit/0.28/qiskit.pulse.channels.mdx b/docs/api/qiskit/0.28/qiskit.pulse.channels.mdx index 606b0124c8a..7294a7feea2 100644 --- a/docs/api/qiskit/0.28/qiskit.pulse.channels.mdx +++ b/docs/api/qiskit/0.28/qiskit.pulse.channels.mdx @@ -32,6 +32,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s | [`RegisterSlot`](#qiskit.pulse.channels.RegisterSlot "qiskit.pulse.channels.RegisterSlot")(index) | Classical resister slot channels represent classical registers (low-latency classical memory). | | [`SnapshotChannel`](#qiskit.pulse.channels.SnapshotChannel "qiskit.pulse.channels.SnapshotChannel")(\*args, \*\*kwargs) | Snapshot channels are used to specify instructions for simulators. | +## AcquireChannel + Acquire channels are used to collect data. @@ -105,6 +107,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## Channel + Base class of channels. Channels provide a Qiskit-side label for typical quantum control hardware signal channels. The final label -> physical channel mapping is the responsibility of the hardware backend. For instance, `DriveChannel(0)` holds instructions which the backend should map to the signal line driving gate operations on the qubit labeled (indexed) 0. @@ -188,6 +192,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## ControlChannel + Control channels provide supplementary control over the qubit to the drive channel. These are often associated with multi-qubit gate operations. They may not map trivially to a particular qubit index. @@ -261,6 +267,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## DriveChannel + Drive channels transmit signals to qubits which enact gate operations. @@ -334,6 +342,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## MeasureChannel + Measure channels transmit measurement stimulus pulses for readout. @@ -407,6 +417,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## MemorySlot + Memory slot channels represent classical memory storage. @@ -480,6 +492,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## PulseChannel + Base class of transmit Channels. Pulses can be played on these channels. @@ -553,6 +567,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## RegisterSlot + Classical resister slot channels represent classical registers (low-latency classical memory). @@ -626,6 +642,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s +## SnapshotChannel + Snapshot channels are used to specify instructions for simulators. diff --git a/docs/api/qiskit/0.28/qiskit.pulse.library.discrete.mdx b/docs/api/qiskit/0.28/qiskit.pulse.library.discrete.mdx index 9dd441f9b77..12064733304 100644 --- a/docs/api/qiskit/0.28/qiskit.pulse.library.discrete.mdx +++ b/docs/api/qiskit/0.28/qiskit.pulse.library.discrete.mdx @@ -32,7 +32,7 @@ Note the sampling strategy use for all discrete pulses is `midpoint`. | [`triangle`](#qiskit.pulse.library.discrete.triangle "qiskit.pulse.library.discrete.triangle")(duration, amp\[, freq, phase, name]) | Generates triangle wave [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). | | [`zero`](#qiskit.pulse.library.discrete.zero "qiskit.pulse.library.discrete.zero")(duration\[, name]) | Generates zero-sampled [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). | -### constant +## constant Generates constant-sampled [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -54,7 +54,7 @@ $$ `Waveform` -### cos +## cos Generates cosine wave [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -78,7 +78,7 @@ $$ `Waveform` -### drag +## drag Generates Y-only correction DRAG [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform") for standard nonlinear oscillator (SNO) \[1]. @@ -111,7 +111,7 @@ $$ `Waveform` -### gaussian +## gaussian Generates unnormalized gaussian [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -147,7 +147,7 @@ $$ `Waveform` -### gaussian\_deriv +## gaussian\_deriv Generates unnormalized gaussian derivative [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -172,7 +172,7 @@ $$ `Waveform` -### gaussian\_square +## gaussian\_square Generates gaussian square [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -210,7 +210,7 @@ $$ `Waveform` -### sawtooth +## sawtooth Generates sawtooth wave [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -256,7 +256,7 @@ $$ `Waveform` -### sech +## sech Generates unnormalized sech [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -290,7 +290,7 @@ $$ `Waveform` -### sech\_deriv +## sech\_deriv Generates unnormalized sech derivative [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -315,7 +315,7 @@ $$ `Waveform` -### sin +## sin Generates sine wave [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -339,7 +339,7 @@ $$ `Waveform` -### square +## square Generates square wave [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -365,7 +365,7 @@ $$ `Waveform` -### triangle +## triangle Generates triangle wave [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). @@ -411,7 +411,7 @@ $$ `Waveform` -### zero +## zero Generates zero-sampled [`Waveform`](qiskit.pulse.Waveform "qiskit.pulse.Waveform"). diff --git a/docs/api/qiskit/0.28/qiskit.scheduler.methods.basic.mdx b/docs/api/qiskit/0.28/qiskit.scheduler.methods.basic.mdx index e22550e75a0..aa526e58968 100644 --- a/docs/api/qiskit/0.28/qiskit.scheduler.methods.basic.mdx +++ b/docs/api/qiskit/0.28/qiskit.scheduler.methods.basic.mdx @@ -19,7 +19,7 @@ The most straightforward scheduling methods: scheduling **as early** or **as lat | [`as_late_as_possible`](#qiskit.scheduler.methods.basic.as_late_as_possible "qiskit.scheduler.methods.basic.as_late_as_possible")(circuit, schedule\_config) | Return the pulse Schedule which implements the input circuit using an “as late as possible” (alap) scheduling policy. | | [`as_soon_as_possible`](#qiskit.scheduler.methods.basic.as_soon_as_possible "qiskit.scheduler.methods.basic.as_soon_as_possible")(circuit, schedule\_config) | Return the pulse Schedule which implements the input circuit using an “as soon as possible” (asap) scheduling policy. | -### as\_late\_as\_possible +## as\_late\_as\_possible Return the pulse Schedule which implements the input circuit using an “as late as possible” (alap) scheduling policy. @@ -42,7 +42,7 @@ The most straightforward scheduling methods: scheduling **as early** or **as lat A schedule corresponding to the input `circuit` with pulses occurring as late as possible. -### as\_soon\_as\_possible +## as\_soon\_as\_possible Return the pulse Schedule which implements the input circuit using an “as soon as possible” (asap) scheduling policy. diff --git a/docs/api/qiskit/0.28/qiskit.scheduler.schedule_circuit.mdx b/docs/api/qiskit/0.28/qiskit.scheduler.schedule_circuit.mdx index 1a83d905ff3..4598b7943e8 100644 --- a/docs/api/qiskit/0.28/qiskit.scheduler.schedule_circuit.mdx +++ b/docs/api/qiskit/0.28/qiskit.scheduler.schedule_circuit.mdx @@ -18,7 +18,7 @@ QuantumCircuit to Pulse scheduler. | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | | [`schedule_circuit`](#qiskit.scheduler.schedule_circuit.schedule_circuit "qiskit.scheduler.schedule_circuit.schedule_circuit")(circuit, schedule\_config\[, …]) | Basic scheduling pass from a circuit to a pulse Schedule, using the backend. | -### schedule\_circuit +## schedule\_circuit Basic scheduling pass from a circuit to a pulse Schedule, using the backend. If no method is specified, then a basic, as late as possible scheduling pass is performed, i.e. pulses are scheduled to occur as late as possible. From 1db7fc694b3fe135143d207c16bc5646737cafca Mon Sep 17 00:00:00 2001 From: Arnau Casau Date: Fri, 3 May 2024 11:03:34 +0200 Subject: [PATCH 10/31] Regenerate qiskit 0.29.1 --- docs/api/qiskit/0.29/execute.mdx | 2 +- docs/api/qiskit/0.29/logging.mdx | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/api/qiskit/0.29/execute.mdx b/docs/api/qiskit/0.29/execute.mdx index fc524477aee..228fee36750 100644 --- a/docs/api/qiskit/0.29/execute.mdx +++ b/docs/api/qiskit/0.29/execute.mdx @@ -16,7 +16,7 @@ python_api_name: qiskit.execute_function `qiskit.execute_function` -### execute +## execute Execute a list of [`qiskit.circuit.QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") or [`qiskit.pulse.Schedule`](qiskit.pulse.Schedule "qiskit.pulse.Schedule") on a backend. diff --git a/docs/api/qiskit/0.29/logging.mdx b/docs/api/qiskit/0.29/logging.mdx index 423000acd53..0bbcd2aac82 100644 --- a/docs/api/qiskit/0.29/logging.mdx +++ b/docs/api/qiskit/0.29/logging.mdx @@ -22,6 +22,8 @@ python_api_name: qiskit.ignis.logging | [`IgnisLogging`](qiskit.ignis.logging.IgnisLogging "qiskit.ignis.logging.IgnisLogging")(\[log\_config\_path]) | Singleton class to configure file logging via IgnisLogger | | [`IgnisLogReader`](qiskit.ignis.logging.IgnisLogReader "qiskit.ignis.logging.IgnisLogReader")() | Class to read from Ignis log files | +### + A logger class for Ignis From c2c8224106f2ac41b63811468c09a94aa8d1afde Mon Sep 17 00:00:00 2001 From: Arnau Casau Date: Fri, 3 May 2024 11:06:14 +0200 Subject: [PATCH 11/31] Regenerate qiskit 0.30.1 --- docs/api/qiskit/0.30/execute.mdx | 2 +- docs/api/qiskit/0.30/logging.mdx | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/api/qiskit/0.30/execute.mdx b/docs/api/qiskit/0.30/execute.mdx index fc524477aee..228fee36750 100644 --- a/docs/api/qiskit/0.30/execute.mdx +++ b/docs/api/qiskit/0.30/execute.mdx @@ -16,7 +16,7 @@ python_api_name: qiskit.execute_function `qiskit.execute_function` -### execute +## execute Execute a list of [`qiskit.circuit.QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") or [`qiskit.pulse.Schedule`](qiskit.pulse.Schedule "qiskit.pulse.Schedule") on a backend. diff --git a/docs/api/qiskit/0.30/logging.mdx b/docs/api/qiskit/0.30/logging.mdx index 423000acd53..0bbcd2aac82 100644 --- a/docs/api/qiskit/0.30/logging.mdx +++ b/docs/api/qiskit/0.30/logging.mdx @@ -22,6 +22,8 @@ python_api_name: qiskit.ignis.logging | [`IgnisLogging`](qiskit.ignis.logging.IgnisLogging "qiskit.ignis.logging.IgnisLogging")(\[log\_config\_path]) | Singleton class to configure file logging via IgnisLogger | | [`IgnisLogReader`](qiskit.ignis.logging.IgnisLogReader "qiskit.ignis.logging.IgnisLogReader")() | Class to read from Ignis log files | +### + A logger class for Ignis From 15fd5e44e9abb39fc63a8d4bd288bc2bd366cb9b Mon Sep 17 00:00:00 2001 From: Arnau Casau Date: Fri, 3 May 2024 11:08:54 +0200 Subject: [PATCH 12/31] Regenerate qiskit 0.31.0 --- docs/api/qiskit/0.31/execute.mdx | 2 +- docs/api/qiskit/0.31/logging.mdx | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/api/qiskit/0.31/execute.mdx b/docs/api/qiskit/0.31/execute.mdx index fc524477aee..228fee36750 100644 --- a/docs/api/qiskit/0.31/execute.mdx +++ b/docs/api/qiskit/0.31/execute.mdx @@ -16,7 +16,7 @@ python_api_name: qiskit.execute_function `qiskit.execute_function` -### execute +## execute Execute a list of [`qiskit.circuit.QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") or [`qiskit.pulse.Schedule`](qiskit.pulse.Schedule "qiskit.pulse.Schedule") on a backend. diff --git a/docs/api/qiskit/0.31/logging.mdx b/docs/api/qiskit/0.31/logging.mdx index 423000acd53..0bbcd2aac82 100644 --- a/docs/api/qiskit/0.31/logging.mdx +++ b/docs/api/qiskit/0.31/logging.mdx @@ -22,6 +22,8 @@ python_api_name: qiskit.ignis.logging | [`IgnisLogging`](qiskit.ignis.logging.IgnisLogging "qiskit.ignis.logging.IgnisLogging")(\[log\_config\_path]) | Singleton class to configure file logging via IgnisLogger | | [`IgnisLogReader`](qiskit.ignis.logging.IgnisLogReader "qiskit.ignis.logging.IgnisLogReader")() | Class to read from Ignis log files | +### + A logger class for Ignis From 9395f59e7b7beb7e14ed76ac15e3c3bbeed76d92 Mon Sep 17 00:00:00 2001 From: Arnau Casau Date: Fri, 3 May 2024 11:11:16 +0200 Subject: [PATCH 13/31] Regenerate qiskit 0.32.1 --- docs/api/qiskit/0.32/execute.mdx | 2 +- docs/api/qiskit/0.32/logging.mdx | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/api/qiskit/0.32/execute.mdx b/docs/api/qiskit/0.32/execute.mdx index fc524477aee..228fee36750 100644 --- a/docs/api/qiskit/0.32/execute.mdx +++ b/docs/api/qiskit/0.32/execute.mdx @@ -16,7 +16,7 @@ python_api_name: qiskit.execute_function `qiskit.execute_function` -### execute +## execute Execute a list of [`qiskit.circuit.QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") or [`qiskit.pulse.Schedule`](qiskit.pulse.Schedule "qiskit.pulse.Schedule") on a backend. diff --git a/docs/api/qiskit/0.32/logging.mdx b/docs/api/qiskit/0.32/logging.mdx index 423000acd53..0bbcd2aac82 100644 --- a/docs/api/qiskit/0.32/logging.mdx +++ b/docs/api/qiskit/0.32/logging.mdx @@ -22,6 +22,8 @@ python_api_name: qiskit.ignis.logging | [`IgnisLogging`](qiskit.ignis.logging.IgnisLogging "qiskit.ignis.logging.IgnisLogging")(\[log\_config\_path]) | Singleton class to configure file logging via IgnisLogger | | [`IgnisLogReader`](qiskit.ignis.logging.IgnisLogReader "qiskit.ignis.logging.IgnisLogReader")() | Class to read from Ignis log files | +### + A logger class for Ignis From c85274d6e0812dd62833a378d86d6c8c0a15139f Mon Sep 17 00:00:00 2001 From: Arnau Casau Date: Fri, 3 May 2024 11:13:02 +0200 Subject: [PATCH 14/31] Regenerate qiskit 0.33.1 --- docs/api/qiskit/0.33/execute.mdx | 2 +- docs/api/qiskit/0.33/logging.mdx | 2 ++ docs/api/qiskit/0.33/pulse.mdx | 8 ++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/api/qiskit/0.33/execute.mdx b/docs/api/qiskit/0.33/execute.mdx index 5dbd0af2abe..a755b260117 100644 --- a/docs/api/qiskit/0.33/execute.mdx +++ b/docs/api/qiskit/0.33/execute.mdx @@ -16,7 +16,7 @@ python_api_name: qiskit.execute_function `qiskit.execute_function` -### execute +## execute Execute a list of [`qiskit.circuit.QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") or [`qiskit.pulse.Schedule`](qiskit.pulse.Schedule "qiskit.pulse.Schedule") on a backend. diff --git a/docs/api/qiskit/0.33/logging.mdx b/docs/api/qiskit/0.33/logging.mdx index 0f21d53ffeb..387a3858281 100644 --- a/docs/api/qiskit/0.33/logging.mdx +++ b/docs/api/qiskit/0.33/logging.mdx @@ -22,6 +22,8 @@ python_api_name: qiskit.ignis.logging | [`IgnisLogging`](qiskit.ignis.logging.IgnisLogging "qiskit.ignis.logging.IgnisLogging")(\[log\_config\_path]) | Singleton class to configure file logging via IgnisLogger | | [`IgnisLogReader`](qiskit.ignis.logging.IgnisLogReader "qiskit.ignis.logging.IgnisLogReader")() | Class to read from Ignis log files | +### + A logger class for Ignis diff --git a/docs/api/qiskit/0.33/pulse.mdx b/docs/api/qiskit/0.33/pulse.mdx index 53ec8416d3c..e16f8733c2e 100644 --- a/docs/api/qiskit/0.33/pulse.mdx +++ b/docs/api/qiskit/0.33/pulse.mdx @@ -64,6 +64,8 @@ An instruction can be added to a [`Schedule`](qiskit.pulse.Schedule "qiskit.puls These are all instances of the same base class: +### Instruction + The smallest schedulable unit: a single instruction. It has a fixed duration and specified channels. @@ -137,6 +139,8 @@ Novel channel types can often utilize the [`ControlChannel`](qiskit.pulse.channe All channels are children of the same abstract base class: +### Channel + Base class of channels. Channels provide a Qiskit-side label for typical quantum control hardware signal channels. The final label -> physical channel mapping is the responsibility of the hardware backend. For instance, `DriveChannel(0)` holds instructions which the backend should map to the signal line driving gate operations on the qubit labeled (indexed) 0. @@ -186,6 +190,8 @@ The alignment transforms define alignment policies of instructions in [`Schedule These are all subtypes of the abstract base class [`AlignmentKind`](#qiskit.pulse.transforms.AlignmentKind "qiskit.pulse.transforms.AlignmentKind"). +#### AlignmentKind + An abstract class for schedule alignment. @@ -626,6 +632,8 @@ There are 1e-06 seconds in 4500 samples. ## Exceptions +### PulseError + Errors raised by the pulse module. From 82ef189d37dc3c197058395b4d5d552cc54e5513 Mon Sep 17 00:00:00 2001 From: Arnau Casau Date: Fri, 3 May 2024 11:15:07 +0200 Subject: [PATCH 15/31] Regenerate qiskit 0.35.0 --- docs/api/qiskit/0.35/execute.mdx | 2 +- docs/api/qiskit/0.35/logging.mdx | 2 ++ docs/api/qiskit/0.35/pulse.mdx | 8 ++++++++ docs/api/qiskit/0.35/utils.mdx | 16 +++++++++++----- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/docs/api/qiskit/0.35/execute.mdx b/docs/api/qiskit/0.35/execute.mdx index 97fa184f2cf..8c723b59199 100644 --- a/docs/api/qiskit/0.35/execute.mdx +++ b/docs/api/qiskit/0.35/execute.mdx @@ -16,7 +16,7 @@ python_api_name: qiskit.execute_function `qiskit.execute_function` -### execute +## execute Execute a list of [`qiskit.circuit.QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") or [`qiskit.pulse.Schedule`](qiskit.pulse.Schedule "qiskit.pulse.Schedule") on a backend. diff --git a/docs/api/qiskit/0.35/logging.mdx b/docs/api/qiskit/0.35/logging.mdx index 0f21d53ffeb..387a3858281 100644 --- a/docs/api/qiskit/0.35/logging.mdx +++ b/docs/api/qiskit/0.35/logging.mdx @@ -22,6 +22,8 @@ python_api_name: qiskit.ignis.logging | [`IgnisLogging`](qiskit.ignis.logging.IgnisLogging "qiskit.ignis.logging.IgnisLogging")(\[log\_config\_path]) | Singleton class to configure file logging via IgnisLogger | | [`IgnisLogReader`](qiskit.ignis.logging.IgnisLogReader "qiskit.ignis.logging.IgnisLogReader")() | Class to read from Ignis log files | +### + A logger class for Ignis diff --git a/docs/api/qiskit/0.35/pulse.mdx b/docs/api/qiskit/0.35/pulse.mdx index dba8ef19e66..df71f32d939 100644 --- a/docs/api/qiskit/0.35/pulse.mdx +++ b/docs/api/qiskit/0.35/pulse.mdx @@ -64,6 +64,8 @@ An instruction can be added to a [`Schedule`](qiskit.pulse.Schedule "qiskit.puls These are all instances of the same base class: +### Instruction + The smallest schedulable unit: a single instruction. It has a fixed duration and specified channels. @@ -137,6 +139,8 @@ Novel channel types can often utilize the [`ControlChannel`](qiskit.pulse.channe All channels are children of the same abstract base class: +### Channel + Base class of channels. Channels provide a Qiskit-side label for typical quantum control hardware signal channels. The final label -> physical channel mapping is the responsibility of the hardware backend. For instance, `DriveChannel(0)` holds instructions which the backend should map to the signal line driving gate operations on the qubit labeled (indexed) 0. @@ -186,6 +190,8 @@ The alignment transforms define alignment policies of instructions in [`Schedule These are all subtypes of the abstract base class [`AlignmentKind`](#qiskit.pulse.transforms.AlignmentKind "qiskit.pulse.transforms.AlignmentKind"). +#### AlignmentKind + An abstract class for schedule alignment. @@ -626,6 +632,8 @@ There are 1e-06 seconds in 4500 samples. ## Exceptions +### PulseError + Errors raised by the pulse module. diff --git a/docs/api/qiskit/0.35/utils.mdx b/docs/api/qiskit/0.35/utils.mdx index e44a6a98d5e..40ab693439a 100644 --- a/docs/api/qiskit/0.35/utils.mdx +++ b/docs/api/qiskit/0.35/utils.mdx @@ -105,6 +105,8 @@ Each of the lazy checkers is an instance of [`LazyDependencyManager`](#qiskit.ut from qiskit.utils import LazyImportTester ``` +#### LazyDependencyManager + A mananger for some optional features that are expensive to import, or to verify the existence of. @@ -143,7 +145,7 @@ from qiskit.utils import LazyImportTester * **install** – how to install this optional dependency. Passed to `MissingOptionalLibraryError` as the `pip_install` parameter. * **msg** – an extra message to include in the error raised if this is required. - ### \_is\_available + ##### \_is\_available Subclasses of [`LazyDependencyManager`](#qiskit.utils.LazyDependencyManager "qiskit.utils.LazyDependencyManager") should override this method to implement the actual test of availability. This method should return a Boolean, where `True` indicates that the dependency was available. This method will only ever be called once. @@ -153,13 +155,13 @@ from qiskit.utils import LazyImportTester `bool` - ### disable\_locally + ##### disable\_locally Create a context, during which the value of the dependency manager will be `False`. This means that within the context, any calls to this object will behave as if the dependency is not available, including raising errors. It is valid to call this method whether or not the dependency has already been evaluated. This is most useful in tests. - ### require\_in\_call + ##### require\_in\_call Create a decorator for callables that requires that the dependency is available when the decorated function or method is called. @@ -177,7 +179,7 @@ from qiskit.utils import LazyImportTester Callable - ### require\_in\_instance + ##### require\_in\_instance A class decorator that requires the dependency is available when the class is initialised. This decorator can be used even if the class does not define an `__init__` method. @@ -195,7 +197,7 @@ from qiskit.utils import LazyImportTester Callable - ### require\_now + ##### require\_now Eagerly attempt to import the dependencies in this object, and raise an exception if they cannot be imported. @@ -210,6 +212,8 @@ from qiskit.utils import LazyImportTester +#### LazyImportTester + A lazy dependency tester for importable Python modules. Any required objects will only be imported at the point that this object is tested for its Boolean value. @@ -222,6 +226,8 @@ from qiskit.utils import LazyImportTester **ValueError** – if no modules are given. +#### LazySubprocessTester + A lazy checker that a command-line tool is available. The command will only be run once, at the point that this object is checked for its Boolean value. From 28903b8907a8482ae8c97bcd8489bb0127b3f262 Mon Sep 17 00:00:00 2001 From: Arnau Casau Date: Fri, 3 May 2024 11:17:32 +0200 Subject: [PATCH 16/31] Regenerate qiskit 0.36.0 --- docs/api/qiskit/0.36/execute.mdx | 2 +- docs/api/qiskit/0.36/logging.mdx | 2 ++ docs/api/qiskit/0.36/pulse.mdx | 8 ++++++++ docs/api/qiskit/0.36/utils.mdx | 16 +++++++++++----- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/docs/api/qiskit/0.36/execute.mdx b/docs/api/qiskit/0.36/execute.mdx index 97fa184f2cf..8c723b59199 100644 --- a/docs/api/qiskit/0.36/execute.mdx +++ b/docs/api/qiskit/0.36/execute.mdx @@ -16,7 +16,7 @@ python_api_name: qiskit.execute_function `qiskit.execute_function` -### execute +## execute Execute a list of [`qiskit.circuit.QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") or [`qiskit.pulse.Schedule`](qiskit.pulse.Schedule "qiskit.pulse.Schedule") on a backend. diff --git a/docs/api/qiskit/0.36/logging.mdx b/docs/api/qiskit/0.36/logging.mdx index 0f21d53ffeb..387a3858281 100644 --- a/docs/api/qiskit/0.36/logging.mdx +++ b/docs/api/qiskit/0.36/logging.mdx @@ -22,6 +22,8 @@ python_api_name: qiskit.ignis.logging | [`IgnisLogging`](qiskit.ignis.logging.IgnisLogging "qiskit.ignis.logging.IgnisLogging")(\[log\_config\_path]) | Singleton class to configure file logging via IgnisLogger | | [`IgnisLogReader`](qiskit.ignis.logging.IgnisLogReader "qiskit.ignis.logging.IgnisLogReader")() | Class to read from Ignis log files | +### + A logger class for Ignis diff --git a/docs/api/qiskit/0.36/pulse.mdx b/docs/api/qiskit/0.36/pulse.mdx index c13b89b422b..6be4035bb43 100644 --- a/docs/api/qiskit/0.36/pulse.mdx +++ b/docs/api/qiskit/0.36/pulse.mdx @@ -64,6 +64,8 @@ An instruction can be added to a [`Schedule`](qiskit.pulse.Schedule "qiskit.puls These are all instances of the same base class: +### Instruction + The smallest schedulable unit: a single instruction. It has a fixed duration and specified channels. @@ -137,6 +139,8 @@ Novel channel types can often utilize the [`ControlChannel`](qiskit.pulse.channe All channels are children of the same abstract base class: +### Channel + Base class of channels. Channels provide a Qiskit-side label for typical quantum control hardware signal channels. The final label -> physical channel mapping is the responsibility of the hardware backend. For instance, `DriveChannel(0)` holds instructions which the backend should map to the signal line driving gate operations on the qubit labeled (indexed) 0. @@ -186,6 +190,8 @@ The alignment transforms define alignment policies of instructions in [`Schedule These are all subtypes of the abstract base class [`AlignmentKind`](#qiskit.pulse.transforms.AlignmentKind "qiskit.pulse.transforms.AlignmentKind"). +#### AlignmentKind + An abstract class for schedule alignment. @@ -626,6 +632,8 @@ There are 1e-06 seconds in 4500 samples. ## Exceptions +### PulseError + Errors raised by the pulse module. diff --git a/docs/api/qiskit/0.36/utils.mdx b/docs/api/qiskit/0.36/utils.mdx index e44a6a98d5e..40ab693439a 100644 --- a/docs/api/qiskit/0.36/utils.mdx +++ b/docs/api/qiskit/0.36/utils.mdx @@ -105,6 +105,8 @@ Each of the lazy checkers is an instance of [`LazyDependencyManager`](#qiskit.ut from qiskit.utils import LazyImportTester ``` +#### LazyDependencyManager + A mananger for some optional features that are expensive to import, or to verify the existence of. @@ -143,7 +145,7 @@ from qiskit.utils import LazyImportTester * **install** – how to install this optional dependency. Passed to `MissingOptionalLibraryError` as the `pip_install` parameter. * **msg** – an extra message to include in the error raised if this is required. - ### \_is\_available + ##### \_is\_available Subclasses of [`LazyDependencyManager`](#qiskit.utils.LazyDependencyManager "qiskit.utils.LazyDependencyManager") should override this method to implement the actual test of availability. This method should return a Boolean, where `True` indicates that the dependency was available. This method will only ever be called once. @@ -153,13 +155,13 @@ from qiskit.utils import LazyImportTester `bool` - ### disable\_locally + ##### disable\_locally Create a context, during which the value of the dependency manager will be `False`. This means that within the context, any calls to this object will behave as if the dependency is not available, including raising errors. It is valid to call this method whether or not the dependency has already been evaluated. This is most useful in tests. - ### require\_in\_call + ##### require\_in\_call Create a decorator for callables that requires that the dependency is available when the decorated function or method is called. @@ -177,7 +179,7 @@ from qiskit.utils import LazyImportTester Callable - ### require\_in\_instance + ##### require\_in\_instance A class decorator that requires the dependency is available when the class is initialised. This decorator can be used even if the class does not define an `__init__` method. @@ -195,7 +197,7 @@ from qiskit.utils import LazyImportTester Callable - ### require\_now + ##### require\_now Eagerly attempt to import the dependencies in this object, and raise an exception if they cannot be imported. @@ -210,6 +212,8 @@ from qiskit.utils import LazyImportTester +#### LazyImportTester + A lazy dependency tester for importable Python modules. Any required objects will only be imported at the point that this object is tested for its Boolean value. @@ -222,6 +226,8 @@ from qiskit.utils import LazyImportTester **ValueError** – if no modules are given. +#### LazySubprocessTester + A lazy checker that a command-line tool is available. The command will only be run once, at the point that this object is checked for its Boolean value. From 620d05fa42af536fc29294c3374703860b27b716 Mon Sep 17 00:00:00 2001 From: Arnau Casau Date: Fri, 3 May 2024 11:20:13 +0200 Subject: [PATCH 17/31] Regenerate qiskit 0.37.2 --- docs/api/qiskit/0.37/execute.mdx | 2 +- docs/api/qiskit/0.37/pulse.mdx | 8 ++++++++ docs/api/qiskit/0.37/utils.mdx | 16 +++++++++++----- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/docs/api/qiskit/0.37/execute.mdx b/docs/api/qiskit/0.37/execute.mdx index 082ed60c364..83ab60720c6 100644 --- a/docs/api/qiskit/0.37/execute.mdx +++ b/docs/api/qiskit/0.37/execute.mdx @@ -16,7 +16,7 @@ python_api_name: qiskit.execute_function `qiskit.execute_function` -### execute +## execute Execute a list of [`qiskit.circuit.QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") or [`qiskit.pulse.Schedule`](qiskit.pulse.Schedule "qiskit.pulse.Schedule") on a backend. diff --git a/docs/api/qiskit/0.37/pulse.mdx b/docs/api/qiskit/0.37/pulse.mdx index 3bd809502e7..87bdc7b85a8 100644 --- a/docs/api/qiskit/0.37/pulse.mdx +++ b/docs/api/qiskit/0.37/pulse.mdx @@ -64,6 +64,8 @@ An instruction can be added to a [`Schedule`](qiskit.pulse.Schedule "qiskit.puls These are all instances of the same base class: +### Instruction + The smallest schedulable unit: a single instruction. It has a fixed duration and specified channels. @@ -171,6 +173,8 @@ Novel channel types can often utilize the [`ControlChannel`](qiskit.pulse.channe All channels are children of the same abstract base class: +### Channel + Base class of channels. Channels provide a Qiskit-side label for typical quantum control hardware signal channels. The final label -> physical channel mapping is the responsibility of the hardware backend. For instance, `DriveChannel(0)` holds instructions which the backend should map to the signal line driving gate operations on the qubit labeled (indexed) 0. @@ -220,6 +224,8 @@ The alignment transforms define alignment policies of instructions in [`Schedule These are all subtypes of the abstract base class [`AlignmentKind`](#qiskit.pulse.transforms.AlignmentKind "qiskit.pulse.transforms.AlignmentKind"). +#### AlignmentKind + An abstract class for schedule alignment. @@ -660,6 +666,8 @@ There are 1e-06 seconds in 4500 samples. ## Exceptions +### PulseError + Errors raised by the pulse module. diff --git a/docs/api/qiskit/0.37/utils.mdx b/docs/api/qiskit/0.37/utils.mdx index 70d1a3fa83e..1378aa93901 100644 --- a/docs/api/qiskit/0.37/utils.mdx +++ b/docs/api/qiskit/0.37/utils.mdx @@ -107,6 +107,8 @@ Each of the lazy checkers is an instance of [`LazyDependencyManager`](#qiskit.ut from qiskit.utils import LazyImportTester ``` +#### LazyDependencyManager + A mananger for some optional features that are expensive to import, or to verify the existence of. @@ -145,7 +147,7 @@ from qiskit.utils import LazyImportTester * **install** – how to install this optional dependency. Passed to `MissingOptionalLibraryError` as the `pip_install` parameter. * **msg** – an extra message to include in the error raised if this is required. - ### \_is\_available + ##### \_is\_available Subclasses of [`LazyDependencyManager`](#qiskit.utils.LazyDependencyManager "qiskit.utils.LazyDependencyManager") should override this method to implement the actual test of availability. This method should return a Boolean, where `True` indicates that the dependency was available. This method will only ever be called once. @@ -155,13 +157,13 @@ from qiskit.utils import LazyImportTester `bool` - ### disable\_locally + ##### disable\_locally Create a context, during which the value of the dependency manager will be `False`. This means that within the context, any calls to this object will behave as if the dependency is not available, including raising errors. It is valid to call this method whether or not the dependency has already been evaluated. This is most useful in tests. - ### require\_in\_call + ##### require\_in\_call Create a decorator for callables that requires that the dependency is available when the decorated function or method is called. @@ -179,7 +181,7 @@ from qiskit.utils import LazyImportTester Callable - ### require\_in\_instance + ##### require\_in\_instance A class decorator that requires the dependency is available when the class is initialised. This decorator can be used even if the class does not define an `__init__` method. @@ -197,7 +199,7 @@ from qiskit.utils import LazyImportTester Callable - ### require\_now + ##### require\_now Eagerly attempt to import the dependencies in this object, and raise an exception if they cannot be imported. @@ -212,6 +214,8 @@ from qiskit.utils import LazyImportTester +#### LazyImportTester + A lazy dependency tester for importable Python modules. Any required objects will only be imported at the point that this object is tested for its Boolean value. @@ -224,6 +228,8 @@ from qiskit.utils import LazyImportTester **ValueError** – if no modules are given. +#### LazySubprocessTester + A lazy checker that a command-line tool is available. The command will only be run once, at the point that this object is checked for its Boolean value. From 8bcc0e63d9480cd0897877ef18289de90936710e Mon Sep 17 00:00:00 2001 From: Arnau Casau Date: Fri, 3 May 2024 11:22:51 +0200 Subject: [PATCH 18/31] Regenerate qiskit 0.38.0 --- docs/api/qiskit/0.38/execute.mdx | 2 +- docs/api/qiskit/0.38/pulse.mdx | 8 ++++++++ docs/api/qiskit/0.38/utils.mdx | 16 +++++++++++----- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/docs/api/qiskit/0.38/execute.mdx b/docs/api/qiskit/0.38/execute.mdx index 082ed60c364..83ab60720c6 100644 --- a/docs/api/qiskit/0.38/execute.mdx +++ b/docs/api/qiskit/0.38/execute.mdx @@ -16,7 +16,7 @@ python_api_name: qiskit.execute_function `qiskit.execute_function` -### execute +## execute Execute a list of [`qiskit.circuit.QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") or [`qiskit.pulse.Schedule`](qiskit.pulse.Schedule "qiskit.pulse.Schedule") on a backend. diff --git a/docs/api/qiskit/0.38/pulse.mdx b/docs/api/qiskit/0.38/pulse.mdx index cb64a0406bc..55e77c9823d 100644 --- a/docs/api/qiskit/0.38/pulse.mdx +++ b/docs/api/qiskit/0.38/pulse.mdx @@ -64,6 +64,8 @@ An instruction can be added to a [`Schedule`](qiskit.pulse.Schedule "qiskit.puls These are all instances of the same base class: +### Instruction + The smallest schedulable unit: a single instruction. It has a fixed duration and specified channels. @@ -171,6 +173,8 @@ Novel channel types can often utilize the [`ControlChannel`](qiskit.pulse.channe All channels are children of the same abstract base class: +### Channel + Base class of channels. Channels provide a Qiskit-side label for typical quantum control hardware signal channels. The final label -> physical channel mapping is the responsibility of the hardware backend. For instance, `DriveChannel(0)` holds instructions which the backend should map to the signal line driving gate operations on the qubit labeled (indexed) 0. @@ -220,6 +224,8 @@ The alignment transforms define alignment policies of instructions in [`Schedule These are all subtypes of the abstract base class [`AlignmentKind`](#qiskit.pulse.transforms.AlignmentKind "qiskit.pulse.transforms.AlignmentKind"). +#### AlignmentKind + An abstract class for schedule alignment. @@ -660,6 +666,8 @@ There are 1e-06 seconds in 4500 samples. ## Exceptions +### PulseError + Errors raised by the pulse module. diff --git a/docs/api/qiskit/0.38/utils.mdx b/docs/api/qiskit/0.38/utils.mdx index c4b62f7a419..dbea23c8055 100644 --- a/docs/api/qiskit/0.38/utils.mdx +++ b/docs/api/qiskit/0.38/utils.mdx @@ -107,6 +107,8 @@ Each of the lazy checkers is an instance of [`LazyDependencyManager`](#qiskit.ut from qiskit.utils import LazyImportTester ``` +#### LazyDependencyManager + A mananger for some optional features that are expensive to import, or to verify the existence of. @@ -145,7 +147,7 @@ from qiskit.utils import LazyImportTester * **install** – how to install this optional dependency. Passed to `MissingOptionalLibraryError` as the `pip_install` parameter. * **msg** – an extra message to include in the error raised if this is required. - ### \_is\_available + ##### \_is\_available Subclasses of [`LazyDependencyManager`](#qiskit.utils.LazyDependencyManager "qiskit.utils.LazyDependencyManager") should override this method to implement the actual test of availability. This method should return a Boolean, where `True` indicates that the dependency was available. This method will only ever be called once. @@ -155,13 +157,13 @@ from qiskit.utils import LazyImportTester `bool` - ### disable\_locally + ##### disable\_locally Create a context, during which the value of the dependency manager will be `False`. This means that within the context, any calls to this object will behave as if the dependency is not available, including raising errors. It is valid to call this method whether or not the dependency has already been evaluated. This is most useful in tests. - ### require\_in\_call + ##### require\_in\_call Create a decorator for callables that requires that the dependency is available when the decorated function or method is called. @@ -179,7 +181,7 @@ from qiskit.utils import LazyImportTester Callable - ### require\_in\_instance + ##### require\_in\_instance A class decorator that requires the dependency is available when the class is initialised. This decorator can be used even if the class does not define an `__init__` method. @@ -197,7 +199,7 @@ from qiskit.utils import LazyImportTester Callable - ### require\_now + ##### require\_now Eagerly attempt to import the dependencies in this object, and raise an exception if they cannot be imported. @@ -212,6 +214,8 @@ from qiskit.utils import LazyImportTester +#### LazyImportTester + A lazy dependency tester for importable Python modules. Any required objects will only be imported at the point that this object is tested for its Boolean value. @@ -224,6 +228,8 @@ from qiskit.utils import LazyImportTester **ValueError** – if no modules are given. +#### LazySubprocessTester + A lazy checker that a command-line tool is available. The command will only be run once, at the point that this object is checked for its Boolean value. From 5ab620156369faeb7b92da96d869a5444ad8f350 Mon Sep 17 00:00:00 2001 From: Arnau Casau Date: Fri, 3 May 2024 11:25:30 +0200 Subject: [PATCH 19/31] Regenerate qiskit 0.39.5 --- docs/api/qiskit/0.39/execute.mdx | 2 +- docs/api/qiskit/0.39/pulse.mdx | 10 ++++++++++ docs/api/qiskit/0.39/utils.mdx | 16 +++++++++++----- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/docs/api/qiskit/0.39/execute.mdx b/docs/api/qiskit/0.39/execute.mdx index 850debacc91..09f3a5533d7 100644 --- a/docs/api/qiskit/0.39/execute.mdx +++ b/docs/api/qiskit/0.39/execute.mdx @@ -16,7 +16,7 @@ python_api_name: qiskit.execute_function `qiskit.execute_function` -### execute +## execute Execute a list of [`qiskit.circuit.QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") or [`qiskit.pulse.Schedule`](qiskit.pulse.Schedule "qiskit.pulse.Schedule") on a backend. diff --git a/docs/api/qiskit/0.39/pulse.mdx b/docs/api/qiskit/0.39/pulse.mdx index 717fcb8cfee..8a515b22613 100644 --- a/docs/api/qiskit/0.39/pulse.mdx +++ b/docs/api/qiskit/0.39/pulse.mdx @@ -65,6 +65,8 @@ An instruction can be added to a [`Schedule`](qiskit.pulse.Schedule "qiskit.puls These are all instances of the same base class: +### Instruction + The smallest schedulable unit: a single instruction. It has a fixed duration and specified channels. @@ -167,6 +169,8 @@ Novel channel types can often utilize the [`ControlChannel`](qiskit.pulse.channe All channels are children of the same abstract base class: +### Channel + Base class of channels. Channels provide a Qiskit-side label for typical quantum control hardware signal channels. The final label -> physical channel mapping is the responsibility of the hardware backend. For instance, `DriveChannel(0)` holds instructions which the backend should map to the signal line driving gate operations on the qubit labeled (indexed) 0. @@ -183,6 +187,8 @@ All channels are children of the same abstract base class: And classical IO channels are children of: +### ClassicalIOChannel + Base class of classical IO channels. These cannot have instructions scheduled on them. @@ -230,6 +236,8 @@ The alignment transforms define alignment policies of instructions in [`Schedule These are all subtypes of the abstract base class [`AlignmentKind`](#qiskit.pulse.transforms.AlignmentKind "qiskit.pulse.transforms.AlignmentKind"). +#### AlignmentKind + An abstract class for schedule alignment. @@ -677,6 +685,8 @@ There are 1e-06 seconds in 4500 samples. ## Exceptions +### PulseError + Errors raised by the pulse module. diff --git a/docs/api/qiskit/0.39/utils.mdx b/docs/api/qiskit/0.39/utils.mdx index 345aa991ede..47c1d025eba 100644 --- a/docs/api/qiskit/0.39/utils.mdx +++ b/docs/api/qiskit/0.39/utils.mdx @@ -108,6 +108,8 @@ Each of the lazy checkers is an instance of [`LazyDependencyManager`](#qiskit.ut from qiskit.utils import LazyImportTester ``` +#### LazyDependencyManager + A mananger for some optional features that are expensive to import, or to verify the existence of. @@ -146,7 +148,7 @@ from qiskit.utils import LazyImportTester * **install** – how to install this optional dependency. Passed to `MissingOptionalLibraryError` as the `pip_install` parameter. * **msg** – an extra message to include in the error raised if this is required. - ### \_is\_available + ##### \_is\_available Subclasses of [`LazyDependencyManager`](#qiskit.utils.LazyDependencyManager "qiskit.utils.LazyDependencyManager") should override this method to implement the actual test of availability. This method should return a Boolean, where `True` indicates that the dependency was available. This method will only ever be called once. @@ -156,13 +158,13 @@ from qiskit.utils import LazyImportTester `bool` - ### disable\_locally + ##### disable\_locally Create a context, during which the value of the dependency manager will be `False`. This means that within the context, any calls to this object will behave as if the dependency is not available, including raising errors. It is valid to call this method whether or not the dependency has already been evaluated. This is most useful in tests. - ### require\_in\_call + ##### require\_in\_call Create a decorator for callables that requires that the dependency is available when the decorated function or method is called. @@ -180,7 +182,7 @@ from qiskit.utils import LazyImportTester Callable - ### require\_in\_instance + ##### require\_in\_instance A class decorator that requires the dependency is available when the class is initialised. This decorator can be used even if the class does not define an `__init__` method. @@ -198,7 +200,7 @@ from qiskit.utils import LazyImportTester Callable - ### require\_now + ##### require\_now Eagerly attempt to import the dependencies in this object, and raise an exception if they cannot be imported. @@ -213,6 +215,8 @@ from qiskit.utils import LazyImportTester +#### LazyImportTester + A lazy dependency tester for importable Python modules. Any required objects will only be imported at the point that this object is tested for its Boolean value. @@ -225,6 +229,8 @@ from qiskit.utils import LazyImportTester **ValueError** – if no modules are given. +#### LazySubprocessTester + A lazy checker that a command-line tool is available. The command will only be run once, at the point that this object is checked for its Boolean value. From f17ebf51a2cab84cf1cc7dd1d5ef159b97655f83 Mon Sep 17 00:00:00 2001 From: Arnau Casau Date: Fri, 3 May 2024 11:28:17 +0200 Subject: [PATCH 20/31] Regenerate qiskit 0.40.0 --- docs/api/qiskit/0.40/execute.mdx | 2 +- docs/api/qiskit/0.40/pulse.mdx | 8 ++++++++ docs/api/qiskit/0.40/qasm3.mdx | 6 ++++-- docs/api/qiskit/0.40/utils.mdx | 16 +++++++++++----- 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/docs/api/qiskit/0.40/execute.mdx b/docs/api/qiskit/0.40/execute.mdx index 2b629f86a4b..5e14670bd28 100644 --- a/docs/api/qiskit/0.40/execute.mdx +++ b/docs/api/qiskit/0.40/execute.mdx @@ -16,7 +16,7 @@ python_api_name: qiskit.execute_function `qiskit.execute_function` -### execute +## execute Execute a list of [`qiskit.circuit.QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") or [`qiskit.pulse.Schedule`](qiskit.pulse.Schedule "qiskit.pulse.Schedule") on a backend. diff --git a/docs/api/qiskit/0.40/pulse.mdx b/docs/api/qiskit/0.40/pulse.mdx index eab31e38062..c5a1eb31809 100644 --- a/docs/api/qiskit/0.40/pulse.mdx +++ b/docs/api/qiskit/0.40/pulse.mdx @@ -67,6 +67,8 @@ An instruction can be added to a [`Schedule`](qiskit.pulse.Schedule "qiskit.puls These are all instances of the same base class: +### Instruction + The smallest schedulable unit: a single instruction. It has a fixed duration and specified channels. @@ -171,6 +173,8 @@ Novel channel types can often utilize the [`ControlChannel`](qiskit.pulse.channe All channels are children of the same abstract base class: +### Channel + Base class of channels. Channels provide a Qiskit-side label for typical quantum control hardware signal channels. The final label -> physical channel mapping is the responsibility of the hardware backend. For instance, `DriveChannel(0)` holds instructions which the backend should map to the signal line driving gate operations on the qubit labeled (indexed) 0. @@ -222,6 +226,8 @@ The alignment transforms define alignment policies of instructions in [`Schedule These are all subtypes of the abstract base class [`AlignmentKind`](#qiskit.pulse.transforms.AlignmentKind "qiskit.pulse.transforms.AlignmentKind"). +#### AlignmentKind + An abstract class for schedule alignment. @@ -679,6 +685,8 @@ There are 1e-06 seconds in 4500 samples. ## Exceptions +### PulseError + Errors raised by the pulse module. diff --git a/docs/api/qiskit/0.40/qasm3.mdx b/docs/api/qiskit/0.40/qasm3.mdx index 751fc937706..c653d6c0c21 100644 --- a/docs/api/qiskit/0.40/qasm3.mdx +++ b/docs/api/qiskit/0.40/qasm3.mdx @@ -59,6 +59,8 @@ The high-level functions are simply [`dump()`](#qiskit.qasm3.dump "qiskit.qasm3. Both of these exporter functions are single-use wrappers around the main [`Exporter`](#qiskit.qasm3.Exporter "qiskit.qasm3.Exporter") class. For more complex exporting needs, including dumping multiple circuits in a single session, it may be more convenient or faster to use the complete interface. +### Exporter + QASM3 exporter main class. @@ -70,13 +72,13 @@ Both of these exporter functions are single-use wrappers around the main [`Expor * **alias\_classical\_registers** (`bool`) – If `True`, then classical bit and classical register declarations will look similar to quantum declarations, where the whole set of bits will be declared in a flat array, and the registers will just be aliases to collections of these bits. This is inefficient for running OpenQASM 3 programs, however, and may not be well supported on backends. Instead, the default behaviour of `False` means that individual classical registers will gain their own `bit[size] register;` declarations, and loose [`Clbit`](qiskit.circuit.Clbit "qiskit.circuit.Clbit")s will go onto their own declaration. In this form, each [`Clbit`](qiskit.circuit.Clbit "qiskit.circuit.Clbit") must be in either zero or one [`ClassicalRegister`](qiskit.circuit.ClassicalRegister "qiskit.circuit.ClassicalRegister")s. * **indent** (`str`) – the indentation string to use for each level within an indented block. Can be set to the empty string to disable indentation. - ### dump + #### dump Convert the circuit to QASM 3, dumping the result to a file or text stream. - ### dumps + #### dumps Convert the circuit to QASM 3, returning the result as a string. diff --git a/docs/api/qiskit/0.40/utils.mdx b/docs/api/qiskit/0.40/utils.mdx index 1e00b1ab4bb..f21ff8c8ce0 100644 --- a/docs/api/qiskit/0.40/utils.mdx +++ b/docs/api/qiskit/0.40/utils.mdx @@ -109,6 +109,8 @@ Each of the lazy checkers is an instance of [`LazyDependencyManager`](#qiskit.ut from qiskit.utils import LazyImportTester ``` +#### LazyDependencyManager + A mananger for some optional features that are expensive to import, or to verify the existence of. @@ -147,7 +149,7 @@ from qiskit.utils import LazyImportTester * **install** – how to install this optional dependency. Passed to `MissingOptionalLibraryError` as the `pip_install` parameter. * **msg** – an extra message to include in the error raised if this is required. - ### \_is\_available + ##### \_is\_available Subclasses of [`LazyDependencyManager`](#qiskit.utils.LazyDependencyManager "qiskit.utils.LazyDependencyManager") should override this method to implement the actual test of availability. This method should return a Boolean, where `True` indicates that the dependency was available. This method will only ever be called once. @@ -157,13 +159,13 @@ from qiskit.utils import LazyImportTester `bool` - ### disable\_locally + ##### disable\_locally Create a context, during which the value of the dependency manager will be `False`. This means that within the context, any calls to this object will behave as if the dependency is not available, including raising errors. It is valid to call this method whether or not the dependency has already been evaluated. This is most useful in tests. - ### require\_in\_call + ##### require\_in\_call Create a decorator for callables that requires that the dependency is available when the decorated function or method is called. @@ -181,7 +183,7 @@ from qiskit.utils import LazyImportTester Callable - ### require\_in\_instance + ##### require\_in\_instance A class decorator that requires the dependency is available when the class is initialised. This decorator can be used even if the class does not define an `__init__` method. @@ -199,7 +201,7 @@ from qiskit.utils import LazyImportTester Callable - ### require\_now + ##### require\_now Eagerly attempt to import the dependencies in this object, and raise an exception if they cannot be imported. @@ -214,6 +216,8 @@ from qiskit.utils import LazyImportTester +#### LazyImportTester + A lazy dependency tester for importable Python modules. Any required objects will only be imported at the point that this object is tested for its Boolean value. @@ -226,6 +230,8 @@ from qiskit.utils import LazyImportTester **ValueError** – if no modules are given. +#### LazySubprocessTester + A lazy checker that a command-line tool is available. The command will only be run once, at the point that this object is checked for its Boolean value. From e9f73a26569b91edec5609983eebcc1edd4b2274 Mon Sep 17 00:00:00 2001 From: Arnau Casau Date: Fri, 3 May 2024 11:31:07 +0200 Subject: [PATCH 21/31] Regenerate qiskit 0.41.0 --- docs/api/qiskit/0.41/execute.mdx | 2 +- docs/api/qiskit/0.41/pulse.mdx | 8 ++++++++ docs/api/qiskit/0.41/qasm3.mdx | 6 ++++-- docs/api/qiskit/0.41/utils.mdx | 16 +++++++++++----- 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/docs/api/qiskit/0.41/execute.mdx b/docs/api/qiskit/0.41/execute.mdx index 2b629f86a4b..5e14670bd28 100644 --- a/docs/api/qiskit/0.41/execute.mdx +++ b/docs/api/qiskit/0.41/execute.mdx @@ -16,7 +16,7 @@ python_api_name: qiskit.execute_function `qiskit.execute_function` -### execute +## execute Execute a list of [`qiskit.circuit.QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") or [`qiskit.pulse.Schedule`](qiskit.pulse.Schedule "qiskit.pulse.Schedule") on a backend. diff --git a/docs/api/qiskit/0.41/pulse.mdx b/docs/api/qiskit/0.41/pulse.mdx index 52bf31ee27e..5323155c48a 100644 --- a/docs/api/qiskit/0.41/pulse.mdx +++ b/docs/api/qiskit/0.41/pulse.mdx @@ -67,6 +67,8 @@ An instruction can be added to a [`Schedule`](qiskit.pulse.Schedule "qiskit.puls These are all instances of the same base class: +### Instruction + The smallest schedulable unit: a single instruction. It has a fixed duration and specified channels. @@ -171,6 +173,8 @@ Novel channel types can often utilize the [`ControlChannel`](qiskit.pulse.channe All channels are children of the same abstract base class: +### Channel + Base class of channels. Channels provide a Qiskit-side label for typical quantum control hardware signal channels. The final label -> physical channel mapping is the responsibility of the hardware backend. For instance, `DriveChannel(0)` holds instructions which the backend should map to the signal line driving gate operations on the qubit labeled (indexed) 0. @@ -222,6 +226,8 @@ The alignment transforms define alignment policies of instructions in [`Schedule These are all subtypes of the abstract base class [`AlignmentKind`](#qiskit.pulse.transforms.AlignmentKind "qiskit.pulse.transforms.AlignmentKind"). +#### AlignmentKind + An abstract class for schedule alignment. @@ -669,6 +675,8 @@ There are 1e-06 seconds in 4500 samples. ## Exceptions +### PulseError + Errors raised by the pulse module. diff --git a/docs/api/qiskit/0.41/qasm3.mdx b/docs/api/qiskit/0.41/qasm3.mdx index 737c759e605..dac94f66d3a 100644 --- a/docs/api/qiskit/0.41/qasm3.mdx +++ b/docs/api/qiskit/0.41/qasm3.mdx @@ -59,6 +59,8 @@ The high-level functions are simply [`dump()`](#qiskit.qasm3.dump "qiskit.qasm3. Both of these exporter functions are single-use wrappers around the main [`Exporter`](#qiskit.qasm3.Exporter "qiskit.qasm3.Exporter") class. For more complex exporting needs, including dumping multiple circuits in a single session, it may be more convenient or faster to use the complete interface. +### Exporter + QASM3 exporter main class. @@ -70,13 +72,13 @@ Both of these exporter functions are single-use wrappers around the main [`Expor * **alias\_classical\_registers** (`bool`) – If `True`, then classical bit and classical register declarations will look similar to quantum declarations, where the whole set of bits will be declared in a flat array, and the registers will just be aliases to collections of these bits. This is inefficient for running OpenQASM 3 programs, however, and may not be well supported on backends. Instead, the default behaviour of `False` means that individual classical registers will gain their own `bit[size] register;` declarations, and loose [`Clbit`](qiskit.circuit.Clbit "qiskit.circuit.Clbit")s will go onto their own declaration. In this form, each [`Clbit`](qiskit.circuit.Clbit "qiskit.circuit.Clbit") must be in either zero or one [`ClassicalRegister`](qiskit.circuit.ClassicalRegister "qiskit.circuit.ClassicalRegister")s. * **indent** (`str`) – the indentation string to use for each level within an indented block. Can be set to the empty string to disable indentation. - ### dump + #### dump Convert the circuit to QASM 3, dumping the result to a file or text stream. - ### dumps + #### dumps Convert the circuit to QASM 3, returning the result as a string. diff --git a/docs/api/qiskit/0.41/utils.mdx b/docs/api/qiskit/0.41/utils.mdx index 1e00b1ab4bb..f21ff8c8ce0 100644 --- a/docs/api/qiskit/0.41/utils.mdx +++ b/docs/api/qiskit/0.41/utils.mdx @@ -109,6 +109,8 @@ Each of the lazy checkers is an instance of [`LazyDependencyManager`](#qiskit.ut from qiskit.utils import LazyImportTester ``` +#### LazyDependencyManager + A mananger for some optional features that are expensive to import, or to verify the existence of. @@ -147,7 +149,7 @@ from qiskit.utils import LazyImportTester * **install** – how to install this optional dependency. Passed to `MissingOptionalLibraryError` as the `pip_install` parameter. * **msg** – an extra message to include in the error raised if this is required. - ### \_is\_available + ##### \_is\_available Subclasses of [`LazyDependencyManager`](#qiskit.utils.LazyDependencyManager "qiskit.utils.LazyDependencyManager") should override this method to implement the actual test of availability. This method should return a Boolean, where `True` indicates that the dependency was available. This method will only ever be called once. @@ -157,13 +159,13 @@ from qiskit.utils import LazyImportTester `bool` - ### disable\_locally + ##### disable\_locally Create a context, during which the value of the dependency manager will be `False`. This means that within the context, any calls to this object will behave as if the dependency is not available, including raising errors. It is valid to call this method whether or not the dependency has already been evaluated. This is most useful in tests. - ### require\_in\_call + ##### require\_in\_call Create a decorator for callables that requires that the dependency is available when the decorated function or method is called. @@ -181,7 +183,7 @@ from qiskit.utils import LazyImportTester Callable - ### require\_in\_instance + ##### require\_in\_instance A class decorator that requires the dependency is available when the class is initialised. This decorator can be used even if the class does not define an `__init__` method. @@ -199,7 +201,7 @@ from qiskit.utils import LazyImportTester Callable - ### require\_now + ##### require\_now Eagerly attempt to import the dependencies in this object, and raise an exception if they cannot be imported. @@ -214,6 +216,8 @@ from qiskit.utils import LazyImportTester +#### LazyImportTester + A lazy dependency tester for importable Python modules. Any required objects will only be imported at the point that this object is tested for its Boolean value. @@ -226,6 +230,8 @@ from qiskit.utils import LazyImportTester **ValueError** – if no modules are given. +#### LazySubprocessTester + A lazy checker that a command-line tool is available. The command will only be run once, at the point that this object is checked for its Boolean value. From 7f73f4a1c1a2a6237831d1a33e38620042274bf3 Mon Sep 17 00:00:00 2001 From: Arnau Casau Date: Fri, 3 May 2024 11:34:16 +0200 Subject: [PATCH 22/31] Regenerate qiskit 0.42.0 --- docs/api/qiskit/0.42/execute.mdx | 2 +- docs/api/qiskit/0.42/pulse.mdx | 8 ++++++++ docs/api/qiskit/0.42/qasm3.mdx | 6 ++++-- docs/api/qiskit/0.42/utils.mdx | 16 +++++++++++----- 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/docs/api/qiskit/0.42/execute.mdx b/docs/api/qiskit/0.42/execute.mdx index 2b629f86a4b..5e14670bd28 100644 --- a/docs/api/qiskit/0.42/execute.mdx +++ b/docs/api/qiskit/0.42/execute.mdx @@ -16,7 +16,7 @@ python_api_name: qiskit.execute_function `qiskit.execute_function` -### execute +## execute Execute a list of [`qiskit.circuit.QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") or [`qiskit.pulse.Schedule`](qiskit.pulse.Schedule "qiskit.pulse.Schedule") on a backend. diff --git a/docs/api/qiskit/0.42/pulse.mdx b/docs/api/qiskit/0.42/pulse.mdx index c22096095d3..f11bdad5cc9 100644 --- a/docs/api/qiskit/0.42/pulse.mdx +++ b/docs/api/qiskit/0.42/pulse.mdx @@ -67,6 +67,8 @@ An instruction can be added to a [`Schedule`](qiskit.pulse.Schedule "qiskit.puls These are all instances of the same base class: +### Instruction + The smallest schedulable unit: a single instruction. It has a fixed duration and specified channels. @@ -171,6 +173,8 @@ Novel channel types can often utilize the [`ControlChannel`](qiskit.pulse.channe All channels are children of the same abstract base class: +### Channel + Base class of channels. Channels provide a Qiskit-side label for typical quantum control hardware signal channels. The final label -> physical channel mapping is the responsibility of the hardware backend. For instance, `DriveChannel(0)` holds instructions which the backend should map to the signal line driving gate operations on the qubit labeled (indexed) 0. @@ -222,6 +226,8 @@ The alignment transforms define alignment policies of instructions in [`Schedule These are all subtypes of the abstract base class [`AlignmentKind`](#qiskit.pulse.transforms.AlignmentKind "qiskit.pulse.transforms.AlignmentKind"). +#### AlignmentKind + An abstract class for schedule alignment. @@ -669,6 +675,8 @@ There are 1e-06 seconds in 4500 samples. ## Exceptions +### PulseError + Errors raised by the pulse module. diff --git a/docs/api/qiskit/0.42/qasm3.mdx b/docs/api/qiskit/0.42/qasm3.mdx index 737c759e605..dac94f66d3a 100644 --- a/docs/api/qiskit/0.42/qasm3.mdx +++ b/docs/api/qiskit/0.42/qasm3.mdx @@ -59,6 +59,8 @@ The high-level functions are simply [`dump()`](#qiskit.qasm3.dump "qiskit.qasm3. Both of these exporter functions are single-use wrappers around the main [`Exporter`](#qiskit.qasm3.Exporter "qiskit.qasm3.Exporter") class. For more complex exporting needs, including dumping multiple circuits in a single session, it may be more convenient or faster to use the complete interface. +### Exporter + QASM3 exporter main class. @@ -70,13 +72,13 @@ Both of these exporter functions are single-use wrappers around the main [`Expor * **alias\_classical\_registers** (`bool`) – If `True`, then classical bit and classical register declarations will look similar to quantum declarations, where the whole set of bits will be declared in a flat array, and the registers will just be aliases to collections of these bits. This is inefficient for running OpenQASM 3 programs, however, and may not be well supported on backends. Instead, the default behaviour of `False` means that individual classical registers will gain their own `bit[size] register;` declarations, and loose [`Clbit`](qiskit.circuit.Clbit "qiskit.circuit.Clbit")s will go onto their own declaration. In this form, each [`Clbit`](qiskit.circuit.Clbit "qiskit.circuit.Clbit") must be in either zero or one [`ClassicalRegister`](qiskit.circuit.ClassicalRegister "qiskit.circuit.ClassicalRegister")s. * **indent** (`str`) – the indentation string to use for each level within an indented block. Can be set to the empty string to disable indentation. - ### dump + #### dump Convert the circuit to QASM 3, dumping the result to a file or text stream. - ### dumps + #### dumps Convert the circuit to QASM 3, returning the result as a string. diff --git a/docs/api/qiskit/0.42/utils.mdx b/docs/api/qiskit/0.42/utils.mdx index 1e00b1ab4bb..f21ff8c8ce0 100644 --- a/docs/api/qiskit/0.42/utils.mdx +++ b/docs/api/qiskit/0.42/utils.mdx @@ -109,6 +109,8 @@ Each of the lazy checkers is an instance of [`LazyDependencyManager`](#qiskit.ut from qiskit.utils import LazyImportTester ``` +#### LazyDependencyManager + A mananger for some optional features that are expensive to import, or to verify the existence of. @@ -147,7 +149,7 @@ from qiskit.utils import LazyImportTester * **install** – how to install this optional dependency. Passed to `MissingOptionalLibraryError` as the `pip_install` parameter. * **msg** – an extra message to include in the error raised if this is required. - ### \_is\_available + ##### \_is\_available Subclasses of [`LazyDependencyManager`](#qiskit.utils.LazyDependencyManager "qiskit.utils.LazyDependencyManager") should override this method to implement the actual test of availability. This method should return a Boolean, where `True` indicates that the dependency was available. This method will only ever be called once. @@ -157,13 +159,13 @@ from qiskit.utils import LazyImportTester `bool` - ### disable\_locally + ##### disable\_locally Create a context, during which the value of the dependency manager will be `False`. This means that within the context, any calls to this object will behave as if the dependency is not available, including raising errors. It is valid to call this method whether or not the dependency has already been evaluated. This is most useful in tests. - ### require\_in\_call + ##### require\_in\_call Create a decorator for callables that requires that the dependency is available when the decorated function or method is called. @@ -181,7 +183,7 @@ from qiskit.utils import LazyImportTester Callable - ### require\_in\_instance + ##### require\_in\_instance A class decorator that requires the dependency is available when the class is initialised. This decorator can be used even if the class does not define an `__init__` method. @@ -199,7 +201,7 @@ from qiskit.utils import LazyImportTester Callable - ### require\_now + ##### require\_now Eagerly attempt to import the dependencies in this object, and raise an exception if they cannot be imported. @@ -214,6 +216,8 @@ from qiskit.utils import LazyImportTester +#### LazyImportTester + A lazy dependency tester for importable Python modules. Any required objects will only be imported at the point that this object is tested for its Boolean value. @@ -226,6 +230,8 @@ from qiskit.utils import LazyImportTester **ValueError** – if no modules are given. +#### LazySubprocessTester + A lazy checker that a command-line tool is available. The command will only be run once, at the point that this object is checked for its Boolean value. From c8b2287744411d0efcc8828a1945421ed2c74a43 Mon Sep 17 00:00:00 2001 From: Arnau Casau Date: Fri, 3 May 2024 11:36:53 +0200 Subject: [PATCH 23/31] Regenerate qiskit 0.43.0 --- docs/api/qiskit/0.43/execute.mdx | 2 +- docs/api/qiskit/0.43/pulse.mdx | 8 ++++++++ docs/api/qiskit/0.43/qasm.mdx | 6 ++++++ docs/api/qiskit/0.43/qasm2.mdx | 4 ++++ docs/api/qiskit/0.43/qasm3.mdx | 10 +++++++--- docs/api/qiskit/0.43/utils.mdx | 16 +++++++++++----- 6 files changed, 37 insertions(+), 9 deletions(-) diff --git a/docs/api/qiskit/0.43/execute.mdx b/docs/api/qiskit/0.43/execute.mdx index e3578ea398f..82e9a17f36b 100644 --- a/docs/api/qiskit/0.43/execute.mdx +++ b/docs/api/qiskit/0.43/execute.mdx @@ -18,7 +18,7 @@ python_api_name: qiskit.execute_function `qiskit.execute_function` -### execute +## execute Execute a list of [`qiskit.circuit.QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") or [`qiskit.pulse.Schedule`](qiskit.pulse.Schedule "qiskit.pulse.Schedule") on a backend. diff --git a/docs/api/qiskit/0.43/pulse.mdx b/docs/api/qiskit/0.43/pulse.mdx index 75a5ef8b4d4..a336aecdafd 100644 --- a/docs/api/qiskit/0.43/pulse.mdx +++ b/docs/api/qiskit/0.43/pulse.mdx @@ -71,6 +71,8 @@ An instruction can be added to a [`Schedule`](qiskit.pulse.Schedule "qiskit.puls These are all instances of the same base class: +### Instruction + The smallest schedulable unit: a single instruction. It has a fixed duration and specified channels. @@ -178,6 +180,8 @@ Novel channel types can often utilize the [`ControlChannel`](qiskit.pulse.channe All channels are children of the same abstract base class: +### Channel + Base class of channels. Channels provide a Qiskit-side label for typical quantum control hardware signal channels. The final label -> physical channel mapping is the responsibility of the hardware backend. For instance, `DriveChannel(0)` holds instructions which the backend should map to the signal line driving gate operations on the qubit labeled (indexed) 0. @@ -231,6 +235,8 @@ The alignment transforms define alignment policies of instructions in [`Schedule These are all subtypes of the abstract base class [`AlignmentKind`](#qiskit.pulse.transforms.AlignmentKind "qiskit.pulse.transforms.AlignmentKind"). +#### AlignmentKind + An abstract class for schedule alignment. @@ -678,6 +684,8 @@ There are 1e-06 seconds in 4500 samples. ## Exceptions +### PulseError + Errors raised by the pulse module. diff --git a/docs/api/qiskit/0.43/qasm.mdx b/docs/api/qiskit/0.43/qasm.mdx index 9de85171726..19c7123ff4f 100644 --- a/docs/api/qiskit/0.43/qasm.mdx +++ b/docs/api/qiskit/0.43/qasm.mdx @@ -27,14 +27,20 @@ python_api_name: qiskit.qasm ## Pygments +### OpenQASMLexer + A pygments lexer for OpenQasm. +### QasmHTMLStyle + A style for OpenQasm in a HTML env (e.g. Jupyter widget). +### QasmTerminalStyle + A style for OpenQasm in a Terminal env (e.g. Jupyter print). diff --git a/docs/api/qiskit/0.43/qasm2.mdx b/docs/api/qiskit/0.43/qasm2.mdx index 0cf667c730c..7dbfeebb906 100644 --- a/docs/api/qiskit/0.43/qasm2.mdx +++ b/docs/api/qiskit/0.43/qasm2.mdx @@ -81,6 +81,8 @@ Both of these loading functions also take an argument `include_path`, which is a You can extend the quantum components of the OpenQASM 2 language by passing an iterable of information on custom instructions as the argument `custom_instructions`. In files that have compatible definitions for these instructions, the given `constructor` will be used in place of whatever other handling [`qiskit.qasm2`](#module-qiskit.qasm2 "qiskit.qasm2") would have done. These instructions may optionally be marked as `builtin`, which causes them to not require an `opaque` or `gate` declaration, but they will silently ignore a compatible declaration. Either way, it is an error to provide a custom instruction that has a different number of parameters or qubits as a defined instruction in a parsed program. Each element of the argument iterable should be a particular data class: +#### CustomInstruction + Information about a custom instruction that should be defined during the parse. @@ -95,6 +97,8 @@ You can extend the quantum components of the OpenQASM 2 language by passing an i Similar to the quantum extensions above, you can also extend the processing done to classical expressions (arguments to gates) by passing an iterable to the argument `custom_classical` to either loader. This needs the `name` (a valid OpenQASM 2 identifier), the number `num_params` of parameters it takes, and a Python callable that implements the function. The Python callable must be able to accept `num_params` positional floating-point arguments, and must return a float or integer (which will be converted to a float). Builtin functions cannot be overridden. +#### CustomClassical + Information about a custom classical function that should be defined in mathematical expressions. diff --git a/docs/api/qiskit/0.43/qasm3.mdx b/docs/api/qiskit/0.43/qasm3.mdx index 497ebedc830..b8cda3fae80 100644 --- a/docs/api/qiskit/0.43/qasm3.mdx +++ b/docs/api/qiskit/0.43/qasm3.mdx @@ -57,6 +57,8 @@ The high-level functions are simply [`dump()`](#qiskit.qasm3.dump "qiskit.qasm3. Both of these exporter functions are single-use wrappers around the main [`Exporter`](#qiskit.qasm3.Exporter "qiskit.qasm3.Exporter") class. For more complex exporting needs, including dumping multiple circuits in a single session, it may be more convenient or faster to use the complete interface. +### Exporter + QASM3 exporter main class. @@ -69,13 +71,13 @@ Both of these exporter functions are single-use wrappers around the main [`Expor * **indent** (*str*) – the indentation string to use for each level within an indented block. Can be set to the empty string to disable indentation. * **experimental** ([*ExperimentalFeatures*](#qiskit.qasm3.ExperimentalFeatures "qiskit.qasm3.experimental.ExperimentalFeatures")) – any experimental features to enable during the export. See [`ExperimentalFeatures`](#qiskit.qasm3.ExperimentalFeatures "qiskit.qasm3.ExperimentalFeatures") for more details. - ### dump + #### dump Convert the circuit to QASM 3, dumping the result to a file or text stream. - ### dumps + #### dumps Convert the circuit to QASM 3, returning the result as a string. @@ -96,12 +98,14 @@ All of these interfaces will raise [`QASM3ExporterError`](#qiskit.qasm3.QASM3Exp The OpenQASM 3 language is still evolving as hardware capabilities improve, so there is no final syntax that Qiskit can reliably target. In order to represent the evolving language, we will sometimes release features before formal standardization, which may need to change as the review process in the OpenQASM 3 design committees progresses. By default, the exporters will only support standardised features of the language. To enable these early-release features, use the `experimental` keyword argument of [`dump()`](#qiskit.qasm3.dump "qiskit.qasm3.dump") and [`dumps()`](#qiskit.qasm3.dumps "qiskit.qasm3.dumps"). The available feature flags are: +#### ExperimentalFeatures + Flags for experimental features that the OpenQASM 3 exporter supports. These are experimental and are more liable to change, because the OpenQASM 3 specification has not formally accepted them yet, so the syntax may not be finalized. - ### SWITCH\_CASE\_V1 + ##### SWITCH\_CASE\_V1 Support exporting switch-case statements as proposed by [https://github.com/openqasm/openqasm/pull/463](https://github.com/openqasm/openqasm/pull/463) at [commit bfa787aa3078](https://github.com/openqasm/openqasm/pull/463/commits/bfa787aa3078). diff --git a/docs/api/qiskit/0.43/utils.mdx b/docs/api/qiskit/0.43/utils.mdx index a4afca7c015..cf2038a1bbd 100644 --- a/docs/api/qiskit/0.43/utils.mdx +++ b/docs/api/qiskit/0.43/utils.mdx @@ -116,6 +116,8 @@ Each of the lazy checkers is an instance of [`LazyDependencyManager`](#qiskit.ut from qiskit.utils import LazyImportTester ``` +#### LazyDependencyManager + A mananger for some optional features that are expensive to import, or to verify the existence of. @@ -154,7 +156,7 @@ from qiskit.utils import LazyImportTester * **install** – how to install this optional dependency. Passed to `MissingOptionalLibraryError` as the `pip_install` parameter. * **msg** – an extra message to include in the error raised if this is required. - ### \_is\_available + ##### \_is\_available Subclasses of [`LazyDependencyManager`](#qiskit.utils.LazyDependencyManager "qiskit.utils.LazyDependencyManager") should override this method to implement the actual test of availability. This method should return a Boolean, where `True` indicates that the dependency was available. This method will only ever be called once. @@ -164,13 +166,13 @@ from qiskit.utils import LazyImportTester bool - ### disable\_locally + ##### disable\_locally Create a context, during which the value of the dependency manager will be `False`. This means that within the context, any calls to this object will behave as if the dependency is not available, including raising errors. It is valid to call this method whether or not the dependency has already been evaluated. This is most useful in tests. - ### require\_in\_call + ##### require\_in\_call Create a decorator for callables that requires that the dependency is available when the decorated function or method is called. @@ -188,7 +190,7 @@ from qiskit.utils import LazyImportTester Callable - ### require\_in\_instance + ##### require\_in\_instance A class decorator that requires the dependency is available when the class is initialised. This decorator can be used even if the class does not define an `__init__` method. @@ -206,7 +208,7 @@ from qiskit.utils import LazyImportTester Callable - ### require\_now + ##### require\_now Eagerly attempt to import the dependencies in this object, and raise an exception if they cannot be imported. @@ -221,6 +223,8 @@ from qiskit.utils import LazyImportTester +#### LazyImportTester + A lazy dependency tester for importable Python modules. Any required objects will only be imported at the point that this object is tested for its Boolean value. @@ -233,6 +237,8 @@ from qiskit.utils import LazyImportTester **ValueError** – if no modules are given. +#### LazySubprocessTester + A lazy checker that a command-line tool is available. The command will only be run once, at the point that this object is checked for its Boolean value. From 56c4634a8f839a13527c397492f1bdc1d8a83dbe Mon Sep 17 00:00:00 2001 From: Arnau Casau Date: Fri, 3 May 2024 11:39:40 +0200 Subject: [PATCH 24/31] Regenerate qiskit 0.44.0 --- docs/api/qiskit/0.44/algorithms.mdx | 6 +- docs/api/qiskit/0.44/circuit.mdx | 4 +- docs/api/qiskit/0.44/circuit_classical.mdx | 100 +++++++++------ docs/api/qiskit/0.44/circuit_library.mdx | 142 ++++++++++----------- docs/api/qiskit/0.44/converters.mdx | 18 +-- docs/api/qiskit/0.44/exceptions.mdx | 8 +- docs/api/qiskit/0.44/execute.mdx | 2 +- docs/api/qiskit/0.44/providers.mdx | 10 +- docs/api/qiskit/0.44/pulse.mdx | 132 ++++++++++--------- docs/api/qiskit/0.44/qasm.mdx | 8 ++ docs/api/qiskit/0.44/qasm2.mdx | 4 + docs/api/qiskit/0.44/qasm3.mdx | 10 +- docs/api/qiskit/0.44/qpy.mdx | 6 +- docs/api/qiskit/0.44/result.mdx | 6 +- docs/api/qiskit/0.44/scheduler.mdx | 8 +- docs/api/qiskit/0.44/tools.mdx | 2 + docs/api/qiskit/0.44/transpiler.mdx | 8 +- docs/api/qiskit/0.44/utils.mdx | 36 +++--- 18 files changed, 284 insertions(+), 226 deletions(-) diff --git a/docs/api/qiskit/0.44/algorithms.mdx b/docs/api/qiskit/0.44/algorithms.mdx index 6cac8047e91..a71bafc7bd2 100644 --- a/docs/api/qiskit/0.44/algorithms.mdx +++ b/docs/api/qiskit/0.44/algorithms.mdx @@ -193,7 +193,7 @@ Algorithms that compute the fidelity of pairs of quantum states. ### Exceptions -### AlgorithmError +#### AlgorithmError For Algorithm specific errors. @@ -213,7 +213,7 @@ Utility classes used by algorithms (mainly for type-hinting purposes). Utility functions used by algorithms. -### eval\_observables +#### eval\_observables Deprecated: Accepts a list or a dictionary of operators and calculates their expectation values - means and standard deviations. They are calculated with respect to a quantum state provided. A user can optionally provide a threshold value which filters mean values falling below the threshold. @@ -245,7 +245,7 @@ Utility functions used by algorithms. ListOrDict\[[tuple](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.12)")\[[complex](https://docs.python.org/3/library/functions.html#complex "(in Python v3.12)"), [complex](https://docs.python.org/3/library/functions.html#complex "(in Python v3.12)")]] -### estimate\_observables +#### estimate\_observables Accepts a sequence of operators and calculates their expectation values - means and metadata. They are calculated with respect to a quantum state provided. A user can optionally provide a threshold value which filters mean values falling below the threshold. diff --git a/docs/api/qiskit/0.44/circuit.mdx b/docs/api/qiskit/0.44/circuit.mdx index 26bf366411e..72850665efd 100644 --- a/docs/api/qiskit/0.44/circuit.mdx +++ b/docs/api/qiskit/0.44/circuit.mdx @@ -284,7 +284,7 @@ with qc.switch(cr) as case: ### Random Circuits -### random\_circuit +#### random\_circuit Generate random circuit of arbitrary size and form. @@ -327,7 +327,7 @@ with qc.switch(cr) as case: Almost all circuit functions and methods will raise a [`CircuitError`](#qiskit.circuit.CircuitError "qiskit.circuit.CircuitError") when encountering an error that is particular to usage of Qiskit (as opposed to regular typing or indexing problems, which will typically raise the corresponding standard Python error). -### CircuitError +#### CircuitError Base class for errors raised while processing a circuit. diff --git a/docs/api/qiskit/0.44/circuit_classical.mdx b/docs/api/qiskit/0.44/circuit_classical.mdx index a78509aaafc..94ddb528798 100644 --- a/docs/api/qiskit/0.44/circuit_classical.mdx +++ b/docs/api/qiskit/0.44/circuit_classical.mdx @@ -48,6 +48,8 @@ There are two pathways for constructing expressions. The classes that form [the The expression system is based on tree representation. All nodes in the tree are final (uninheritable) instances of the abstract base class: +#### Expr + Root base class of all nodes in the expression tree. The base case should never be instantiated directly. @@ -60,18 +62,24 @@ These objects are mutable and should not be reused in a different location witho The entry point from general circuit objects to the expression system is by wrapping the object in a [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.Var") node and associating a [`Type`](#qiskit.circuit.classical.types.Type "qiskit.circuit.classical.types.Type") with it. +#### Var + A classical variable. Similarly, literals used in comparison (such as integers) should be lifted to [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes with associated types. +#### Value + A single scalar value. The operations traditionally associated with pre-, post- or infix operators in programming are represented by the [`Unary`](#qiskit.circuit.classical.expr.Unary "qiskit.circuit.classical.expr.Unary") and [`Binary`](#qiskit.circuit.classical.expr.Binary "qiskit.circuit.classical.expr.Binary") nodes as appropriate. These each take an operation type code, which are exposed as enumerations inside each class as [`Unary.Op`](#qiskit.circuit.classical.expr.Unary.Op "qiskit.circuit.classical.expr.Unary.Op") and [`Binary.Op`](#qiskit.circuit.classical.expr.Binary.Op "qiskit.circuit.classical.expr.Binary.Op") respectively. +#### Unary + A unary expression. @@ -81,6 +89,8 @@ The operations traditionally associated with pre-, post- or infix operators in p * **operand** ([*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.Expr")) – The operand of the operation. * **type** ([*Type*](#qiskit.circuit.classical.types.Type "qiskit.circuit.classical.types.types.Type")) – The resolved type of the result. + ##### Op + Enumeration of the opcodes for unary operations. @@ -88,13 +98,13 @@ The operations traditionally associated with pre-, post- or infix operators in p The logical negation [`LOGIC_NOT`](#qiskit.circuit.classical.expr.Unary.Op.LOGIC_NOT "qiskit.circuit.classical.expr.Unary.Op.LOGIC_NOT") takes an input that is implicitly coerced to a Boolean, and returns a Boolean. - ### BIT\_NOT + ###### BIT\_NOT Bitwise negation. `~operand`. - ### LOGIC\_NOT + ###### LOGIC\_NOT Logical negation. `!operand`. @@ -102,6 +112,8 @@ The operations traditionally associated with pre-, post- or infix operators in p +#### Binary + A binary expression. @@ -112,6 +124,8 @@ The operations traditionally associated with pre-, post- or infix operators in p * **right** ([*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.Expr")) – The right-hand operand. * **type** ([*Type*](#qiskit.circuit.classical.types.Type "qiskit.circuit.classical.types.types.Type")) – The resolved type of the result. + ##### Op + Enumeration of the opcodes for binary operations. @@ -121,67 +135,67 @@ The operations traditionally associated with pre-, post- or infix operators in p The binary mathematical relations [`EQUAL`](#qiskit.circuit.classical.expr.Binary.Op.EQUAL "qiskit.circuit.classical.expr.Binary.Op.EQUAL"), [`NOT_EQUAL`](#qiskit.circuit.classical.expr.Binary.Op.NOT_EQUAL "qiskit.circuit.classical.expr.Binary.Op.NOT_EQUAL"), [`LESS`](#qiskit.circuit.classical.expr.Binary.Op.LESS "qiskit.circuit.classical.expr.Binary.Op.LESS"), [`LESS_EQUAL`](#qiskit.circuit.classical.expr.Binary.Op.LESS_EQUAL "qiskit.circuit.classical.expr.Binary.Op.LESS_EQUAL"), [`GREATER`](#qiskit.circuit.classical.expr.Binary.Op.GREATER "qiskit.circuit.classical.expr.Binary.Op.GREATER") and [`GREATER_EQUAL`](#qiskit.circuit.classical.expr.Binary.Op.GREATER_EQUAL "qiskit.circuit.classical.expr.Binary.Op.GREATER_EQUAL") take unsigned integers (with an implicit cast to make them the same width), and return a Boolean. - ### BIT\_AND + ###### BIT\_AND Bitwise “and”. `lhs & rhs`. - ### BIT\_OR + ###### BIT\_OR Bitwise “or”. `lhs | rhs`. - ### BIT\_XOR + ###### BIT\_XOR Bitwise “exclusive or”. `lhs ^ rhs`. - ### LOGIC\_AND + ###### LOGIC\_AND Logical “and”. `lhs && rhs`. - ### LOGIC\_OR + ###### LOGIC\_OR Logical “or”. `lhs || rhs`. - ### EQUAL + ###### EQUAL Numeric equality. `lhs == rhs`. - ### NOT\_EQUAL + ###### NOT\_EQUAL Numeric inequality. `lhs != rhs`. - ### LESS + ###### LESS Numeric less than. `lhs < rhs`. - ### LESS\_EQUAL + ###### LESS\_EQUAL Numeric less than or equal to. `lhs <= rhs` - ### GREATER + ###### GREATER Numeric greater than. `lhs > rhs`. - ### GREATER\_EQUAL + ###### GREATER\_EQUAL Numeric greater than or equal to. `lhs >= rhs`. @@ -193,6 +207,8 @@ When constructing expressions, one must ensure that the types are valid for the Expressions in this system are defined to act only on certain sets of types. However, values may be cast to a suitable supertype in order to satisfy the typing requirements. In these cases, a node in the expression tree is used to represent the promotion. In all cases where operations note that they “implicitly cast” or “coerce” their arguments, the expression tree must have this node representing the conversion. +#### Cast + A cast from one type to another, implied by the use of an expression in a different context. @@ -205,7 +221,7 @@ Constructing the tree representation directly is verbose and easy to make a mist The functions and methods described in this section are a more user-friendly way to build the expression tree, while staying close to the internal representation. All these functions will automatically lift valid Python scalar values into corresponding [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.Var") or [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") objects, and will resolve any required implicit casts on your behalf. -### lift +#### lift Lift the given Python `value` to a [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.expr.Value") or [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.expr.Var"). @@ -243,7 +259,7 @@ The functions and methods described in this section are a more user-friendly way You can manually specify casts in cases where the cast is allowed in explicit form, but may be lossy (such as the cast of a higher precision [`Uint`](#qiskit.circuit.classical.types.Uint "qiskit.circuit.classical.types.Uint") to a lower precision one). -### cast +#### cast Create an explicit cast from the given value to the given type. @@ -266,7 +282,7 @@ You can manually specify casts in cases where the cast is allowed in explicit fo There are helper constructor functions for each of the unary operations. -### bit\_not +#### bit\_not Create a bitwise ‘not’ expression node from the given value, resolving any implicit casts and lifting the value into a [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") node if required. @@ -287,7 +303,7 @@ There are helper constructor functions for each of the unary operations. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### logic\_not +#### logic\_not Create a logical ‘not’ expression node from the given value, resolving any implicit casts and lifting the value into a [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") node if required. @@ -310,7 +326,7 @@ There are helper constructor functions for each of the unary operations. Similarly, the binary operations and relations have helper functions defined. -### bit\_and +#### bit\_and Create a bitwise ‘and’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -331,7 +347,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### bit\_or +#### bit\_or Create a bitwise ‘or’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -352,7 +368,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### bit\_xor +#### bit\_xor Create a bitwise ‘exclusive or’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -373,7 +389,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### logic\_and +#### logic\_and Create a logical ‘and’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -394,7 +410,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### logic\_or +#### logic\_or Create a logical ‘or’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -415,7 +431,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### equal +#### equal Create an ‘equal’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -436,7 +452,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### not\_equal +#### not\_equal Create a ‘not equal’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -457,7 +473,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### less +#### less Create a ‘less than’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -478,7 +494,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### less\_equal +#### less\_equal Create a ‘less than or equal to’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -499,7 +515,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### greater +#### greater Create a ‘greater than’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -520,7 +536,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### greater\_equal +#### greater\_equal Create a ‘greater than or equal to’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -543,7 +559,7 @@ Similarly, the binary operations and relations have helper functions defined. Qiskit’s legacy method for specifying equality conditions for use in conditionals is to use a two-tuple of a [`Clbit`](qiskit.circuit.Clbit "qiskit.circuit.Clbit") or [`ClassicalRegister`](qiskit.circuit.ClassicalRegister "qiskit.circuit.ClassicalRegister") and an integer. This represents an exact equality condition, and there are no ways to specify any other relations. The helper function [`lift_legacy_condition()`](#qiskit.circuit.classical.expr.lift_legacy_condition "qiskit.circuit.classical.expr.lift_legacy_condition") converts this legacy format into the new expression syntax. -### lift\_legacy\_condition +#### lift\_legacy\_condition Lift a legacy two-tuple equality condition into a new-style [`Expr`](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.Expr"). @@ -572,10 +588,12 @@ Qiskit’s legacy method for specifying equality conditions for use in condition A typical consumer of the expression tree wants to recursively walk through the tree, potentially statefully, acting on each node differently depending on its type. This is naturally a double-dispatch problem; the logic of ‘what is to be done’ is likely stateful and users should be free to define their own operations, yet each node defines ‘what is being acted on’. We enable this double dispatch by providing a base visitor class for the expression tree. +#### ExprVisitor + Base class for visitors to the [`Expr`](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.Expr") tree. Subclasses should override whichever of the `visit_*` methods that they are able to handle, and should be organised such that non-existent methods will never be called. - ### visit\_binary + ##### visit\_binary **Return type** @@ -583,7 +601,7 @@ A typical consumer of the expression tree wants to recursively walk through the *\_T\_co* - ### visit\_cast + ##### visit\_cast **Return type** @@ -591,7 +609,7 @@ A typical consumer of the expression tree wants to recursively walk through the *\_T\_co* - ### visit\_generic + ##### visit\_generic **Return type** @@ -599,7 +617,7 @@ A typical consumer of the expression tree wants to recursively walk through the *\_T\_co* - ### visit\_unary + ##### visit\_unary **Return type** @@ -607,7 +625,7 @@ A typical consumer of the expression tree wants to recursively walk through the *\_T\_co* - ### visit\_value + ##### visit\_value **Return type** @@ -615,7 +633,7 @@ A typical consumer of the expression tree wants to recursively walk through the *\_T\_co* - ### visit\_var + ##### visit\_var **Return type** @@ -628,7 +646,7 @@ Consumers of the expression tree should subclass the visitor, and override the ` For the convenience of simple visitors that only need to inspect the variables in an expression and not the general structure, the iterator method [`iter_vars()`](#qiskit.circuit.classical.expr.iter_vars "qiskit.circuit.classical.expr.iter_vars") is provided. -### iter\_vars +#### iter\_vars Get an iterator over the [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.expr.Var") nodes referenced at any level in the given [`Expr`](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr"). @@ -656,7 +674,7 @@ For the convenience of simple visitors that only need to inspect the variables i Two expressions can be compared for direct structural equality by using the built-in Python `==` operator. In general, though, one might want to compare two expressions slightly more semantically, allowing that the [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.Var") nodes inside them are bound to different memory-location descriptions between two different circuits. In this case, one can use [`structurally_equivalent()`](#qiskit.circuit.classical.expr.structurally_equivalent "qiskit.circuit.classical.expr.structurally_equivalent") with two suitable “key” functions to do the comparison. -### structurally\_equivalent +#### structurally\_equivalent Do these two expressions have exactly the same tree structure, up to some key function for the [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.expr.Var") objects? @@ -715,6 +733,8 @@ The type system of the expression tree is exposed through this module. This is i All types inherit from an abstract base class: +### Type + Root base class of all nodes in the type tree. The base case should never be instantiated directly. @@ -725,10 +745,14 @@ Types should be considered immutable objects, and you must not mutate them. It i The two different types available are for Booleans (corresponding to [`Clbit`](qiskit.circuit.Clbit "qiskit.circuit.Clbit") and the literals `True` and `False`), and unsigned integers (corresponding to [`ClassicalRegister`](qiskit.circuit.ClassicalRegister "qiskit.circuit.ClassicalRegister") and Python integers). +### Bool + The Boolean type. This has exactly two values: `True` and `False`. +### Uint + An unsigned integer of fixed bit width. @@ -770,6 +794,8 @@ The low-level interface to querying the subtyping relationship is the [`order()` The return value is an enumeration [`Ordering`](#qiskit.circuit.classical.types.Ordering "qiskit.circuit.classical.types.Ordering") that describes what, if any, subtyping relationship exists between the two types. +### Ordering + Enumeration listing the possible relations between two types. Types only have a partial ordering, so it’s possible for two types to have no sub-typing relationship. diff --git a/docs/api/qiskit/0.44/circuit_library.mdx b/docs/api/qiskit/0.44/circuit_library.mdx index 371a1b31943..6d046e318ed 100644 --- a/docs/api/qiskit/0.44/circuit_library.mdx +++ b/docs/api/qiskit/0.44/circuit_library.mdx @@ -313,7 +313,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib **Reference:** Maslov, D. and Dueck, G. W. and Miller, D. M., Techniques for the synthesis of reversible Toffoli networks, 2007 [http://dx.doi.org/10.1145/1278349.1278355](http://dx.doi.org/10.1145/1278349.1278355) -### template\_nct\_2a\_1 +#### template\_nct\_2a\_1 **Returns** @@ -325,7 +325,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_2a\_2 +#### template\_nct\_2a\_2 **Returns** @@ -337,7 +337,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_2a\_3 +#### template\_nct\_2a\_3 **Returns** @@ -349,7 +349,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_4a\_1 +#### template\_nct\_4a\_1 **Returns** @@ -361,7 +361,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_4a\_2 +#### template\_nct\_4a\_2 **Returns** @@ -373,7 +373,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_4a\_3 +#### template\_nct\_4a\_3 **Returns** @@ -385,7 +385,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_4b\_1 +#### template\_nct\_4b\_1 **Returns** @@ -397,7 +397,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_4b\_2 +#### template\_nct\_4b\_2 **Returns** @@ -409,7 +409,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_5a\_1 +#### template\_nct\_5a\_1 **Returns** @@ -421,7 +421,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_5a\_2 +#### template\_nct\_5a\_2 **Returns** @@ -433,7 +433,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_5a\_3 +#### template\_nct\_5a\_3 **Returns** @@ -445,7 +445,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_5a\_4 +#### template\_nct\_5a\_4 **Returns** @@ -457,7 +457,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_6a\_1 +#### template\_nct\_6a\_1 **Returns** @@ -469,7 +469,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_6a\_2 +#### template\_nct\_6a\_2 **Returns** @@ -481,7 +481,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_6a\_3 +#### template\_nct\_6a\_3 **Returns** @@ -493,7 +493,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_6a\_4 +#### template\_nct\_6a\_4 **Returns** @@ -505,7 +505,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_6b\_1 +#### template\_nct\_6b\_1 **Returns** @@ -517,7 +517,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_6b\_2 +#### template\_nct\_6b\_2 **Returns** @@ -529,7 +529,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_6c\_1 +#### template\_nct\_6c\_1 **Returns** @@ -541,7 +541,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_7a\_1 +#### template\_nct\_7a\_1 **Returns** @@ -553,7 +553,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_7b\_1 +#### template\_nct\_7b\_1 **Returns** @@ -565,7 +565,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_7c\_1 +#### template\_nct\_7c\_1 **Returns** @@ -577,7 +577,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_7d\_1 +#### template\_nct\_7d\_1 **Returns** @@ -589,7 +589,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_7e\_1 +#### template\_nct\_7e\_1 **Returns** @@ -601,7 +601,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9a\_1 +#### template\_nct\_9a\_1 **Returns** @@ -613,7 +613,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_1 +#### template\_nct\_9c\_1 **Returns** @@ -625,7 +625,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_2 +#### template\_nct\_9c\_2 **Returns** @@ -637,7 +637,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_3 +#### template\_nct\_9c\_3 **Returns** @@ -649,7 +649,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_4 +#### template\_nct\_9c\_4 **Returns** @@ -661,7 +661,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_5 +#### template\_nct\_9c\_5 **Returns** @@ -673,7 +673,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_6 +#### template\_nct\_9c\_6 **Returns** @@ -685,7 +685,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_7 +#### template\_nct\_9c\_7 **Returns** @@ -697,7 +697,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_8 +#### template\_nct\_9c\_8 **Returns** @@ -709,7 +709,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_9 +#### template\_nct\_9c\_9 **Returns** @@ -721,7 +721,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_10 +#### template\_nct\_9c\_10 **Returns** @@ -733,7 +733,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_11 +#### template\_nct\_9c\_11 **Returns** @@ -745,7 +745,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_12 +#### template\_nct\_9c\_12 **Returns** @@ -757,7 +757,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_1 +#### template\_nct\_9d\_1 **Returns** @@ -769,7 +769,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_2 +#### template\_nct\_9d\_2 **Returns** @@ -781,7 +781,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_3 +#### template\_nct\_9d\_3 **Returns** @@ -793,7 +793,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_4 +#### template\_nct\_9d\_4 **Returns** @@ -805,7 +805,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_5 +#### template\_nct\_9d\_5 **Returns** @@ -817,7 +817,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_6 +#### template\_nct\_9d\_6 **Returns** @@ -829,7 +829,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_7 +#### template\_nct\_9d\_7 **Returns** @@ -841,7 +841,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_8 +#### template\_nct\_9d\_8 **Returns** @@ -853,7 +853,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_9 +#### template\_nct\_9d\_9 **Returns** @@ -865,7 +865,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_10 +#### template\_nct\_9d\_10 **Returns** @@ -881,7 +881,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib Template circuits over Clifford gates. -### clifford\_2\_1 +#### clifford\_2\_1 **Returns** @@ -893,7 +893,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_2\_2 +#### clifford\_2\_2 **Returns** @@ -905,7 +905,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_2\_3 +#### clifford\_2\_3 **Returns** @@ -917,7 +917,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_2\_4 +#### clifford\_2\_4 **Returns** @@ -929,7 +929,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_3\_1 +#### clifford\_3\_1 **Returns** @@ -941,7 +941,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_4\_1 +#### clifford\_4\_1 **Returns** @@ -953,7 +953,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_4\_2 +#### clifford\_4\_2 **Returns** @@ -965,7 +965,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_4\_3 +#### clifford\_4\_3 **Returns** @@ -977,7 +977,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_4\_4 +#### clifford\_4\_4 **Returns** @@ -989,7 +989,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_5\_1 +#### clifford\_5\_1 **Returns** @@ -1001,7 +1001,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_6\_1 +#### clifford\_6\_1 **Returns** @@ -1013,7 +1013,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_6\_2 +#### clifford\_6\_2 **Returns** @@ -1025,7 +1025,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_6\_3 +#### clifford\_6\_3 **Returns** @@ -1037,7 +1037,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_6\_4 +#### clifford\_6\_4 **Returns** @@ -1049,7 +1049,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_6\_5 +#### clifford\_6\_5 **Returns** @@ -1061,7 +1061,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_8\_1 +#### clifford\_8\_1 **Returns** @@ -1073,7 +1073,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_8\_2 +#### clifford\_8\_2 **Returns** @@ -1085,7 +1085,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_8\_3 +#### clifford\_8\_3 **Returns** @@ -1101,37 +1101,37 @@ Template circuits over Clifford gates. Template circuits with [`RZXGate`](qiskit.circuit.library.RZXGate "qiskit.circuit.library.RZXGate"). -### rzx\_yz +#### rzx\_yz Template for CX - RYGate - CX. -### rzx\_xz +#### rzx\_xz Template for CX - RXGate - CX. -### rzx\_cy +#### rzx\_cy Template for CX - RYGate - CX. -### rzx\_zz1 +#### rzx\_zz1 Template for CX - RZGate - CX. -### rzx\_zz2 +#### rzx\_zz2 Template for CX - RZGate - CX. -### rzx\_zz3 +#### rzx\_zz3 Template for CX - RZGate - CX. diff --git a/docs/api/qiskit/0.44/converters.mdx b/docs/api/qiskit/0.44/converters.mdx index b586532340e..a7b6fc60890 100644 --- a/docs/api/qiskit/0.44/converters.mdx +++ b/docs/api/qiskit/0.44/converters.mdx @@ -18,7 +18,7 @@ python_api_name: qiskit.converters `qiskit.converters` -### circuit\_to\_dag +## circuit\_to\_dag Build a [`DAGCircuit`](qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit") object from a [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit"). @@ -60,7 +60,7 @@ python_api_name: qiskit.converters ``` -### dag\_to\_circuit +## dag\_to\_circuit Build a `QuantumCircuit` object from a `DAGCircuit`. @@ -102,7 +102,7 @@ python_api_name: qiskit.converters ![../\_images/converters-1.png](/images/api/qiskit/0.44/converters-1.png) -### circuit\_to\_instruction +## circuit\_to\_instruction Build an [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.Instruction") object from a [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit"). @@ -145,7 +145,7 @@ python_api_name: qiskit.converters ``` -### circuit\_to\_gate +## circuit\_to\_gate Build a [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate") object from a [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit"). @@ -172,7 +172,7 @@ python_api_name: qiskit.converters [Gate](qiskit.circuit.Gate "qiskit.circuit.Gate") -### ast\_to\_dag +## ast\_to\_dag Build a `DAGCircuit` object from an AST `Node` object. @@ -212,7 +212,7 @@ python_api_name: qiskit.converters ``` -### dagdependency\_to\_circuit +## dagdependency\_to\_circuit Build a `QuantumCircuit` object from a `DAGDependency`. @@ -230,7 +230,7 @@ python_api_name: qiskit.converters [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### circuit\_to\_dagdependency +## circuit\_to\_dagdependency Build a `DAGDependency` object from a [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit"). @@ -249,7 +249,7 @@ python_api_name: qiskit.converters [DAGDependency](qiskit.dagcircuit.DAGDependency "qiskit.dagcircuit.DAGDependency") -### dag\_to\_dagdependency +## dag\_to\_dagdependency Build a `DAGDependency` object from a `DAGCircuit`. @@ -268,7 +268,7 @@ python_api_name: qiskit.converters [DAGDependency](qiskit.dagcircuit.DAGDependency "qiskit.dagcircuit.DAGDependency") -### dagdependency\_to\_dag +## dagdependency\_to\_dag Build a `DAGCircuit` object from a `DAGDependency`. diff --git a/docs/api/qiskit/0.44/exceptions.mdx b/docs/api/qiskit/0.44/exceptions.mdx index 7d620ababe8..317516729ab 100644 --- a/docs/api/qiskit/0.44/exceptions.mdx +++ b/docs/api/qiskit/0.44/exceptions.mdx @@ -20,7 +20,7 @@ python_api_name: qiskit.exceptions All Qiskit-related errors raised by Qiskit are subclasses of the base: -### QiskitError +## QiskitError Base class for errors raised by Qiskit. @@ -36,7 +36,7 @@ Many of the Qiskit subpackages define their own more granular error, to help in Qiskit has several optional features that depend on other packages that are not required for a minimal install. You can read more about those, and ways to check for their presence, in [`qiskit.utils.optionals`](utils#module-qiskit.utils.optionals "qiskit.utils.optionals"). Trying to use a feature that requires an optional extra will raise a particular error, which subclasses both [`QiskitError`](#qiskit.exceptions.QiskitError "qiskit.exceptions.QiskitError") and the Python built-in `ImportError`. -### MissingOptionalLibraryError +## MissingOptionalLibraryError Raised when an optional library is missing. @@ -46,7 +46,7 @@ Qiskit has several optional features that depend on other packages that are not Two more uncommon errors relate to failures in reading user-configuration files, or specifying a filename that cannot be used: -### QiskitUserConfigError +## QiskitUserConfigError Raised when an error is encountered reading a user config file. @@ -54,7 +54,7 @@ Two more uncommon errors relate to failures in reading user-configuration files, Set the error message. -### InvalidFileError +## InvalidFileError Raised when the file provided is not valid for the specific task. diff --git a/docs/api/qiskit/0.44/execute.mdx b/docs/api/qiskit/0.44/execute.mdx index 41f68bf3516..b7c4b128b88 100644 --- a/docs/api/qiskit/0.44/execute.mdx +++ b/docs/api/qiskit/0.44/execute.mdx @@ -18,7 +18,7 @@ python_api_name: qiskit.execute_function `qiskit.execute_function` -### execute +## execute Execute a list of [`qiskit.circuit.QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") or [`qiskit.pulse.Schedule`](qiskit.pulse.Schedule "qiskit.pulse.Schedule") on a backend. diff --git a/docs/api/qiskit/0.44/providers.mdx b/docs/api/qiskit/0.44/providers.mdx index a1c659888a2..760c3d12dbe 100644 --- a/docs/api/qiskit/0.44/providers.mdx +++ b/docs/api/qiskit/0.44/providers.mdx @@ -75,7 +75,7 @@ It’s worth pointing out that Terra’s version support policy doesn’t mean p ### Exceptions -### QiskitBackendNotFoundError +#### QiskitBackendNotFoundError Base class for errors raised while looking for a backend. @@ -83,7 +83,7 @@ It’s worth pointing out that Terra’s version support policy doesn’t mean p Set the error message. -### BackendPropertyError +#### BackendPropertyError Base class for errors raised while looking for a backend property. @@ -91,7 +91,7 @@ It’s worth pointing out that Terra’s version support policy doesn’t mean p Set the error message. -### JobError +#### JobError Base class for errors raised by Jobs. @@ -99,7 +99,7 @@ It’s worth pointing out that Terra’s version support policy doesn’t mean p Set the error message. -### JobTimeoutError +#### JobTimeoutError Base class for timeout errors raised by jobs. @@ -107,7 +107,7 @@ It’s worth pointing out that Terra’s version support policy doesn’t mean p Set the error message. -### BackendConfigurationError +#### BackendConfigurationError Base class for errors raised by the BackendConfiguration. diff --git a/docs/api/qiskit/0.44/pulse.mdx b/docs/api/qiskit/0.44/pulse.mdx index 490d8131ea8..6c234dec12c 100644 --- a/docs/api/qiskit/0.44/pulse.mdx +++ b/docs/api/qiskit/0.44/pulse.mdx @@ -75,6 +75,8 @@ An instruction can be added to a [`Schedule`](qiskit.pulse.Schedule "qiskit.puls These are all instances of the same base class: +### Instruction + The smallest schedulable unit: a single instruction. It has a fixed duration and specified channels. @@ -117,7 +119,7 @@ In contrast, the [`SymbolicPulse`](qiskit.pulse.library.SymbolicPulse "qiskit.pu ### Waveform Pulse Representation -### constant +#### constant Generates constant-sampled [`Waveform`](qiskit.pulse.library.Waveform "qiskit.pulse.library.Waveform"). @@ -143,7 +145,7 @@ $$ [*Waveform*](qiskit.pulse.library.Waveform "qiskit.pulse.library.waveform.Waveform") -### zero +#### zero Generates zero-sampled [`Waveform`](qiskit.pulse.library.Waveform "qiskit.pulse.library.Waveform"). @@ -168,7 +170,7 @@ $$ [*Waveform*](qiskit.pulse.library.Waveform "qiskit.pulse.library.waveform.Waveform") -### square +#### square Generates square wave [`Waveform`](qiskit.pulse.library.Waveform "qiskit.pulse.library.Waveform"). @@ -198,7 +200,7 @@ $$ [*Waveform*](qiskit.pulse.library.Waveform "qiskit.pulse.library.waveform.Waveform") -### sawtooth +#### sawtooth Generates sawtooth wave [`Waveform`](qiskit.pulse.library.Waveform "qiskit.pulse.library.Waveform"). @@ -245,7 +247,7 @@ $$ ![../\_images/pulse-1.png](/images/api/qiskit/0.44/pulse-1.png) -### triangle +#### triangle Generates triangle wave [`Waveform`](qiskit.pulse.library.Waveform "qiskit.pulse.library.Waveform"). @@ -292,7 +294,7 @@ $$ ![../\_images/pulse-2.png](/images/api/qiskit/0.44/pulse-2.png) -### cos +#### cos Generates cosine wave [`Waveform`](qiskit.pulse.library.Waveform "qiskit.pulse.library.Waveform"). @@ -320,7 +322,7 @@ $$ [*Waveform*](qiskit.pulse.library.Waveform "qiskit.pulse.library.waveform.Waveform") -### sin +#### sin Generates sine wave [`Waveform`](qiskit.pulse.library.Waveform "qiskit.pulse.library.Waveform"). @@ -348,7 +350,7 @@ $$ [*Waveform*](qiskit.pulse.library.Waveform "qiskit.pulse.library.waveform.Waveform") -### gaussian +#### gaussian Generates unnormalized gaussian [`Waveform`](qiskit.pulse.library.Waveform "qiskit.pulse.library.Waveform"). @@ -388,7 +390,7 @@ $$ [*Waveform*](qiskit.pulse.library.Waveform "qiskit.pulse.library.waveform.Waveform") -### gaussian\_deriv +#### gaussian\_deriv Generates unnormalized gaussian derivative [`Waveform`](qiskit.pulse.library.Waveform "qiskit.pulse.library.Waveform"). @@ -418,7 +420,7 @@ $$ [*Waveform*](qiskit.pulse.library.Waveform "qiskit.pulse.library.waveform.Waveform") -### sech +#### sech Generates unnormalized sech [`Waveform`](qiskit.pulse.library.Waveform "qiskit.pulse.library.Waveform"). @@ -456,7 +458,7 @@ $$ [*Waveform*](qiskit.pulse.library.Waveform "qiskit.pulse.library.waveform.Waveform") -### sech\_deriv +#### sech\_deriv Generates unnormalized sech derivative [`Waveform`](qiskit.pulse.library.Waveform "qiskit.pulse.library.Waveform"). @@ -485,7 +487,7 @@ $$ [*Waveform*](qiskit.pulse.library.Waveform "qiskit.pulse.library.waveform.Waveform") -### gaussian\_square +#### gaussian\_square Generates gaussian square [`Waveform`](qiskit.pulse.library.Waveform "qiskit.pulse.library.Waveform"). @@ -527,7 +529,7 @@ $$ [*Waveform*](qiskit.pulse.library.Waveform "qiskit.pulse.library.waveform.Waveform") -### drag +#### drag Generates Y-only correction DRAG [`Waveform`](qiskit.pulse.library.Waveform "qiskit.pulse.library.Waveform") for standard nonlinear oscillator (SNO) \[1]. @@ -619,6 +621,8 @@ Novel channel types can often utilize the [`ControlChannel`](qiskit.pulse.channe All channels are children of the same abstract base class: +### Channel + Base class of channels. Channels provide a Qiskit-side label for typical quantum control hardware signal channels. The final label -> physical channel mapping is the responsibility of the hardware backend. For instance, `DriveChannel(0)` holds instructions which the backend should map to the signal line driving gate operations on the qubit labeled (indexed) 0. @@ -672,6 +676,8 @@ The alignment transforms define alignment policies of instructions in [`Schedule These are all subtypes of the abstract base class [`AlignmentKind`](#qiskit.pulse.transforms.AlignmentKind "qiskit.pulse.transforms.AlignmentKind"). +#### AlignmentKind + An abstract class for schedule alignment. @@ -684,7 +690,7 @@ These are all subtypes of the abstract base class [`AlignmentKind`](#qiskit.puls The canonicalization transforms convert schedules to a form amenable for execution on OpenPulse backends. -### add\_implicit\_acquires +#### add\_implicit\_acquires Return a new schedule with implicit acquires from the measurement mapping replaced by explicit ones. @@ -707,7 +713,7 @@ The canonicalization transforms convert schedules to a form amenable for executi [*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") -### align\_measures +#### align\_measures Return new schedules where measurements occur at the same physical time. @@ -774,7 +780,7 @@ The canonicalization transforms convert schedules to a form amenable for executi [*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")\[[*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule")] -### block\_to\_schedule +#### block\_to\_schedule Convert `ScheduleBlock` to `Schedule`. @@ -801,7 +807,7 @@ The canonicalization transforms convert schedules to a form amenable for executi -### compress\_pulses +#### compress\_pulses Optimization pass to replace identical pulses. @@ -819,7 +825,7 @@ The canonicalization transforms convert schedules to a form amenable for executi [*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")\[[*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule")] -### flatten +#### flatten Flatten (inline) any called nodes into a Schedule tree with no nested children. @@ -841,7 +847,7 @@ The canonicalization transforms convert schedules to a form amenable for executi [*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") -### inline\_subroutines +#### inline\_subroutines Recursively remove call instructions and inline the respective subroutine instructions. @@ -865,7 +871,7 @@ The canonicalization transforms convert schedules to a form amenable for executi [*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") | [*ScheduleBlock*](qiskit.pulse.ScheduleBlock "qiskit.pulse.schedule.ScheduleBlock") -### pad +#### pad Pad the input Schedule with `Delay``s on all unoccupied timeslots until ``schedule.duration` or `until` if not `None`. @@ -891,7 +897,7 @@ The canonicalization transforms convert schedules to a form amenable for executi [*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") -### remove\_directives +#### remove\_directives Remove directives. @@ -909,7 +915,7 @@ The canonicalization transforms convert schedules to a form amenable for executi [*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") -### remove\_trivial\_barriers +#### remove\_trivial\_barriers Remove trivial barriers with 0 or 1 channels. @@ -933,7 +939,7 @@ The canonicalization transforms convert schedules to a form amenable for executi The DAG transforms create DAG representation of input program. This can be used for optimization of instructions and equality checks. -### block\_to\_dag +#### block\_to\_dag Convert schedule block instruction into DAG. @@ -991,7 +997,7 @@ The DAG transforms create DAG representation of input program. This can be used A sequence of transformations to generate a target code. -### target\_qobj\_transform +#### target\_qobj\_transform A basic pulse program transformation for OpenPulse API execution. @@ -1264,7 +1270,7 @@ with pulse.build(backend) as drive_sched: DriveChannel(0) ``` -### acquire\_channel +#### acquire\_channel Return `AcquireChannel` for `qubit` on the active builder backend. @@ -1290,7 +1296,7 @@ DriveChannel(0) [*AcquireChannel*](qiskit.pulse.channels.AcquireChannel "qiskit.pulse.channels.AcquireChannel") -### control\_channels +#### control\_channels Return `ControlChannel` for `qubit` on the active builder backend. @@ -1325,7 +1331,7 @@ DriveChannel(0) [*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")\[[*ControlChannel*](qiskit.pulse.channels.ControlChannel "qiskit.pulse.channels.ControlChannel")] -### drive\_channel +#### drive\_channel Return `DriveChannel` for `qubit` on the active builder backend. @@ -1351,7 +1357,7 @@ DriveChannel(0) [*DriveChannel*](qiskit.pulse.channels.DriveChannel "qiskit.pulse.channels.DriveChannel") -### measure\_channel +#### measure\_channel Return `MeasureChannel` for `qubit` on the active builder backend. @@ -1410,7 +1416,7 @@ drive_sched.draw() ![../\_images/pulse-6.png](/images/api/qiskit/0.44/pulse-6.png) -### acquire +#### acquire Acquire for a `duration` on a `channel` and store the result in a `register`. @@ -1447,7 +1453,7 @@ drive_sched.draw() [**exceptions.PulseError**](#qiskit.pulse.PulseError "qiskit.pulse.exceptions.PulseError") – If the register type is not supported. -### barrier +#### barrier Barrier directive for a set of channels and qubits. @@ -1514,7 +1520,7 @@ drive_sched.draw() * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) – Name for the barrier -### call +#### call Call the subroutine within the currently active builder context with arbitrary parameters which will be assigned to the target program. @@ -1728,7 +1734,7 @@ drive_sched.draw() * **kw\_params** ([*ParameterExpression*](qiskit.circuit.ParameterExpression "qiskit.circuit.parameterexpression.ParameterExpression") *|*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) – Alternative way to provide parameters. Since this is keyed on the string parameter name, the parameters having the same name are all updated together. If you want to avoid name collision, use `value_dict` with [`Parameter`](qiskit.circuit.Parameter "qiskit.circuit.Parameter") objects instead. -### delay +#### delay Delay on a `channel` for a `duration`. @@ -1751,7 +1757,7 @@ drive_sched.draw() * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) – Name of the instruction. -### play +#### play Play a `pulse` on a `channel`. @@ -1774,7 +1780,7 @@ drive_sched.draw() * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) – Name of the pulse. -### reference +#### reference Refer to undefined subroutine by string keys. @@ -1799,7 +1805,7 @@ drive_sched.draw() * **extra\_keys** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) – Helper keys to uniquely specify the subroutine. -### set\_frequency +#### set\_frequency Set the `frequency` of a pulse `channel`. @@ -1822,7 +1828,7 @@ drive_sched.draw() * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) – Name of the instruction. -### set\_phase +#### set\_phase Set the `phase` of a pulse `channel`. @@ -1847,7 +1853,7 @@ drive_sched.draw() * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) – Name of the instruction. -### shift\_frequency +#### shift\_frequency Shift the `frequency` of a pulse `channel`. @@ -1870,7 +1876,7 @@ drive_sched.draw() * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) – Name of the instruction. -### shift\_phase +#### shift\_phase Shift the `phase` of a pulse `channel`. @@ -1895,7 +1901,7 @@ drive_sched.draw() * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) – Name of the instruction. -### snapshot +#### snapshot Simulator snapshot. @@ -1937,7 +1943,7 @@ pulse_prog.draw() ![../\_images/pulse-7.png](/images/api/qiskit/0.44/pulse-7.png) -### align\_equispaced +#### align\_equispaced Equispaced alignment pulse scheduling context. @@ -1983,7 +1989,7 @@ pulse_prog.draw() The scheduling is performed for sub-schedules within the context rather than channel-wise. If you want to apply the equispaced context for each channel, you should use the context independently for channels. -### align\_func +#### align\_func Callback defined alignment pulse scheduling context. @@ -2035,7 +2041,7 @@ pulse_prog.draw() The scheduling is performed for sub-schedules within the context rather than channel-wise. If you want to apply the numerical context for each channel, you need to apply the context independently to channels. -### align\_left +#### align\_left Left alignment pulse scheduling context. @@ -2070,7 +2076,7 @@ pulse_prog.draw() [*ContextManager*](https://docs.python.org/3/library/typing.html#typing.ContextManager "(in Python v3.12)")\[None] -### align\_right +#### align\_right Right alignment pulse scheduling context. @@ -2105,7 +2111,7 @@ pulse_prog.draw() [*AlignmentKind*](#qiskit.pulse.transforms.AlignmentKind "qiskit.pulse.transforms.alignments.AlignmentKind") -### align\_sequential +#### align\_sequential Sequential alignment pulse scheduling context. @@ -2140,7 +2146,7 @@ pulse_prog.draw() [*AlignmentKind*](#qiskit.pulse.transforms.AlignmentKind "qiskit.pulse.transforms.alignments.AlignmentKind") -### circuit\_scheduler\_settings +#### circuit\_scheduler\_settings Set the currently active circuit scheduler settings for this context. @@ -2169,7 +2175,7 @@ pulse_prog.draw() [*ContextManager*](https://docs.python.org/3/library/typing.html#typing.ContextManager "(in Python v3.12)")\[None] -### frequency\_offset +#### frequency\_offset Shift the frequency of inputs channels on entry into context and undo on exit. @@ -2213,7 +2219,7 @@ pulse_prog.draw() [*ContextManager*](https://docs.python.org/3/library/typing.html#typing.ContextManager "(in Python v3.12)")\[None] -### phase\_offset +#### phase\_offset Shift the phase of input channels on entry into context and undo on exit. @@ -2248,7 +2254,7 @@ pulse_prog.draw() [*ContextManager*](https://docs.python.org/3/library/typing.html#typing.ContextManager "(in Python v3.12)")\[None] -### transpiler\_settings +#### transpiler\_settings Set the currently active transpiler settings for this context. @@ -2296,7 +2302,7 @@ with pulse.build(backend) as measure_sched: MemorySlot(0) ``` -### measure +#### measure Measure a qubit within the currently active builder context. @@ -2351,7 +2357,7 @@ MemorySlot(0) [*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")\[StorageLocation] | StorageLocation -### measure\_all +#### measure\_all Measure all qubits within the currently active builder context. @@ -2384,7 +2390,7 @@ MemorySlot(0) [*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")\[[*MemorySlot*](qiskit.pulse.channels.MemorySlot "qiskit.pulse.channels.MemorySlot")] -### delay\_qubits +#### delay\_qubits Insert delays on all of the `channels.Channel`s that correspond to the input `qubits` at the same time. @@ -2432,7 +2438,7 @@ with pulse.build(backend) as u3_sched: pulse.u3(math.pi, 0, math.pi, 0) ``` -### cx +#### cx Call a `CXGate` on the input physical qubits. @@ -2454,7 +2460,7 @@ with pulse.build(backend) as u3_sched: ``` -### u1 +#### u1 Call a `U1Gate` on the input physical qubit. @@ -2478,7 +2484,7 @@ with pulse.build(backend) as u3_sched: ``` -### u2 +#### u2 Call a `U2Gate` on the input physical qubit. @@ -2502,7 +2508,7 @@ with pulse.build(backend) as u3_sched: ``` -### u3 +#### u3 Call a `U3Gate` on the input physical qubit. @@ -2526,7 +2532,7 @@ with pulse.build(backend) as u3_sched: ``` -### x +#### x Call a `XGate` on the input physical qubit. @@ -2577,7 +2583,7 @@ There are 160 samples in 3.5555555555555554e-08 seconds There are 1e-06 seconds in 4500 samples. ``` -### active\_backend +#### active\_backend Get the backend of the currently active builder context. @@ -2597,7 +2603,7 @@ There are 1e-06 seconds in 4500 samples. [**exceptions.BackendNotSet**](#qiskit.pulse.BackendNotSet "qiskit.pulse.exceptions.BackendNotSet") – If the builder does not have a backend set. -### active\_transpiler\_settings +#### active\_transpiler\_settings Return the current active builder context’s transpiler settings. @@ -2626,7 +2632,7 @@ There are 1e-06 seconds in 4500 samples. [*Dict*](https://docs.python.org/3/library/typing.html#typing.Dict "(in Python v3.12)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)"), [*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.12)")] -### active\_circuit\_scheduler\_settings +#### active\_circuit\_scheduler\_settings Return the current active builder context’s circuit scheduler settings. @@ -2656,7 +2662,7 @@ There are 1e-06 seconds in 4500 samples. [*Dict*](https://docs.python.org/3/library/typing.html#typing.Dict "(in Python v3.12)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)"), [*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.12)")] -### num\_qubits +#### num\_qubits Return number of qubits in the currently active backend. @@ -2686,7 +2692,7 @@ There are 1e-06 seconds in 4500 samples. [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") -### qubit\_channels +#### qubit\_channels Returns the set of channels associated with a qubit. @@ -2720,7 +2726,7 @@ There are 1e-06 seconds in 4500 samples. [*Set*](https://docs.python.org/3/library/typing.html#typing.Set "(in Python v3.12)")\[[*Channel*](#qiskit.pulse.channels.Channel "qiskit.pulse.channels.Channel")] -### samples\_to\_seconds +#### samples\_to\_seconds Obtain the time in seconds that will elapse for the input number of samples on the active backend. @@ -2738,7 +2744,7 @@ There are 1e-06 seconds in 4500 samples. [float](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)") | [*ndarray*](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray "(in NumPy v1.26)") -### seconds\_to\_samples +#### seconds\_to\_samples Obtain the number of samples that will elapse in `seconds` on the active backend. diff --git a/docs/api/qiskit/0.44/qasm.mdx b/docs/api/qiskit/0.44/qasm.mdx index fc92249ca1e..066e0af9a95 100644 --- a/docs/api/qiskit/0.44/qasm.mdx +++ b/docs/api/qiskit/0.44/qasm.mdx @@ -20,6 +20,8 @@ python_api_name: qiskit.qasm ## QASM Routines +### Qasm + OPENQASM circuit object. @@ -28,14 +30,20 @@ python_api_name: qiskit.qasm ## Pygments +### OpenQASMLexer + A pygments lexer for OpenQasm. +### QasmHTMLStyle + A style for OpenQasm in a HTML env (e.g. Jupyter widget). +### QasmTerminalStyle + A style for OpenQasm in a Terminal env (e.g. Jupyter print). diff --git a/docs/api/qiskit/0.44/qasm2.mdx b/docs/api/qiskit/0.44/qasm2.mdx index 56a3a71ab09..d63789eb490 100644 --- a/docs/api/qiskit/0.44/qasm2.mdx +++ b/docs/api/qiskit/0.44/qasm2.mdx @@ -81,6 +81,8 @@ Both of these loading functions also take an argument `include_path`, which is a You can extend the quantum components of the OpenQASM 2 language by passing an iterable of information on custom instructions as the argument `custom_instructions`. In files that have compatible definitions for these instructions, the given `constructor` will be used in place of whatever other handling [`qiskit.qasm2`](#module-qiskit.qasm2 "qiskit.qasm2") would have done. These instructions may optionally be marked as `builtin`, which causes them to not require an `opaque` or `gate` declaration, but they will silently ignore a compatible declaration. Either way, it is an error to provide a custom instruction that has a different number of parameters or qubits as a defined instruction in a parsed program. Each element of the argument iterable should be a particular data class: +#### CustomInstruction + Information about a custom instruction that should be defined during the parse. @@ -97,6 +99,8 @@ This can be particularly useful when trying to resolve ambiguities in the global Similar to the quantum extensions above, you can also extend the processing done to classical expressions (arguments to gates) by passing an iterable to the argument `custom_classical` to either loader. This needs the `name` (a valid OpenQASM 2 identifier), the number `num_params` of parameters it takes, and a Python callable that implements the function. The Python callable must be able to accept `num_params` positional floating-point arguments, and must return a float or integer (which will be converted to a float). Builtin functions cannot be overridden. +#### CustomClassical + Information about a custom classical function that should be defined in mathematical expressions. diff --git a/docs/api/qiskit/0.44/qasm3.mdx b/docs/api/qiskit/0.44/qasm3.mdx index d6300fbe26c..743d1736329 100644 --- a/docs/api/qiskit/0.44/qasm3.mdx +++ b/docs/api/qiskit/0.44/qasm3.mdx @@ -57,6 +57,8 @@ The high-level functions are simply [`dump()`](#qiskit.qasm3.dump "qiskit.qasm3. Both of these exporter functions are single-use wrappers around the main [`Exporter`](#qiskit.qasm3.Exporter "qiskit.qasm3.Exporter") class. For more complex exporting needs, including dumping multiple circuits in a single session, it may be more convenient or faster to use the complete interface. +### Exporter + QASM3 exporter main class. @@ -88,13 +90,13 @@ Both of these exporter functions are single-use wrappers around the main [`Expor * **experimental** ([*ExperimentalFeatures*](#qiskit.qasm3.ExperimentalFeatures "qiskit.qasm3.experimental.ExperimentalFeatures")) – any experimental features to enable during the export. See [`ExperimentalFeatures`](#qiskit.qasm3.ExperimentalFeatures "qiskit.qasm3.ExperimentalFeatures") for more details. - ### dump + #### dump Convert the circuit to OpenQASM 3, dumping the result to a file or text stream. - ### dumps + #### dumps Convert the circuit to OpenQASM 3, returning the result as a string. @@ -115,12 +117,14 @@ All of these interfaces will raise [`QASM3ExporterError`](#qiskit.qasm3.QASM3Exp The OpenQASM 3 language is still evolving as hardware capabilities improve, so there is no final syntax that Qiskit can reliably target. In order to represent the evolving language, we will sometimes release features before formal standardization, which may need to change as the review process in the OpenQASM 3 design committees progresses. By default, the exporters will only support standardised features of the language. To enable these early-release features, use the `experimental` keyword argument of [`dump()`](#qiskit.qasm3.dump "qiskit.qasm3.dump") and [`dumps()`](#qiskit.qasm3.dumps "qiskit.qasm3.dumps"). The available feature flags are: +#### ExperimentalFeatures + Flags for experimental features that the OpenQASM 3 exporter supports. These are experimental and are more liable to change, because the OpenQASM 3 specification has not formally accepted them yet, so the syntax may not be finalized. - ### SWITCH\_CASE\_V1 + ##### SWITCH\_CASE\_V1 Support exporting switch-case statements as proposed by [https://github.com/openqasm/openqasm/pull/463](https://github.com/openqasm/openqasm/pull/463) at [commit bfa787aa3078](https://github.com/openqasm/openqasm/pull/463/commits/bfa787aa3078). diff --git a/docs/api/qiskit/0.44/qpy.mdx b/docs/api/qiskit/0.44/qpy.mdx index b7636f1060a..8c9efab18d4 100644 --- a/docs/api/qiskit/0.44/qpy.mdx +++ b/docs/api/qiskit/0.44/qpy.mdx @@ -55,7 +55,7 @@ and then loading that file will return a list with all the circuits ### API documentation -### load +#### load Load a QPY binary file @@ -100,7 +100,7 @@ and then loading that file will return a list with all the circuits [*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")\[[*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit") | [*ScheduleBlock*](qiskit.pulse.ScheduleBlock "qiskit.pulse.schedule.ScheduleBlock")] -### dump +#### dump Write QPY binary data to a file @@ -155,7 +155,7 @@ and then loading that file will return a list with all the circuits These functions will raise a custom subclass of [`QiskitError`](exceptions#qiskit.exceptions.QiskitError "qiskit.exceptions.QiskitError") if they encounter problems during serialization or deserialization. -### QpyError +#### QpyError Errors raised by the qpy module. diff --git a/docs/api/qiskit/0.44/result.mdx b/docs/api/qiskit/0.44/result.mdx index 4277aa3d537..f333b8c5a51 100644 --- a/docs/api/qiskit/0.44/result.mdx +++ b/docs/api/qiskit/0.44/result.mdx @@ -24,7 +24,7 @@ python_api_name: qiskit.result | [`ResultError`](qiskit.result.ResultError "qiskit.result.ResultError")(error) | Exceptions raised due to errors in result output. | | [`Counts`](qiskit.result.Counts "qiskit.result.Counts")(data\[, time\_taken, creg\_sizes, ...]) | A class to store a counts result from a circuit execution. | -### marginal\_counts +## marginal\_counts Marginalize counts from an experiment over some indices of interest. @@ -52,7 +52,7 @@ python_api_name: qiskit.result [**QiskitError**](exceptions#qiskit.exceptions.QiskitError "qiskit.exceptions.QiskitError") – in case of invalid indices to marginalize over. -### marginal\_distribution +## marginal\_distribution Marginalize counts from an experiment over some indices of interest. @@ -79,7 +79,7 @@ python_api_name: qiskit.result * **is invalid.** – -### marginal\_memory +## marginal\_memory Marginalize shot memory diff --git a/docs/api/qiskit/0.44/scheduler.mdx b/docs/api/qiskit/0.44/scheduler.mdx index 34a4de13b86..407bf9dbd6e 100644 --- a/docs/api/qiskit/0.44/scheduler.mdx +++ b/docs/api/qiskit/0.44/scheduler.mdx @@ -20,6 +20,8 @@ python_api_name: qiskit.scheduler A circuit scheduler compiles a circuit program to a pulse program. +## ScheduleConfig + Configuration for pulse scheduling. @@ -32,7 +34,7 @@ A circuit scheduler compiles a circuit program to a pulse program. * **dt** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) – Sample duration. -### schedule\_circuit +## schedule\_circuit Basic scheduling pass from a circuit to a pulse Schedule, using the backend. If no method is specified, then a basic, as late as possible scheduling pass is performed, i.e. pulses are scheduled to occur as late as possible. @@ -65,7 +67,7 @@ A circuit scheduler compiles a circuit program to a pulse program. Pulse scheduling methods. -### as\_soon\_as\_possible +## as\_soon\_as\_possible Return the pulse Schedule which implements the input circuit using an “as soon as possible” (asap) scheduling policy. @@ -86,7 +88,7 @@ Pulse scheduling methods. [*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") -### as\_late\_as\_possible +## as\_late\_as\_possible Return the pulse Schedule which implements the input circuit using an “as late as possible” (alap) scheduling policy. diff --git a/docs/api/qiskit/0.44/tools.mdx b/docs/api/qiskit/0.44/tools.mdx index 9bcdf1d96c4..cc3bc4125c0 100644 --- a/docs/api/qiskit/0.44/tools.mdx +++ b/docs/api/qiskit/0.44/tools.mdx @@ -149,6 +149,8 @@ A helper module to get IBM backend information and submitted job status. A helper component for publishing and subscribing to events. +#### TextProgressBar + A simple text-based progress bar. diff --git a/docs/api/qiskit/0.44/transpiler.mdx b/docs/api/qiskit/0.44/transpiler.mdx index b3a2d5b92c2..537af658de7 100644 --- a/docs/api/qiskit/0.44/transpiler.mdx +++ b/docs/api/qiskit/0.44/transpiler.mdx @@ -934,7 +934,7 @@ See [https://arxiv.org/abs/2102.01682](https://arxiv.org/abs/2102.01682) for mor ### Exceptions -### TranspilerError +#### TranspilerError Exceptions raised during transpilation. @@ -942,7 +942,7 @@ See [https://arxiv.org/abs/2102.01682](https://arxiv.org/abs/2102.01682) for mor Set the error message. -### TranspilerAccessError +#### TranspilerAccessError DEPRECATED: Exception of access error in the transpiler passes. @@ -950,7 +950,7 @@ See [https://arxiv.org/abs/2102.01682](https://arxiv.org/abs/2102.01682) for mor Set the error message. -### CouplingError +#### CouplingError Base class for errors raised by the coupling graph object. @@ -958,7 +958,7 @@ See [https://arxiv.org/abs/2102.01682](https://arxiv.org/abs/2102.01682) for mor Set the error message. -### LayoutError +#### LayoutError Errors raised by the layout object. diff --git a/docs/api/qiskit/0.44/utils.mdx b/docs/api/qiskit/0.44/utils.mdx index bed5ffff05a..d476b85ae55 100644 --- a/docs/api/qiskit/0.44/utils.mdx +++ b/docs/api/qiskit/0.44/utils.mdx @@ -18,7 +18,7 @@ python_api_name: qiskit.utils `qiskit.utils` -### add\_deprecation\_to\_docstring +## add\_deprecation\_to\_docstring Dynamically insert the deprecation message into `func`’s docstring. @@ -31,7 +31,7 @@ python_api_name: qiskit.utils * **pending** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) – Is the deprecation still pending? -### deprecate\_arg +## deprecate\_arg Decorator to indicate an argument has been deprecated in some way. @@ -59,7 +59,7 @@ python_api_name: qiskit.utils Callable -### deprecate\_arguments +## deprecate\_arguments Deprecated. Instead, use @deprecate\_arg. @@ -79,7 +79,7 @@ python_api_name: qiskit.utils Callable -### deprecate\_func +## deprecate\_func Decorator to indicate a function has been deprecated. @@ -106,7 +106,7 @@ python_api_name: qiskit.utils Callable -### deprecate\_function +## deprecate\_function Deprecated. Instead, use @deprecate\_func. @@ -127,7 +127,7 @@ python_api_name: qiskit.utils Callable -### local\_hardware\_info +## local\_hardware\_info Basic hardware information about the local machine. @@ -143,13 +143,13 @@ python_api_name: qiskit.utils [dict](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.12)") -### is\_main\_process +## is\_main\_process Checks whether the current process is the main one -### apply\_prefix +## apply\_prefix Given a SI unit prefix and value, apply the prefix to convert to standard SI unit. @@ -180,7 +180,7 @@ python_api_name: qiskit.utils [float](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)") -### detach\_prefix +## detach\_prefix Given a SI unit value, find the most suitable prefix to scale the value. @@ -222,7 +222,7 @@ python_api_name: qiskit.utils [*Tuple*](https://docs.python.org/3/library/typing.html#typing.Tuple "(in Python v3.12)")\[[float](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)"), [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")] -### wrap\_method +## wrap\_method Wrap the functionality the instance- or class method `cls.name` with additional behaviour `before` and `after`. @@ -448,6 +448,8 @@ Each of the lazy checkers is an instance of [`LazyDependencyManager`](#qiskit.ut from qiskit.utils import LazyImportTester ``` +#### LazyDependencyManager + A mananger for some optional features that are expensive to import, or to verify the existence of. @@ -486,7 +488,7 @@ from qiskit.utils import LazyImportTester * **install** – how to install this optional dependency. Passed to [`MissingOptionalLibraryError`](exceptions#qiskit.exceptions.MissingOptionalLibraryError "qiskit.exceptions.MissingOptionalLibraryError") as the `pip_install` parameter. * **msg** – an extra message to include in the error raised if this is required. - ### \_is\_available + ##### \_is\_available Subclasses of [`LazyDependencyManager`](#qiskit.utils.LazyDependencyManager "qiskit.utils.LazyDependencyManager") should override this method to implement the actual test of availability. This method should return a Boolean, where `True` indicates that the dependency was available. This method will only ever be called once. @@ -496,13 +498,13 @@ from qiskit.utils import LazyImportTester [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)") - ### disable\_locally + ##### disable\_locally Create a context, during which the value of the dependency manager will be `False`. This means that within the context, any calls to this object will behave as if the dependency is not available, including raising errors. It is valid to call this method whether or not the dependency has already been evaluated. This is most useful in tests. - ### require\_in\_call + ##### require\_in\_call Create a decorator for callables that requires that the dependency is available when the decorated function or method is called. @@ -520,7 +522,7 @@ from qiskit.utils import LazyImportTester Callable - ### require\_in\_instance + ##### require\_in\_instance A class decorator that requires the dependency is available when the class is initialised. This decorator can be used even if the class does not define an `__init__` method. @@ -538,7 +540,7 @@ from qiskit.utils import LazyImportTester Callable - ### require\_now + ##### require\_now Eagerly attempt to import the dependencies in this object, and raise an exception if they cannot be imported. @@ -553,6 +555,8 @@ from qiskit.utils import LazyImportTester +#### LazyImportTester + A lazy dependency tester for importable Python modules. Any required objects will only be imported at the point that this object is tested for its Boolean value. @@ -565,6 +569,8 @@ from qiskit.utils import LazyImportTester [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError "(in Python v3.12)") – if no modules are given. +#### LazySubprocessTester + A lazy checker that a command-line tool is available. The command will only be run once, at the point that this object is checked for its Boolean value. From dfc0f28de5584953a29c76b17bdc91a73a7536a2 Mon Sep 17 00:00:00 2001 From: Arnau Casau Date: Fri, 3 May 2024 11:41:38 +0200 Subject: [PATCH 25/31] Regenerate qiskit 0.45.3 --- docs/api/qiskit/0.45/algorithms.mdx | 6 +- docs/api/qiskit/0.45/circuit.mdx | 4 +- docs/api/qiskit/0.45/circuit_classical.mdx | 100 +++++++----- docs/api/qiskit/0.45/circuit_library.mdx | 142 +++++++++--------- docs/api/qiskit/0.45/circuit_singleton.mdx | 8 +- docs/api/qiskit/0.45/converters.mdx | 18 +-- docs/api/qiskit/0.45/exceptions.mdx | 8 +- docs/api/qiskit/0.45/execute.mdx | 2 +- docs/api/qiskit/0.45/passmanager.mdx | 2 +- docs/api/qiskit/0.45/providers.mdx | 10 +- .../qiskit/0.45/providers_fake_provider.mdx | 8 + docs/api/qiskit/0.45/pulse.mdx | 132 ++++++++-------- docs/api/qiskit/0.45/qasm.mdx | 8 + docs/api/qiskit/0.45/qasm2.mdx | 4 + docs/api/qiskit/0.45/qasm3.mdx | 10 +- docs/api/qiskit/0.45/qpy.mdx | 6 +- docs/api/qiskit/0.45/result.mdx | 6 +- docs/api/qiskit/0.45/scheduler.mdx | 8 +- docs/api/qiskit/0.45/tools.mdx | 2 + docs/api/qiskit/0.45/transpiler.mdx | 8 +- docs/api/qiskit/0.45/utils.mdx | 36 +++-- 21 files changed, 300 insertions(+), 228 deletions(-) diff --git a/docs/api/qiskit/0.45/algorithms.mdx b/docs/api/qiskit/0.45/algorithms.mdx index bc6ae941f5a..53efd605364 100644 --- a/docs/api/qiskit/0.45/algorithms.mdx +++ b/docs/api/qiskit/0.45/algorithms.mdx @@ -193,7 +193,7 @@ Algorithms that compute the fidelity of pairs of quantum states. ### Exceptions -### AlgorithmError +#### AlgorithmError For Algorithm specific errors. @@ -213,7 +213,7 @@ Utility classes used by algorithms (mainly for type-hinting purposes). Utility functions used by algorithms. -### eval\_observables +#### eval\_observables Deprecated: Accepts a list or a dictionary of operators and calculates their expectation values - means and standard deviations. They are calculated with respect to a quantum state provided. A user can optionally provide a threshold value which filters mean values falling below the threshold. @@ -245,7 +245,7 @@ Utility functions used by algorithms. ListOrDict\[[tuple](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.12)")\[[complex](https://docs.python.org/3/library/functions.html#complex "(in Python v3.12)"), [complex](https://docs.python.org/3/library/functions.html#complex "(in Python v3.12)")]] -### estimate\_observables +#### estimate\_observables Accepts a sequence of operators and calculates their expectation values - means and metadata. They are calculated with respect to a quantum state provided. A user can optionally provide a threshold value which filters mean values falling below the threshold. diff --git a/docs/api/qiskit/0.45/circuit.mdx b/docs/api/qiskit/0.45/circuit.mdx index 4deb217fe69..425d866ed94 100644 --- a/docs/api/qiskit/0.45/circuit.mdx +++ b/docs/api/qiskit/0.45/circuit.mdx @@ -284,7 +284,7 @@ with qc.switch(cr) as case: ### Random Circuits -### random\_circuit +#### random\_circuit Generate random circuit of arbitrary size and form. @@ -342,7 +342,7 @@ with qc.switch(cr) as case: Almost all circuit functions and methods will raise a [`CircuitError`](#qiskit.circuit.CircuitError "qiskit.circuit.CircuitError") when encountering an error that is particular to usage of Qiskit (as opposed to regular typing or indexing problems, which will typically raise the corresponding standard Python error). -### CircuitError +#### CircuitError Base class for errors raised while processing a circuit. diff --git a/docs/api/qiskit/0.45/circuit_classical.mdx b/docs/api/qiskit/0.45/circuit_classical.mdx index 6b88e639f9c..94dd4fba451 100644 --- a/docs/api/qiskit/0.45/circuit_classical.mdx +++ b/docs/api/qiskit/0.45/circuit_classical.mdx @@ -48,6 +48,8 @@ There are two pathways for constructing expressions. The classes that form [the The expression system is based on tree representation. All nodes in the tree are final (uninheritable) instances of the abstract base class: +#### Expr + Root base class of all nodes in the expression tree. The base case should never be instantiated directly. @@ -60,18 +62,24 @@ These objects are mutable and should not be reused in a different location witho The entry point from general circuit objects to the expression system is by wrapping the object in a [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.Var") node and associating a [`Type`](#qiskit.circuit.classical.types.Type "qiskit.circuit.classical.types.Type") with it. +#### Var + A classical variable. Similarly, literals used in comparison (such as integers) should be lifted to [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes with associated types. +#### Value + A single scalar value. The operations traditionally associated with pre-, post- or infix operators in programming are represented by the [`Unary`](#qiskit.circuit.classical.expr.Unary "qiskit.circuit.classical.expr.Unary") and [`Binary`](#qiskit.circuit.classical.expr.Binary "qiskit.circuit.classical.expr.Binary") nodes as appropriate. These each take an operation type code, which are exposed as enumerations inside each class as [`Unary.Op`](#qiskit.circuit.classical.expr.Unary.Op "qiskit.circuit.classical.expr.Unary.Op") and [`Binary.Op`](#qiskit.circuit.classical.expr.Binary.Op "qiskit.circuit.classical.expr.Binary.Op") respectively. +#### Unary + A unary expression. @@ -81,6 +89,8 @@ The operations traditionally associated with pre-, post- or infix operators in p * **operand** ([*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.Expr")) – The operand of the operation. * **type** ([*Type*](#qiskit.circuit.classical.types.Type "qiskit.circuit.classical.types.types.Type")) – The resolved type of the result. + ##### Op + Enumeration of the opcodes for unary operations. @@ -88,13 +98,13 @@ The operations traditionally associated with pre-, post- or infix operators in p The logical negation [`LOGIC_NOT`](#qiskit.circuit.classical.expr.Unary.Op.LOGIC_NOT "qiskit.circuit.classical.expr.Unary.Op.LOGIC_NOT") takes an input that is implicitly coerced to a Boolean, and returns a Boolean. - ### BIT\_NOT + ###### BIT\_NOT Bitwise negation. `~operand`. - ### LOGIC\_NOT + ###### LOGIC\_NOT Logical negation. `!operand`. @@ -102,6 +112,8 @@ The operations traditionally associated with pre-, post- or infix operators in p +#### Binary + A binary expression. @@ -112,6 +124,8 @@ The operations traditionally associated with pre-, post- or infix operators in p * **right** ([*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.Expr")) – The right-hand operand. * **type** ([*Type*](#qiskit.circuit.classical.types.Type "qiskit.circuit.classical.types.types.Type")) – The resolved type of the result. + ##### Op + Enumeration of the opcodes for binary operations. @@ -121,67 +135,67 @@ The operations traditionally associated with pre-, post- or infix operators in p The binary mathematical relations [`EQUAL`](#qiskit.circuit.classical.expr.Binary.Op.EQUAL "qiskit.circuit.classical.expr.Binary.Op.EQUAL"), [`NOT_EQUAL`](#qiskit.circuit.classical.expr.Binary.Op.NOT_EQUAL "qiskit.circuit.classical.expr.Binary.Op.NOT_EQUAL"), [`LESS`](#qiskit.circuit.classical.expr.Binary.Op.LESS "qiskit.circuit.classical.expr.Binary.Op.LESS"), [`LESS_EQUAL`](#qiskit.circuit.classical.expr.Binary.Op.LESS_EQUAL "qiskit.circuit.classical.expr.Binary.Op.LESS_EQUAL"), [`GREATER`](#qiskit.circuit.classical.expr.Binary.Op.GREATER "qiskit.circuit.classical.expr.Binary.Op.GREATER") and [`GREATER_EQUAL`](#qiskit.circuit.classical.expr.Binary.Op.GREATER_EQUAL "qiskit.circuit.classical.expr.Binary.Op.GREATER_EQUAL") take unsigned integers (with an implicit cast to make them the same width), and return a Boolean. - ### BIT\_AND + ###### BIT\_AND Bitwise “and”. `lhs & rhs`. - ### BIT\_OR + ###### BIT\_OR Bitwise “or”. `lhs | rhs`. - ### BIT\_XOR + ###### BIT\_XOR Bitwise “exclusive or”. `lhs ^ rhs`. - ### LOGIC\_AND + ###### LOGIC\_AND Logical “and”. `lhs && rhs`. - ### LOGIC\_OR + ###### LOGIC\_OR Logical “or”. `lhs || rhs`. - ### EQUAL + ###### EQUAL Numeric equality. `lhs == rhs`. - ### NOT\_EQUAL + ###### NOT\_EQUAL Numeric inequality. `lhs != rhs`. - ### LESS + ###### LESS Numeric less than. `lhs < rhs`. - ### LESS\_EQUAL + ###### LESS\_EQUAL Numeric less than or equal to. `lhs <= rhs` - ### GREATER + ###### GREATER Numeric greater than. `lhs > rhs`. - ### GREATER\_EQUAL + ###### GREATER\_EQUAL Numeric greater than or equal to. `lhs >= rhs`. @@ -193,6 +207,8 @@ When constructing expressions, one must ensure that the types are valid for the Expressions in this system are defined to act only on certain sets of types. However, values may be cast to a suitable supertype in order to satisfy the typing requirements. In these cases, a node in the expression tree is used to represent the promotion. In all cases where operations note that they “implicitly cast” or “coerce” their arguments, the expression tree must have this node representing the conversion. +#### Cast + A cast from one type to another, implied by the use of an expression in a different context. @@ -205,7 +221,7 @@ Constructing the tree representation directly is verbose and easy to make a mist The functions and methods described in this section are a more user-friendly way to build the expression tree, while staying close to the internal representation. All these functions will automatically lift valid Python scalar values into corresponding [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.Var") or [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") objects, and will resolve any required implicit casts on your behalf. -### lift +#### lift Lift the given Python `value` to a [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.expr.Value") or [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.expr.Var"). @@ -243,7 +259,7 @@ The functions and methods described in this section are a more user-friendly way You can manually specify casts in cases where the cast is allowed in explicit form, but may be lossy (such as the cast of a higher precision [`Uint`](#qiskit.circuit.classical.types.Uint "qiskit.circuit.classical.types.Uint") to a lower precision one). -### cast +#### cast Create an explicit cast from the given value to the given type. @@ -266,7 +282,7 @@ You can manually specify casts in cases where the cast is allowed in explicit fo There are helper constructor functions for each of the unary operations. -### bit\_not +#### bit\_not Create a bitwise ‘not’ expression node from the given value, resolving any implicit casts and lifting the value into a [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") node if required. @@ -287,7 +303,7 @@ There are helper constructor functions for each of the unary operations. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### logic\_not +#### logic\_not Create a logical ‘not’ expression node from the given value, resolving any implicit casts and lifting the value into a [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") node if required. @@ -310,7 +326,7 @@ There are helper constructor functions for each of the unary operations. Similarly, the binary operations and relations have helper functions defined. -### bit\_and +#### bit\_and Create a bitwise ‘and’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -331,7 +347,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### bit\_or +#### bit\_or Create a bitwise ‘or’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -352,7 +368,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### bit\_xor +#### bit\_xor Create a bitwise ‘exclusive or’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -373,7 +389,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### logic\_and +#### logic\_and Create a logical ‘and’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -394,7 +410,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### logic\_or +#### logic\_or Create a logical ‘or’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -415,7 +431,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### equal +#### equal Create an ‘equal’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -436,7 +452,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### not\_equal +#### not\_equal Create a ‘not equal’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -457,7 +473,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### less +#### less Create a ‘less than’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -478,7 +494,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### less\_equal +#### less\_equal Create a ‘less than or equal to’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -499,7 +515,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### greater +#### greater Create a ‘greater than’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -520,7 +536,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### greater\_equal +#### greater\_equal Create a ‘greater than or equal to’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -543,7 +559,7 @@ Similarly, the binary operations and relations have helper functions defined. Qiskit’s legacy method for specifying equality conditions for use in conditionals is to use a two-tuple of a [`Clbit`](qiskit.circuit.Clbit "qiskit.circuit.Clbit") or [`ClassicalRegister`](qiskit.circuit.ClassicalRegister "qiskit.circuit.ClassicalRegister") and an integer. This represents an exact equality condition, and there are no ways to specify any other relations. The helper function [`lift_legacy_condition()`](#qiskit.circuit.classical.expr.lift_legacy_condition "qiskit.circuit.classical.expr.lift_legacy_condition") converts this legacy format into the new expression syntax. -### lift\_legacy\_condition +#### lift\_legacy\_condition Lift a legacy two-tuple equality condition into a new-style [`Expr`](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.Expr"). @@ -572,10 +588,12 @@ Qiskit’s legacy method for specifying equality conditions for use in condition A typical consumer of the expression tree wants to recursively walk through the tree, potentially statefully, acting on each node differently depending on its type. This is naturally a double-dispatch problem; the logic of ‘what is to be done’ is likely stateful and users should be free to define their own operations, yet each node defines ‘what is being acted on’. We enable this double dispatch by providing a base visitor class for the expression tree. +#### ExprVisitor + Base class for visitors to the [`Expr`](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.Expr") tree. Subclasses should override whichever of the `visit_*` methods that they are able to handle, and should be organised such that non-existent methods will never be called. - ### visit\_binary + ##### visit\_binary **Return type** @@ -583,7 +601,7 @@ A typical consumer of the expression tree wants to recursively walk through the *\_T\_co* - ### visit\_cast + ##### visit\_cast **Return type** @@ -591,7 +609,7 @@ A typical consumer of the expression tree wants to recursively walk through the *\_T\_co* - ### visit\_generic + ##### visit\_generic **Return type** @@ -599,7 +617,7 @@ A typical consumer of the expression tree wants to recursively walk through the *\_T\_co* - ### visit\_unary + ##### visit\_unary **Return type** @@ -607,7 +625,7 @@ A typical consumer of the expression tree wants to recursively walk through the *\_T\_co* - ### visit\_value + ##### visit\_value **Return type** @@ -615,7 +633,7 @@ A typical consumer of the expression tree wants to recursively walk through the *\_T\_co* - ### visit\_var + ##### visit\_var **Return type** @@ -628,7 +646,7 @@ Consumers of the expression tree should subclass the visitor, and override the ` For the convenience of simple visitors that only need to inspect the variables in an expression and not the general structure, the iterator method [`iter_vars()`](#qiskit.circuit.classical.expr.iter_vars "qiskit.circuit.classical.expr.iter_vars") is provided. -### iter\_vars +#### iter\_vars Get an iterator over the [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.expr.Var") nodes referenced at any level in the given [`Expr`](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr"). @@ -656,7 +674,7 @@ For the convenience of simple visitors that only need to inspect the variables i Two expressions can be compared for direct structural equality by using the built-in Python `==` operator. In general, though, one might want to compare two expressions slightly more semantically, allowing that the [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.Var") nodes inside them are bound to different memory-location descriptions between two different circuits. In this case, one can use [`structurally_equivalent()`](#qiskit.circuit.classical.expr.structurally_equivalent "qiskit.circuit.classical.expr.structurally_equivalent") with two suitable “key” functions to do the comparison. -### structurally\_equivalent +#### structurally\_equivalent Do these two expressions have exactly the same tree structure, up to some key function for the [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.expr.Var") objects? @@ -715,6 +733,8 @@ The type system of the expression tree is exposed through this module. This is i All types inherit from an abstract base class: +### Type + Root base class of all nodes in the type tree. The base case should never be instantiated directly. @@ -725,10 +745,14 @@ Types should be considered immutable objects, and you must not mutate them. It i The two different types available are for Booleans (corresponding to [`Clbit`](qiskit.circuit.Clbit "qiskit.circuit.Clbit") and the literals `True` and `False`), and unsigned integers (corresponding to [`ClassicalRegister`](qiskit.circuit.ClassicalRegister "qiskit.circuit.ClassicalRegister") and Python integers). +### Bool + The Boolean type. This has exactly two values: `True` and `False`. +### Uint + An unsigned integer of fixed bit width. @@ -770,6 +794,8 @@ The low-level interface to querying the subtyping relationship is the [`order()` The return value is an enumeration [`Ordering`](#qiskit.circuit.classical.types.Ordering "qiskit.circuit.classical.types.Ordering") that describes what, if any, subtyping relationship exists between the two types. +### Ordering + Enumeration listing the possible relations between two types. Types only have a partial ordering, so it’s possible for two types to have no sub-typing relationship. diff --git a/docs/api/qiskit/0.45/circuit_library.mdx b/docs/api/qiskit/0.45/circuit_library.mdx index 946ac59627f..dde56ac8ce2 100644 --- a/docs/api/qiskit/0.45/circuit_library.mdx +++ b/docs/api/qiskit/0.45/circuit_library.mdx @@ -324,7 +324,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib **Reference:** Maslov, D. and Dueck, G. W. and Miller, D. M., Techniques for the synthesis of reversible Toffoli networks, 2007 [http://dx.doi.org/10.1145/1278349.1278355](http://dx.doi.org/10.1145/1278349.1278355) -### template\_nct\_2a\_1 +#### template\_nct\_2a\_1 **Returns** @@ -336,7 +336,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_2a\_2 +#### template\_nct\_2a\_2 **Returns** @@ -348,7 +348,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_2a\_3 +#### template\_nct\_2a\_3 **Returns** @@ -360,7 +360,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_4a\_1 +#### template\_nct\_4a\_1 **Returns** @@ -372,7 +372,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_4a\_2 +#### template\_nct\_4a\_2 **Returns** @@ -384,7 +384,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_4a\_3 +#### template\_nct\_4a\_3 **Returns** @@ -396,7 +396,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_4b\_1 +#### template\_nct\_4b\_1 **Returns** @@ -408,7 +408,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_4b\_2 +#### template\_nct\_4b\_2 **Returns** @@ -420,7 +420,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_5a\_1 +#### template\_nct\_5a\_1 **Returns** @@ -432,7 +432,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_5a\_2 +#### template\_nct\_5a\_2 **Returns** @@ -444,7 +444,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_5a\_3 +#### template\_nct\_5a\_3 **Returns** @@ -456,7 +456,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_5a\_4 +#### template\_nct\_5a\_4 **Returns** @@ -468,7 +468,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_6a\_1 +#### template\_nct\_6a\_1 **Returns** @@ -480,7 +480,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_6a\_2 +#### template\_nct\_6a\_2 **Returns** @@ -492,7 +492,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_6a\_3 +#### template\_nct\_6a\_3 **Returns** @@ -504,7 +504,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_6a\_4 +#### template\_nct\_6a\_4 **Returns** @@ -516,7 +516,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_6b\_1 +#### template\_nct\_6b\_1 **Returns** @@ -528,7 +528,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_6b\_2 +#### template\_nct\_6b\_2 **Returns** @@ -540,7 +540,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_6c\_1 +#### template\_nct\_6c\_1 **Returns** @@ -552,7 +552,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_7a\_1 +#### template\_nct\_7a\_1 **Returns** @@ -564,7 +564,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_7b\_1 +#### template\_nct\_7b\_1 **Returns** @@ -576,7 +576,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_7c\_1 +#### template\_nct\_7c\_1 **Returns** @@ -588,7 +588,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_7d\_1 +#### template\_nct\_7d\_1 **Returns** @@ -600,7 +600,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_7e\_1 +#### template\_nct\_7e\_1 **Returns** @@ -612,7 +612,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9a\_1 +#### template\_nct\_9a\_1 **Returns** @@ -624,7 +624,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_1 +#### template\_nct\_9c\_1 **Returns** @@ -636,7 +636,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_2 +#### template\_nct\_9c\_2 **Returns** @@ -648,7 +648,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_3 +#### template\_nct\_9c\_3 **Returns** @@ -660,7 +660,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_4 +#### template\_nct\_9c\_4 **Returns** @@ -672,7 +672,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_5 +#### template\_nct\_9c\_5 **Returns** @@ -684,7 +684,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_6 +#### template\_nct\_9c\_6 **Returns** @@ -696,7 +696,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_7 +#### template\_nct\_9c\_7 **Returns** @@ -708,7 +708,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_8 +#### template\_nct\_9c\_8 **Returns** @@ -720,7 +720,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_9 +#### template\_nct\_9c\_9 **Returns** @@ -732,7 +732,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_10 +#### template\_nct\_9c\_10 **Returns** @@ -744,7 +744,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_11 +#### template\_nct\_9c\_11 **Returns** @@ -756,7 +756,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_12 +#### template\_nct\_9c\_12 **Returns** @@ -768,7 +768,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_1 +#### template\_nct\_9d\_1 **Returns** @@ -780,7 +780,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_2 +#### template\_nct\_9d\_2 **Returns** @@ -792,7 +792,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_3 +#### template\_nct\_9d\_3 **Returns** @@ -804,7 +804,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_4 +#### template\_nct\_9d\_4 **Returns** @@ -816,7 +816,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_5 +#### template\_nct\_9d\_5 **Returns** @@ -828,7 +828,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_6 +#### template\_nct\_9d\_6 **Returns** @@ -840,7 +840,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_7 +#### template\_nct\_9d\_7 **Returns** @@ -852,7 +852,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_8 +#### template\_nct\_9d\_8 **Returns** @@ -864,7 +864,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_9 +#### template\_nct\_9d\_9 **Returns** @@ -876,7 +876,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_10 +#### template\_nct\_9d\_10 **Returns** @@ -892,7 +892,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib Template circuits over Clifford gates. -### clifford\_2\_1 +#### clifford\_2\_1 **Returns** @@ -904,7 +904,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_2\_2 +#### clifford\_2\_2 **Returns** @@ -916,7 +916,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_2\_3 +#### clifford\_2\_3 **Returns** @@ -928,7 +928,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_2\_4 +#### clifford\_2\_4 **Returns** @@ -940,7 +940,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_3\_1 +#### clifford\_3\_1 **Returns** @@ -952,7 +952,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_4\_1 +#### clifford\_4\_1 **Returns** @@ -964,7 +964,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_4\_2 +#### clifford\_4\_2 **Returns** @@ -976,7 +976,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_4\_3 +#### clifford\_4\_3 **Returns** @@ -988,7 +988,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_4\_4 +#### clifford\_4\_4 **Returns** @@ -1000,7 +1000,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_5\_1 +#### clifford\_5\_1 **Returns** @@ -1012,7 +1012,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_6\_1 +#### clifford\_6\_1 **Returns** @@ -1024,7 +1024,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_6\_2 +#### clifford\_6\_2 **Returns** @@ -1036,7 +1036,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_6\_3 +#### clifford\_6\_3 **Returns** @@ -1048,7 +1048,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_6\_4 +#### clifford\_6\_4 **Returns** @@ -1060,7 +1060,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_6\_5 +#### clifford\_6\_5 **Returns** @@ -1072,7 +1072,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_8\_1 +#### clifford\_8\_1 **Returns** @@ -1084,7 +1084,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_8\_2 +#### clifford\_8\_2 **Returns** @@ -1096,7 +1096,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_8\_3 +#### clifford\_8\_3 **Returns** @@ -1112,37 +1112,37 @@ Template circuits over Clifford gates. Template circuits with [`RZXGate`](qiskit.circuit.library.RZXGate "qiskit.circuit.library.RZXGate"). -### rzx\_yz +#### rzx\_yz Template for CX - RYGate - CX. -### rzx\_xz +#### rzx\_xz Template for CX - RXGate - CX. -### rzx\_cy +#### rzx\_cy Template for CX - RYGate - CX. -### rzx\_zz1 +#### rzx\_zz1 Template for CX - RZGate - CX. -### rzx\_zz2 +#### rzx\_zz2 Template for CX - RZGate - CX. -### rzx\_zz3 +#### rzx\_zz3 Template for CX - RZGate - CX. diff --git a/docs/api/qiskit/0.45/circuit_singleton.mdx b/docs/api/qiskit/0.45/circuit_singleton.mdx index d931e3e696f..4be8535fdc2 100644 --- a/docs/api/qiskit/0.45/circuit_singleton.mdx +++ b/docs/api/qiskit/0.45/circuit_singleton.mdx @@ -44,6 +44,8 @@ assert XGate() is XGate() The public classes correspond to the standard classes [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.Instruction") and [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"), respectively, and are subclasses of these. +### SingletonInstruction + A base class to use for [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.Instruction") objects that by default are singleton instances. @@ -52,12 +54,16 @@ The public classes correspond to the standard classes [`Instruction`](qiskit.cir The exception to be aware of with this class though are the [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.Instruction") attributes [`label`](qiskit.circuit.Instruction#label "qiskit.circuit.Instruction.label"), [`condition`](qiskit.circuit.Instruction#condition "qiskit.circuit.Instruction.condition"), [`duration`](qiskit.circuit.Instruction#duration "qiskit.circuit.Instruction.duration"), and [`unit`](qiskit.circuit.Instruction#unit "qiskit.circuit.Instruction.unit") which can be set differently for specific instances of gates. For [`SingletonInstruction`](#qiskit.circuit.singleton.SingletonInstruction "qiskit.circuit.singleton.SingletonInstruction") usage to be sound setting these attributes is not available and they can only be set at creation time, or on an object that has been specifically made mutable using [`to_mutable()`](qiskit.circuit.Instruction#to_mutable "qiskit.circuit.Instruction.to_mutable"). If any of these attributes are used during creation, then instead of using a single shared global instance of the same gate a new separate instance will be created. +### SingletonGate + A base class to use for [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate") objects that by default are singleton instances. This class is very similar to [`SingletonInstruction`](#qiskit.circuit.singleton.SingletonInstruction "qiskit.circuit.singleton.SingletonInstruction"), except implies unitary [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate") semantics as well. The same caveats around setting attributes in that class apply here as well. +### SingletonControlledGate + A base class to use for [`ControlledGate`](qiskit.circuit.ControlledGate "qiskit.circuit.ControlledGate") objects that by default are singleton instances @@ -118,7 +124,7 @@ If your constructor does not have defaults for all its arguments, you must set ` Subclasses of [`SingletonInstruction`](#qiskit.circuit.singleton.SingletonInstruction "qiskit.circuit.singleton.SingletonInstruction") and the other associated classes can control how their constructor’s arguments are interpreted, in order to help the singleton machinery return the singleton even in the case than an optional argument is explicitly set to its default. -### \_singleton\_lookup\_key +#### \_singleton\_lookup\_key Given the arguments to the constructor, return a key tuple that identifies the singleton instance to retrieve, or `None` if the arguments imply that a mutable object must be created. diff --git a/docs/api/qiskit/0.45/converters.mdx b/docs/api/qiskit/0.45/converters.mdx index 2259b95c86d..a8e7767a1aa 100644 --- a/docs/api/qiskit/0.45/converters.mdx +++ b/docs/api/qiskit/0.45/converters.mdx @@ -18,7 +18,7 @@ python_api_name: qiskit.converters `qiskit.converters` -### circuit\_to\_dag +## circuit\_to\_dag Build a [`DAGCircuit`](qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit") object from a [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit"). @@ -60,7 +60,7 @@ python_api_name: qiskit.converters ``` -### dag\_to\_circuit +## dag\_to\_circuit Build a `QuantumCircuit` object from a `DAGCircuit`. @@ -102,7 +102,7 @@ python_api_name: qiskit.converters ![../\_images/converters-1.png](/images/api/qiskit/0.45/converters-1.png) -### circuit\_to\_instruction +## circuit\_to\_instruction Build an [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.Instruction") object from a [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit"). @@ -145,7 +145,7 @@ python_api_name: qiskit.converters ``` -### circuit\_to\_gate +## circuit\_to\_gate Build a [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate") object from a [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit"). @@ -172,7 +172,7 @@ python_api_name: qiskit.converters [Gate](qiskit.circuit.Gate "qiskit.circuit.Gate") -### ast\_to\_dag +## ast\_to\_dag Build a `DAGCircuit` object from an AST `Node` object. @@ -212,7 +212,7 @@ python_api_name: qiskit.converters ``` -### dagdependency\_to\_circuit +## dagdependency\_to\_circuit Build a `QuantumCircuit` object from a `DAGDependency`. @@ -230,7 +230,7 @@ python_api_name: qiskit.converters [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### circuit\_to\_dagdependency +## circuit\_to\_dagdependency Build a `DAGDependency` object from a [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit"). @@ -249,7 +249,7 @@ python_api_name: qiskit.converters [DAGDependency](qiskit.dagcircuit.DAGDependency "qiskit.dagcircuit.DAGDependency") -### dag\_to\_dagdependency +## dag\_to\_dagdependency Build a `DAGDependency` object from a `DAGCircuit`. @@ -268,7 +268,7 @@ python_api_name: qiskit.converters [DAGDependency](qiskit.dagcircuit.DAGDependency "qiskit.dagcircuit.DAGDependency") -### dagdependency\_to\_dag +## dagdependency\_to\_dag Build a `DAGCircuit` object from a `DAGDependency`. diff --git a/docs/api/qiskit/0.45/exceptions.mdx b/docs/api/qiskit/0.45/exceptions.mdx index e298892eb70..422d0f6a70e 100644 --- a/docs/api/qiskit/0.45/exceptions.mdx +++ b/docs/api/qiskit/0.45/exceptions.mdx @@ -20,7 +20,7 @@ python_api_name: qiskit.exceptions All Qiskit-related errors raised by Qiskit are subclasses of the base: -### QiskitError +## QiskitError Base class for errors raised by Qiskit. @@ -36,7 +36,7 @@ Many of the Qiskit subpackages define their own more granular error, to help in Qiskit has several optional features that depend on other packages that are not required for a minimal install. You can read more about those, and ways to check for their presence, in [`qiskit.utils.optionals`](utils#module-qiskit.utils.optionals "qiskit.utils.optionals"). Trying to use a feature that requires an optional extra will raise a particular error, which subclasses both [`QiskitError`](#qiskit.exceptions.QiskitError "qiskit.exceptions.QiskitError") and the Python built-in `ImportError`. -### MissingOptionalLibraryError +## MissingOptionalLibraryError Raised when an optional library is missing. @@ -46,7 +46,7 @@ Qiskit has several optional features that depend on other packages that are not Two more uncommon errors relate to failures in reading user-configuration files, or specifying a filename that cannot be used: -### QiskitUserConfigError +## QiskitUserConfigError Raised when an error is encountered reading a user config file. @@ -54,7 +54,7 @@ Two more uncommon errors relate to failures in reading user-configuration files, Set the error message. -### InvalidFileError +## InvalidFileError Raised when the file provided is not valid for the specific task. diff --git a/docs/api/qiskit/0.45/execute.mdx b/docs/api/qiskit/0.45/execute.mdx index 47eba69f042..8a331f6965e 100644 --- a/docs/api/qiskit/0.45/execute.mdx +++ b/docs/api/qiskit/0.45/execute.mdx @@ -18,7 +18,7 @@ python_api_name: qiskit.execute_function `qiskit.execute_function` -### execute +## execute Execute a list of [`qiskit.circuit.QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") or [`qiskit.pulse.Schedule`](qiskit.pulse.Schedule "qiskit.pulse.Schedule") on a backend. diff --git a/docs/api/qiskit/0.45/passmanager.mdx b/docs/api/qiskit/0.45/passmanager.mdx index f871bce7621..8dfe2fc3c70 100644 --- a/docs/api/qiskit/0.45/passmanager.mdx +++ b/docs/api/qiskit/0.45/passmanager.mdx @@ -161,7 +161,7 @@ With the pass manager framework, a developer can flexibly customize the optimiza ### Exceptions -### PassManagerError +#### PassManagerError Pass manager error. diff --git a/docs/api/qiskit/0.45/providers.mdx b/docs/api/qiskit/0.45/providers.mdx index 6265e202220..8a6b3fe060f 100644 --- a/docs/api/qiskit/0.45/providers.mdx +++ b/docs/api/qiskit/0.45/providers.mdx @@ -75,7 +75,7 @@ It’s worth pointing out that Terra’s version support policy doesn’t mean p ### Exceptions -### QiskitBackendNotFoundError +#### QiskitBackendNotFoundError Base class for errors raised while looking for a backend. @@ -83,7 +83,7 @@ It’s worth pointing out that Terra’s version support policy doesn’t mean p Set the error message. -### BackendPropertyError +#### BackendPropertyError Base class for errors raised while looking for a backend property. @@ -91,7 +91,7 @@ It’s worth pointing out that Terra’s version support policy doesn’t mean p Set the error message. -### JobError +#### JobError Base class for errors raised by Jobs. @@ -99,7 +99,7 @@ It’s worth pointing out that Terra’s version support policy doesn’t mean p Set the error message. -### JobTimeoutError +#### JobTimeoutError Base class for timeout errors raised by jobs. @@ -107,7 +107,7 @@ It’s worth pointing out that Terra’s version support policy doesn’t mean p Set the error message. -### BackendConfigurationError +#### BackendConfigurationError Base class for errors raised by the BackendConfiguration. diff --git a/docs/api/qiskit/0.45/providers_fake_provider.mdx b/docs/api/qiskit/0.45/providers_fake_provider.mdx index ef19b11291c..991a94e78a9 100644 --- a/docs/api/qiskit/0.45/providers_fake_provider.mdx +++ b/docs/api/qiskit/0.45/providers_fake_provider.mdx @@ -209,6 +209,8 @@ Special fake backends are fake backends that were created for special testing pu The fake backends based on IBM hardware are based on a set of base classes: +### FakeBackendV2 + A fake backend class for testing and noisy simulation using real backend snapshots. @@ -217,6 +219,8 @@ The fake backends based on IBM hardware are based on a set of base classes: FakeBackendV2 initializer. +### FakeBackend + This is a dummy backend just for testing purposes. @@ -228,6 +232,8 @@ The fake backends based on IBM hardware are based on a set of base classes: * **time\_alive** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) – time to wait before returning result +### FakeQasmBackend + A fake OpenQASM backend. @@ -239,6 +245,8 @@ The fake backends based on IBM hardware are based on a set of base classes: * **time\_alive** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) – time to wait before returning result +### FakePulseBackend + A fake pulse backend. diff --git a/docs/api/qiskit/0.45/pulse.mdx b/docs/api/qiskit/0.45/pulse.mdx index d1737526709..495f2460c43 100644 --- a/docs/api/qiskit/0.45/pulse.mdx +++ b/docs/api/qiskit/0.45/pulse.mdx @@ -71,6 +71,8 @@ An instruction can be added to a [`Schedule`](qiskit.pulse.Schedule "qiskit.puls These are all instances of the same base class: +### Instruction + The smallest schedulable unit: a single instruction. It has a fixed duration and specified channels. @@ -112,7 +114,7 @@ In contrast, the [`SymbolicPulse`](qiskit.pulse.library.SymbolicPulse "qiskit.pu ### Waveform Pulse Representation -### constant +#### constant Generates constant-sampled [`Waveform`](qiskit.pulse.library.Waveform "qiskit.pulse.library.Waveform"). @@ -138,7 +140,7 @@ $$ [*Waveform*](qiskit.pulse.library.Waveform "qiskit.pulse.library.waveform.Waveform") -### zero +#### zero Generates zero-sampled [`Waveform`](qiskit.pulse.library.Waveform "qiskit.pulse.library.Waveform"). @@ -163,7 +165,7 @@ $$ [*Waveform*](qiskit.pulse.library.Waveform "qiskit.pulse.library.waveform.Waveform") -### square +#### square Generates square wave [`Waveform`](qiskit.pulse.library.Waveform "qiskit.pulse.library.Waveform"). @@ -193,7 +195,7 @@ $$ [*Waveform*](qiskit.pulse.library.Waveform "qiskit.pulse.library.waveform.Waveform") -### sawtooth +#### sawtooth Generates sawtooth wave [`Waveform`](qiskit.pulse.library.Waveform "qiskit.pulse.library.Waveform"). @@ -240,7 +242,7 @@ $$ ![../\_images/pulse-1.png](/images/api/qiskit/0.45/pulse-1.png) -### triangle +#### triangle Generates triangle wave [`Waveform`](qiskit.pulse.library.Waveform "qiskit.pulse.library.Waveform"). @@ -287,7 +289,7 @@ $$ ![../\_images/pulse-2.png](/images/api/qiskit/0.45/pulse-2.png) -### cos +#### cos Generates cosine wave [`Waveform`](qiskit.pulse.library.Waveform "qiskit.pulse.library.Waveform"). @@ -315,7 +317,7 @@ $$ [*Waveform*](qiskit.pulse.library.Waveform "qiskit.pulse.library.waveform.Waveform") -### sin +#### sin Generates sine wave [`Waveform`](qiskit.pulse.library.Waveform "qiskit.pulse.library.Waveform"). @@ -343,7 +345,7 @@ $$ [*Waveform*](qiskit.pulse.library.Waveform "qiskit.pulse.library.waveform.Waveform") -### gaussian +#### gaussian Generates unnormalized gaussian [`Waveform`](qiskit.pulse.library.Waveform "qiskit.pulse.library.Waveform"). @@ -383,7 +385,7 @@ $$ [*Waveform*](qiskit.pulse.library.Waveform "qiskit.pulse.library.waveform.Waveform") -### gaussian\_deriv +#### gaussian\_deriv Generates unnormalized gaussian derivative [`Waveform`](qiskit.pulse.library.Waveform "qiskit.pulse.library.Waveform"). @@ -413,7 +415,7 @@ $$ [*Waveform*](qiskit.pulse.library.Waveform "qiskit.pulse.library.waveform.Waveform") -### sech +#### sech Generates unnormalized sech [`Waveform`](qiskit.pulse.library.Waveform "qiskit.pulse.library.Waveform"). @@ -451,7 +453,7 @@ $$ [*Waveform*](qiskit.pulse.library.Waveform "qiskit.pulse.library.waveform.Waveform") -### sech\_deriv +#### sech\_deriv Generates unnormalized sech derivative [`Waveform`](qiskit.pulse.library.Waveform "qiskit.pulse.library.Waveform"). @@ -482,7 +484,7 @@ $$ [*Waveform*](qiskit.pulse.library.Waveform "qiskit.pulse.library.waveform.Waveform") -### gaussian\_square +#### gaussian\_square Generates gaussian square [`Waveform`](qiskit.pulse.library.Waveform "qiskit.pulse.library.Waveform"). @@ -524,7 +526,7 @@ $$ [*Waveform*](qiskit.pulse.library.Waveform "qiskit.pulse.library.waveform.Waveform") -### drag +#### drag Generates Y-only correction DRAG [`Waveform`](qiskit.pulse.library.Waveform "qiskit.pulse.library.Waveform") for standard nonlinear oscillator (SNO) \[1]. @@ -616,6 +618,8 @@ Novel channel types can often utilize the [`ControlChannel`](qiskit.pulse.channe All channels are children of the same abstract base class: +### Channel + Base class of channels. Channels provide a Qiskit-side label for typical quantum control hardware signal channels. The final label -> physical channel mapping is the responsibility of the hardware backend. For instance, `DriveChannel(0)` holds instructions which the backend should map to the signal line driving gate operations on the qubit labeled (indexed) 0. @@ -669,6 +673,8 @@ The alignment transforms define alignment policies of instructions in [`Schedule These are all subtypes of the abstract base class [`AlignmentKind`](#qiskit.pulse.transforms.AlignmentKind "qiskit.pulse.transforms.AlignmentKind"). +#### AlignmentKind + An abstract class for schedule alignment. @@ -681,7 +687,7 @@ These are all subtypes of the abstract base class [`AlignmentKind`](#qiskit.puls The canonicalization transforms convert schedules to a form amenable for execution on OpenPulse backends. -### add\_implicit\_acquires +#### add\_implicit\_acquires Return a new schedule with implicit acquires from the measurement mapping replaced by explicit ones. @@ -704,7 +710,7 @@ The canonicalization transforms convert schedules to a form amenable for executi [*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") -### align\_measures +#### align\_measures Return new schedules where measurements occur at the same physical time. @@ -771,7 +777,7 @@ The canonicalization transforms convert schedules to a form amenable for executi [*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")\[[*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule")] -### block\_to\_schedule +#### block\_to\_schedule Convert `ScheduleBlock` to `Schedule`. @@ -798,7 +804,7 @@ The canonicalization transforms convert schedules to a form amenable for executi -### compress\_pulses +#### compress\_pulses Optimization pass to replace identical pulses. @@ -816,7 +822,7 @@ The canonicalization transforms convert schedules to a form amenable for executi [*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")\[[*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule")] -### flatten +#### flatten Flatten (inline) any called nodes into a Schedule tree with no nested children. @@ -838,7 +844,7 @@ The canonicalization transforms convert schedules to a form amenable for executi [*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") -### inline\_subroutines +#### inline\_subroutines Recursively remove call instructions and inline the respective subroutine instructions. @@ -862,7 +868,7 @@ The canonicalization transforms convert schedules to a form amenable for executi [*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") | [*ScheduleBlock*](qiskit.pulse.ScheduleBlock "qiskit.pulse.schedule.ScheduleBlock") -### pad +#### pad Pad the input Schedule with `Delay``s on all unoccupied timeslots until ``schedule.duration` or `until` if not `None`. @@ -888,7 +894,7 @@ The canonicalization transforms convert schedules to a form amenable for executi [*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") -### remove\_directives +#### remove\_directives Remove directives. @@ -906,7 +912,7 @@ The canonicalization transforms convert schedules to a form amenable for executi [*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") -### remove\_trivial\_barriers +#### remove\_trivial\_barriers Remove trivial barriers with 0 or 1 channels. @@ -930,7 +936,7 @@ The canonicalization transforms convert schedules to a form amenable for executi The DAG transforms create DAG representation of input program. This can be used for optimization of instructions and equality checks. -### block\_to\_dag +#### block\_to\_dag Convert schedule block instruction into DAG. @@ -988,7 +994,7 @@ The DAG transforms create DAG representation of input program. This can be used A sequence of transformations to generate a target code. -### target\_qobj\_transform +#### target\_qobj\_transform A basic pulse program transformation for OpenPulse API execution. @@ -1261,7 +1267,7 @@ with pulse.build(backend) as drive_sched: DriveChannel(0) ``` -### acquire\_channel +#### acquire\_channel Return `AcquireChannel` for `qubit` on the active builder backend. @@ -1287,7 +1293,7 @@ DriveChannel(0) [*AcquireChannel*](qiskit.pulse.channels.AcquireChannel "qiskit.pulse.channels.AcquireChannel") -### control\_channels +#### control\_channels Return `ControlChannel` for `qubit` on the active builder backend. @@ -1322,7 +1328,7 @@ DriveChannel(0) [*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")\[[*ControlChannel*](qiskit.pulse.channels.ControlChannel "qiskit.pulse.channels.ControlChannel")] -### drive\_channel +#### drive\_channel Return `DriveChannel` for `qubit` on the active builder backend. @@ -1348,7 +1354,7 @@ DriveChannel(0) [*DriveChannel*](qiskit.pulse.channels.DriveChannel "qiskit.pulse.channels.DriveChannel") -### measure\_channel +#### measure\_channel Return `MeasureChannel` for `qubit` on the active builder backend. @@ -1407,7 +1413,7 @@ drive_sched.draw() ![../\_images/pulse-6.png](/images/api/qiskit/0.45/pulse-6.png) -### acquire +#### acquire Acquire for a `duration` on a `channel` and store the result in a `register`. @@ -1444,7 +1450,7 @@ drive_sched.draw() [**exceptions.PulseError**](#qiskit.pulse.PulseError "qiskit.pulse.exceptions.PulseError") – If the register type is not supported. -### barrier +#### barrier Barrier directive for a set of channels and qubits. @@ -1511,7 +1517,7 @@ drive_sched.draw() * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) – Name for the barrier -### call +#### call Call the subroutine within the currently active builder context with arbitrary parameters which will be assigned to the target program. @@ -1725,7 +1731,7 @@ drive_sched.draw() * **kw\_params** ([*ParameterExpression*](qiskit.circuit.ParameterExpression "qiskit.circuit.parameterexpression.ParameterExpression") *|*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) – Alternative way to provide parameters. Since this is keyed on the string parameter name, the parameters having the same name are all updated together. If you want to avoid name collision, use `value_dict` with [`Parameter`](qiskit.circuit.Parameter "qiskit.circuit.Parameter") objects instead. -### delay +#### delay Delay on a `channel` for a `duration`. @@ -1748,7 +1754,7 @@ drive_sched.draw() * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) – Name of the instruction. -### play +#### play Play a `pulse` on a `channel`. @@ -1771,7 +1777,7 @@ drive_sched.draw() * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) – Name of the pulse. -### reference +#### reference Refer to undefined subroutine by string keys. @@ -1796,7 +1802,7 @@ drive_sched.draw() * **extra\_keys** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) – Helper keys to uniquely specify the subroutine. -### set\_frequency +#### set\_frequency Set the `frequency` of a pulse `channel`. @@ -1819,7 +1825,7 @@ drive_sched.draw() * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) – Name of the instruction. -### set\_phase +#### set\_phase Set the `phase` of a pulse `channel`. @@ -1844,7 +1850,7 @@ drive_sched.draw() * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) – Name of the instruction. -### shift\_frequency +#### shift\_frequency Shift the `frequency` of a pulse `channel`. @@ -1867,7 +1873,7 @@ drive_sched.draw() * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) – Name of the instruction. -### shift\_phase +#### shift\_phase Shift the `phase` of a pulse `channel`. @@ -1892,7 +1898,7 @@ drive_sched.draw() * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) – Name of the instruction. -### snapshot +#### snapshot Simulator snapshot. @@ -1934,7 +1940,7 @@ pulse_prog.draw() ![../\_images/pulse-7.png](/images/api/qiskit/0.45/pulse-7.png) -### align\_equispaced +#### align\_equispaced Equispaced alignment pulse scheduling context. @@ -1980,7 +1986,7 @@ pulse_prog.draw() The scheduling is performed for sub-schedules within the context rather than channel-wise. If you want to apply the equispaced context for each channel, you should use the context independently for channels. -### align\_func +#### align\_func Callback defined alignment pulse scheduling context. @@ -2032,7 +2038,7 @@ pulse_prog.draw() The scheduling is performed for sub-schedules within the context rather than channel-wise. If you want to apply the numerical context for each channel, you need to apply the context independently to channels. -### align\_left +#### align\_left Left alignment pulse scheduling context. @@ -2067,7 +2073,7 @@ pulse_prog.draw() [*ContextManager*](https://docs.python.org/3/library/typing.html#typing.ContextManager "(in Python v3.12)")\[None] -### align\_right +#### align\_right Right alignment pulse scheduling context. @@ -2102,7 +2108,7 @@ pulse_prog.draw() [*AlignmentKind*](#qiskit.pulse.transforms.AlignmentKind "qiskit.pulse.transforms.alignments.AlignmentKind") -### align\_sequential +#### align\_sequential Sequential alignment pulse scheduling context. @@ -2137,7 +2143,7 @@ pulse_prog.draw() [*AlignmentKind*](#qiskit.pulse.transforms.AlignmentKind "qiskit.pulse.transforms.alignments.AlignmentKind") -### circuit\_scheduler\_settings +#### circuit\_scheduler\_settings Set the currently active circuit scheduler settings for this context. @@ -2166,7 +2172,7 @@ pulse_prog.draw() [*ContextManager*](https://docs.python.org/3/library/typing.html#typing.ContextManager "(in Python v3.12)")\[None] -### frequency\_offset +#### frequency\_offset Shift the frequency of inputs channels on entry into context and undo on exit. @@ -2210,7 +2216,7 @@ pulse_prog.draw() [*ContextManager*](https://docs.python.org/3/library/typing.html#typing.ContextManager "(in Python v3.12)")\[None] -### phase\_offset +#### phase\_offset Shift the phase of input channels on entry into context and undo on exit. @@ -2245,7 +2251,7 @@ pulse_prog.draw() [*ContextManager*](https://docs.python.org/3/library/typing.html#typing.ContextManager "(in Python v3.12)")\[None] -### transpiler\_settings +#### transpiler\_settings Set the currently active transpiler settings for this context. @@ -2293,7 +2299,7 @@ with pulse.build(backend) as measure_sched: MemorySlot(0) ``` -### measure +#### measure Measure a qubit within the currently active builder context. @@ -2348,7 +2354,7 @@ MemorySlot(0) [*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")\[StorageLocation] | StorageLocation -### measure\_all +#### measure\_all Measure all qubits within the currently active builder context. @@ -2381,7 +2387,7 @@ MemorySlot(0) [*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")\[[*MemorySlot*](qiskit.pulse.channels.MemorySlot "qiskit.pulse.channels.MemorySlot")] -### delay\_qubits +#### delay\_qubits Insert delays on all of the `channels.Channel`s that correspond to the input `qubits` at the same time. @@ -2429,7 +2435,7 @@ with pulse.build(backend) as u3_sched: pulse.u3(math.pi, 0, math.pi, 0) ``` -### cx +#### cx Call a `CXGate` on the input physical qubits. @@ -2451,7 +2457,7 @@ with pulse.build(backend) as u3_sched: ``` -### u1 +#### u1 Call a `U1Gate` on the input physical qubit. @@ -2475,7 +2481,7 @@ with pulse.build(backend) as u3_sched: ``` -### u2 +#### u2 Call a `U2Gate` on the input physical qubit. @@ -2499,7 +2505,7 @@ with pulse.build(backend) as u3_sched: ``` -### u3 +#### u3 Call a `U3Gate` on the input physical qubit. @@ -2523,7 +2529,7 @@ with pulse.build(backend) as u3_sched: ``` -### x +#### x Call a `XGate` on the input physical qubit. @@ -2574,7 +2580,7 @@ There are 160 samples in 3.5555555555555554e-08 seconds There are 1e-06 seconds in 4500 samples. ``` -### active\_backend +#### active\_backend Get the backend of the currently active builder context. @@ -2594,7 +2600,7 @@ There are 1e-06 seconds in 4500 samples. [**exceptions.BackendNotSet**](#qiskit.pulse.BackendNotSet "qiskit.pulse.exceptions.BackendNotSet") – If the builder does not have a backend set. -### active\_transpiler\_settings +#### active\_transpiler\_settings Return the current active builder context’s transpiler settings. @@ -2623,7 +2629,7 @@ There are 1e-06 seconds in 4500 samples. [*Dict*](https://docs.python.org/3/library/typing.html#typing.Dict "(in Python v3.12)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)"), [*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.12)")] -### active\_circuit\_scheduler\_settings +#### active\_circuit\_scheduler\_settings Return the current active builder context’s circuit scheduler settings. @@ -2653,7 +2659,7 @@ There are 1e-06 seconds in 4500 samples. [*Dict*](https://docs.python.org/3/library/typing.html#typing.Dict "(in Python v3.12)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)"), [*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.12)")] -### num\_qubits +#### num\_qubits Return number of qubits in the currently active backend. @@ -2683,7 +2689,7 @@ There are 1e-06 seconds in 4500 samples. [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") -### qubit\_channels +#### qubit\_channels Returns the set of channels associated with a qubit. @@ -2717,7 +2723,7 @@ There are 1e-06 seconds in 4500 samples. [*Set*](https://docs.python.org/3/library/typing.html#typing.Set "(in Python v3.12)")\[[*Channel*](#qiskit.pulse.channels.Channel "qiskit.pulse.channels.Channel")] -### samples\_to\_seconds +#### samples\_to\_seconds Obtain the time in seconds that will elapse for the input number of samples on the active backend. @@ -2735,7 +2741,7 @@ There are 1e-06 seconds in 4500 samples. [float](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)") | [*ndarray*](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray "(in NumPy v1.26)") -### seconds\_to\_samples +#### seconds\_to\_samples Obtain the number of samples that will elapse in `seconds` on the active backend. diff --git a/docs/api/qiskit/0.45/qasm.mdx b/docs/api/qiskit/0.45/qasm.mdx index 8624fabde52..cf9f858253a 100644 --- a/docs/api/qiskit/0.45/qasm.mdx +++ b/docs/api/qiskit/0.45/qasm.mdx @@ -20,6 +20,8 @@ python_api_name: qiskit.qasm ## QASM Routines +### Qasm + OPENQASM circuit object. @@ -28,14 +30,20 @@ python_api_name: qiskit.qasm ## Pygments +### OpenQASMLexer + A pygments lexer for OpenQasm. +### QasmHTMLStyle + A style for OpenQasm in a HTML env (e.g. Jupyter widget). +### QasmTerminalStyle + A style for OpenQasm in a Terminal env (e.g. Jupyter print). diff --git a/docs/api/qiskit/0.45/qasm2.mdx b/docs/api/qiskit/0.45/qasm2.mdx index 86563621fc8..dfb2b4cb7c8 100644 --- a/docs/api/qiskit/0.45/qasm2.mdx +++ b/docs/api/qiskit/0.45/qasm2.mdx @@ -83,6 +83,8 @@ Both of these loading functions also take an argument `include_path`, which is a You can extend the quantum components of the OpenQASM 2 language by passing an iterable of information on custom instructions as the argument `custom_instructions`. In files that have compatible definitions for these instructions, the given `constructor` will be used in place of whatever other handling [`qiskit.qasm2`](#module-qiskit.qasm2 "qiskit.qasm2") would have done. These instructions may optionally be marked as `builtin`, which causes them to not require an `opaque` or `gate` declaration, but they will silently ignore a compatible declaration. Either way, it is an error to provide a custom instruction that has a different number of parameters or qubits as a defined instruction in a parsed program. Each element of the argument iterable should be a particular data class: +#### CustomInstruction + Information about a custom instruction that should be defined during the parse. @@ -99,6 +101,8 @@ This can be particularly useful when trying to resolve ambiguities in the global Similar to the quantum extensions above, you can also extend the processing done to classical expressions (arguments to gates) by passing an iterable to the argument `custom_classical` to either loader. This needs the `name` (a valid OpenQASM 2 identifier), the number `num_params` of parameters it takes, and a Python callable that implements the function. The Python callable must be able to accept `num_params` positional floating-point arguments, and must return a float or integer (which will be converted to a float). Builtin functions cannot be overridden. +#### CustomClassical + Information about a custom classical function that should be defined in mathematical expressions. diff --git a/docs/api/qiskit/0.45/qasm3.mdx b/docs/api/qiskit/0.45/qasm3.mdx index 6bb6378325d..b718045e47d 100644 --- a/docs/api/qiskit/0.45/qasm3.mdx +++ b/docs/api/qiskit/0.45/qasm3.mdx @@ -57,6 +57,8 @@ The high-level functions are simply [`dump()`](#qiskit.qasm3.dump "qiskit.qasm3. Both of these exporter functions are single-use wrappers around the main [`Exporter`](#qiskit.qasm3.Exporter "qiskit.qasm3.Exporter") class. For more complex exporting needs, including dumping multiple circuits in a single session, it may be more convenient or faster to use the complete interface. +### Exporter + QASM3 exporter main class. @@ -88,13 +90,13 @@ Both of these exporter functions are single-use wrappers around the main [`Expor * **experimental** ([*ExperimentalFeatures*](#qiskit.qasm3.ExperimentalFeatures "qiskit.qasm3.experimental.ExperimentalFeatures")) – any experimental features to enable during the export. See [`ExperimentalFeatures`](#qiskit.qasm3.ExperimentalFeatures "qiskit.qasm3.ExperimentalFeatures") for more details. - ### dump + #### dump Convert the circuit to OpenQASM 3, dumping the result to a file or text stream. - ### dumps + #### dumps Convert the circuit to OpenQASM 3, returning the result as a string. @@ -115,12 +117,14 @@ All of these interfaces will raise [`QASM3ExporterError`](#qiskit.qasm3.QASM3Exp The OpenQASM 3 language is still evolving as hardware capabilities improve, so there is no final syntax that Qiskit can reliably target. In order to represent the evolving language, we will sometimes release features before formal standardization, which may need to change as the review process in the OpenQASM 3 design committees progresses. By default, the exporters will only support standardised features of the language. To enable these early-release features, use the `experimental` keyword argument of [`dump()`](#qiskit.qasm3.dump "qiskit.qasm3.dump") and [`dumps()`](#qiskit.qasm3.dumps "qiskit.qasm3.dumps"). The available feature flags are: +#### ExperimentalFeatures + Flags for experimental features that the OpenQASM 3 exporter supports. These are experimental and are more liable to change, because the OpenQASM 3 specification has not formally accepted them yet, so the syntax may not be finalized. - ### SWITCH\_CASE\_V1 + ##### SWITCH\_CASE\_V1 Support exporting switch-case statements as proposed by [https://github.com/openqasm/openqasm/pull/463](https://github.com/openqasm/openqasm/pull/463) at [commit bfa787aa3078](https://github.com/openqasm/openqasm/pull/463/commits/bfa787aa3078). diff --git a/docs/api/qiskit/0.45/qpy.mdx b/docs/api/qiskit/0.45/qpy.mdx index d61b876935a..04d0664542a 100644 --- a/docs/api/qiskit/0.45/qpy.mdx +++ b/docs/api/qiskit/0.45/qpy.mdx @@ -55,7 +55,7 @@ and then loading that file will return a list with all the circuits ### API documentation -### load +#### load Load a QPY binary file @@ -100,7 +100,7 @@ and then loading that file will return a list with all the circuits [*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")\[[*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit") | [*ScheduleBlock*](qiskit.pulse.ScheduleBlock "qiskit.pulse.schedule.ScheduleBlock")] -### dump +#### dump Write QPY binary data to a file @@ -152,7 +152,7 @@ and then loading that file will return a list with all the circuits These functions will raise a custom subclass of [`QiskitError`](exceptions#qiskit.exceptions.QiskitError "qiskit.exceptions.QiskitError") if they encounter problems during serialization or deserialization. -### QpyError +#### QpyError Errors raised by the qpy module. diff --git a/docs/api/qiskit/0.45/result.mdx b/docs/api/qiskit/0.45/result.mdx index 16d3a8a61c9..01dcf17c534 100644 --- a/docs/api/qiskit/0.45/result.mdx +++ b/docs/api/qiskit/0.45/result.mdx @@ -24,7 +24,7 @@ python_api_name: qiskit.result | [`ResultError`](qiskit.result.ResultError "qiskit.result.ResultError")(error) | Exceptions raised due to errors in result output. | | [`Counts`](qiskit.result.Counts "qiskit.result.Counts")(data\[, time\_taken, creg\_sizes, ...]) | A class to store a counts result from a circuit execution. | -### marginal\_counts +## marginal\_counts Marginalize counts from an experiment over some indices of interest. @@ -52,7 +52,7 @@ python_api_name: qiskit.result [**QiskitError**](exceptions#qiskit.exceptions.QiskitError "qiskit.exceptions.QiskitError") – in case of invalid indices to marginalize over. -### marginal\_distribution +## marginal\_distribution Marginalize counts from an experiment over some indices of interest. @@ -79,7 +79,7 @@ python_api_name: qiskit.result * **is invalid.** – -### marginal\_memory +## marginal\_memory Marginalize shot memory diff --git a/docs/api/qiskit/0.45/scheduler.mdx b/docs/api/qiskit/0.45/scheduler.mdx index 4baeadc27a0..28687c3d54a 100644 --- a/docs/api/qiskit/0.45/scheduler.mdx +++ b/docs/api/qiskit/0.45/scheduler.mdx @@ -20,6 +20,8 @@ python_api_name: qiskit.scheduler A circuit scheduler compiles a circuit program to a pulse program. +## ScheduleConfig + Configuration for pulse scheduling. @@ -32,7 +34,7 @@ A circuit scheduler compiles a circuit program to a pulse program. * **dt** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) – Sample duration. -### schedule\_circuit +## schedule\_circuit Basic scheduling pass from a circuit to a pulse Schedule, using the backend. If no method is specified, then a basic, as late as possible scheduling pass is performed, i.e. pulses are scheduled to occur as late as possible. @@ -66,7 +68,7 @@ A circuit scheduler compiles a circuit program to a pulse program. Pulse scheduling methods. -### as\_soon\_as\_possible +## as\_soon\_as\_possible Return the pulse Schedule which implements the input circuit using an “as soon as possible” (asap) scheduling policy. @@ -88,7 +90,7 @@ Pulse scheduling methods. [*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") -### as\_late\_as\_possible +## as\_late\_as\_possible Return the pulse Schedule which implements the input circuit using an “as late as possible” (alap) scheduling policy. diff --git a/docs/api/qiskit/0.45/tools.mdx b/docs/api/qiskit/0.45/tools.mdx index 570a29f47ae..9fba3e357c4 100644 --- a/docs/api/qiskit/0.45/tools.mdx +++ b/docs/api/qiskit/0.45/tools.mdx @@ -149,6 +149,8 @@ A helper module to get IBM backend information and submitted job status. A helper component for publishing and subscribing to events. +#### TextProgressBar + A simple text-based progress bar. diff --git a/docs/api/qiskit/0.45/transpiler.mdx b/docs/api/qiskit/0.45/transpiler.mdx index 887eec4fcb9..6b757ddd0cd 100644 --- a/docs/api/qiskit/0.45/transpiler.mdx +++ b/docs/api/qiskit/0.45/transpiler.mdx @@ -938,7 +938,7 @@ See [https://arxiv.org/abs/2102.01682](https://arxiv.org/abs/2102.01682) for mor ### Exceptions -### TranspilerError +#### TranspilerError Exceptions raised during transpilation. @@ -946,7 +946,7 @@ See [https://arxiv.org/abs/2102.01682](https://arxiv.org/abs/2102.01682) for mor Set the error message. -### TranspilerAccessError +#### TranspilerAccessError DEPRECATED: Exception of access error in the transpiler passes. @@ -954,7 +954,7 @@ See [https://arxiv.org/abs/2102.01682](https://arxiv.org/abs/2102.01682) for mor Set the error message. -### CouplingError +#### CouplingError Base class for errors raised by the coupling graph object. @@ -962,7 +962,7 @@ See [https://arxiv.org/abs/2102.01682](https://arxiv.org/abs/2102.01682) for mor Set the error message. -### LayoutError +#### LayoutError Errors raised by the layout object. diff --git a/docs/api/qiskit/0.45/utils.mdx b/docs/api/qiskit/0.45/utils.mdx index 5bd3ce6743c..83fc130cac2 100644 --- a/docs/api/qiskit/0.45/utils.mdx +++ b/docs/api/qiskit/0.45/utils.mdx @@ -18,7 +18,7 @@ python_api_name: qiskit.utils `qiskit.utils` -### add\_deprecation\_to\_docstring +## add\_deprecation\_to\_docstring Dynamically insert the deprecation message into `func`’s docstring. @@ -31,7 +31,7 @@ python_api_name: qiskit.utils * **pending** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) – Is the deprecation still pending? -### deprecate\_arg +## deprecate\_arg Decorator to indicate an argument has been deprecated in some way. @@ -59,7 +59,7 @@ python_api_name: qiskit.utils Callable -### deprecate\_arguments +## deprecate\_arguments Deprecated. Instead, use @deprecate\_arg. @@ -79,7 +79,7 @@ python_api_name: qiskit.utils Callable -### deprecate\_func +## deprecate\_func Decorator to indicate a function has been deprecated. @@ -106,7 +106,7 @@ python_api_name: qiskit.utils Callable -### deprecate\_function +## deprecate\_function Deprecated. Instead, use @deprecate\_func. @@ -127,7 +127,7 @@ python_api_name: qiskit.utils Callable -### local\_hardware\_info +## local\_hardware\_info Basic hardware information about the local machine. @@ -143,13 +143,13 @@ python_api_name: qiskit.utils [dict](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.12)") -### is\_main\_process +## is\_main\_process Checks whether the current process is the main one -### apply\_prefix +## apply\_prefix Given a SI unit prefix and value, apply the prefix to convert to standard SI unit. @@ -180,7 +180,7 @@ python_api_name: qiskit.utils [float](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)") | [ParameterExpression](qiskit.circuit.ParameterExpression "qiskit.circuit.ParameterExpression") -### detach\_prefix +## detach\_prefix Given a SI unit value, find the most suitable prefix to scale the value. @@ -222,7 +222,7 @@ python_api_name: qiskit.utils [tuple](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.12)")\[[float](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)"), [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")] -### wrap\_method +## wrap\_method Wrap the functionality the instance- or class method `cls.name` with additional behaviour `before` and `after`. @@ -448,6 +448,8 @@ Each of the lazy checkers is an instance of [`LazyDependencyManager`](#qiskit.ut from qiskit.utils import LazyImportTester ``` +#### LazyDependencyManager + A mananger for some optional features that are expensive to import, or to verify the existence of. @@ -486,7 +488,7 @@ from qiskit.utils import LazyImportTester * **install** – how to install this optional dependency. Passed to [`MissingOptionalLibraryError`](exceptions#qiskit.exceptions.MissingOptionalLibraryError "qiskit.exceptions.MissingOptionalLibraryError") as the `pip_install` parameter. * **msg** – an extra message to include in the error raised if this is required. - ### \_is\_available + ##### \_is\_available Subclasses of [`LazyDependencyManager`](#qiskit.utils.LazyDependencyManager "qiskit.utils.LazyDependencyManager") should override this method to implement the actual test of availability. This method should return a Boolean, where `True` indicates that the dependency was available. This method will only ever be called once. @@ -496,13 +498,13 @@ from qiskit.utils import LazyImportTester [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)") - ### disable\_locally + ##### disable\_locally Create a context, during which the value of the dependency manager will be `False`. This means that within the context, any calls to this object will behave as if the dependency is not available, including raising errors. It is valid to call this method whether or not the dependency has already been evaluated. This is most useful in tests. - ### require\_in\_call + ##### require\_in\_call Create a decorator for callables that requires that the dependency is available when the decorated function or method is called. @@ -520,7 +522,7 @@ from qiskit.utils import LazyImportTester Callable - ### require\_in\_instance + ##### require\_in\_instance A class decorator that requires the dependency is available when the class is initialised. This decorator can be used even if the class does not define an `__init__` method. @@ -538,7 +540,7 @@ from qiskit.utils import LazyImportTester Callable - ### require\_now + ##### require\_now Eagerly attempt to import the dependencies in this object, and raise an exception if they cannot be imported. @@ -553,6 +555,8 @@ from qiskit.utils import LazyImportTester +#### LazyImportTester + A lazy dependency tester for importable Python modules. Any required objects will only be imported at the point that this object is tested for its Boolean value. @@ -565,6 +569,8 @@ from qiskit.utils import LazyImportTester [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError "(in Python v3.12)") – if no modules are given. +#### LazySubprocessTester + A lazy checker that a command-line tool is available. The command will only be run once, at the point that this object is checked for its Boolean value. From e047a5a5320e18b1e10616dfe8d1ee04cf615fb5 Mon Sep 17 00:00:00 2001 From: Arnau Casau Date: Fri, 3 May 2024 11:43:37 +0200 Subject: [PATCH 26/31] Regenerate qiskit 0.46.1 --- docs/api/qiskit/0.46/algorithms.mdx | 6 +- docs/api/qiskit/0.46/circuit.mdx | 4 +- docs/api/qiskit/0.46/circuit_classical.mdx | 100 +++++++----- docs/api/qiskit/0.46/circuit_library.mdx | 142 +++++++++--------- docs/api/qiskit/0.46/circuit_singleton.mdx | 8 +- docs/api/qiskit/0.46/converters.mdx | 18 +-- docs/api/qiskit/0.46/exceptions.mdx | 8 +- docs/api/qiskit/0.46/execute.mdx | 2 +- docs/api/qiskit/0.46/passmanager.mdx | 2 +- docs/api/qiskit/0.46/providers.mdx | 10 +- .../qiskit/0.46/providers_fake_provider.mdx | 8 + docs/api/qiskit/0.46/pulse.mdx | 122 ++++++++------- docs/api/qiskit/0.46/qasm.mdx | 8 + docs/api/qiskit/0.46/qasm2.mdx | 4 + docs/api/qiskit/0.46/qasm3.mdx | 10 +- docs/api/qiskit/0.46/qpy.mdx | 6 +- docs/api/qiskit/0.46/result.mdx | 6 +- docs/api/qiskit/0.46/scheduler.mdx | 8 +- docs/api/qiskit/0.46/tools.mdx | 2 + docs/api/qiskit/0.46/transpiler.mdx | 8 +- docs/api/qiskit/0.46/utils.mdx | 38 +++-- 21 files changed, 296 insertions(+), 224 deletions(-) diff --git a/docs/api/qiskit/0.46/algorithms.mdx b/docs/api/qiskit/0.46/algorithms.mdx index 298effe45aa..ad95f845e01 100644 --- a/docs/api/qiskit/0.46/algorithms.mdx +++ b/docs/api/qiskit/0.46/algorithms.mdx @@ -193,7 +193,7 @@ Algorithms that compute the fidelity of pairs of quantum states. ### Exceptions -### AlgorithmError +#### AlgorithmError For Algorithm specific errors. @@ -213,7 +213,7 @@ Utility classes used by algorithms (mainly for type-hinting purposes). Utility functions used by algorithms. -### eval\_observables +#### eval\_observables Deprecated: Accepts a list or a dictionary of operators and calculates their expectation values - means and standard deviations. They are calculated with respect to a quantum state provided. A user can optionally provide a threshold value which filters mean values falling below the threshold. @@ -245,7 +245,7 @@ Utility functions used by algorithms. ListOrDict\[[tuple](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.12)")\[[complex](https://docs.python.org/3/library/functions.html#complex "(in Python v3.12)"), [complex](https://docs.python.org/3/library/functions.html#complex "(in Python v3.12)")]] -### estimate\_observables +#### estimate\_observables Accepts a sequence of operators and calculates their expectation values - means and metadata. They are calculated with respect to a quantum state provided. A user can optionally provide a threshold value which filters mean values falling below the threshold. diff --git a/docs/api/qiskit/0.46/circuit.mdx b/docs/api/qiskit/0.46/circuit.mdx index e7ee6a1a689..b473c603027 100644 --- a/docs/api/qiskit/0.46/circuit.mdx +++ b/docs/api/qiskit/0.46/circuit.mdx @@ -285,7 +285,7 @@ with qc.switch(cr) as case: ### Random Circuits -### random\_circuit +#### random\_circuit Generate random circuit of arbitrary size and form. @@ -343,7 +343,7 @@ with qc.switch(cr) as case: Almost all circuit functions and methods will raise a [`CircuitError`](#qiskit.circuit.CircuitError "qiskit.circuit.CircuitError") when encountering an error that is particular to usage of Qiskit (as opposed to regular typing or indexing problems, which will typically raise the corresponding standard Python error). -### CircuitError +#### CircuitError Base class for errors raised while processing a circuit. diff --git a/docs/api/qiskit/0.46/circuit_classical.mdx b/docs/api/qiskit/0.46/circuit_classical.mdx index d26ca3ba8f5..38654af0ff9 100644 --- a/docs/api/qiskit/0.46/circuit_classical.mdx +++ b/docs/api/qiskit/0.46/circuit_classical.mdx @@ -48,6 +48,8 @@ There are two pathways for constructing expressions. The classes that form [the The expression system is based on tree representation. All nodes in the tree are final (uninheritable) instances of the abstract base class: +#### Expr + Root base class of all nodes in the expression tree. The base case should never be instantiated directly. @@ -60,18 +62,24 @@ These objects are mutable and should not be reused in a different location witho The entry point from general circuit objects to the expression system is by wrapping the object in a [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.Var") node and associating a [`Type`](#qiskit.circuit.classical.types.Type "qiskit.circuit.classical.types.Type") with it. +#### Var + A classical variable. Similarly, literals used in comparison (such as integers) should be lifted to [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes with associated types. +#### Value + A single scalar value. The operations traditionally associated with pre-, post- or infix operators in programming are represented by the [`Unary`](#qiskit.circuit.classical.expr.Unary "qiskit.circuit.classical.expr.Unary") and [`Binary`](#qiskit.circuit.classical.expr.Binary "qiskit.circuit.classical.expr.Binary") nodes as appropriate. These each take an operation type code, which are exposed as enumerations inside each class as [`Unary.Op`](#qiskit.circuit.classical.expr.Unary.Op "qiskit.circuit.classical.expr.Unary.Op") and [`Binary.Op`](#qiskit.circuit.classical.expr.Binary.Op "qiskit.circuit.classical.expr.Binary.Op") respectively. +#### Unary + A unary expression. @@ -81,6 +89,8 @@ The operations traditionally associated with pre-, post- or infix operators in p * **operand** ([*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.Expr")) – The operand of the operation. * **type** ([*Type*](#qiskit.circuit.classical.types.Type "qiskit.circuit.classical.types.types.Type")) – The resolved type of the result. + ##### Op + Enumeration of the opcodes for unary operations. @@ -88,13 +98,13 @@ The operations traditionally associated with pre-, post- or infix operators in p The logical negation [`LOGIC_NOT`](#qiskit.circuit.classical.expr.Unary.Op.LOGIC_NOT "qiskit.circuit.classical.expr.Unary.Op.LOGIC_NOT") takes an input that is implicitly coerced to a Boolean, and returns a Boolean. - ### BIT\_NOT + ###### BIT\_NOT Bitwise negation. `~operand`. - ### LOGIC\_NOT + ###### LOGIC\_NOT Logical negation. `!operand`. @@ -102,6 +112,8 @@ The operations traditionally associated with pre-, post- or infix operators in p +#### Binary + A binary expression. @@ -112,6 +124,8 @@ The operations traditionally associated with pre-, post- or infix operators in p * **right** ([*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.Expr")) – The right-hand operand. * **type** ([*Type*](#qiskit.circuit.classical.types.Type "qiskit.circuit.classical.types.types.Type")) – The resolved type of the result. + ##### Op + Enumeration of the opcodes for binary operations. @@ -121,67 +135,67 @@ The operations traditionally associated with pre-, post- or infix operators in p The binary mathematical relations [`EQUAL`](#qiskit.circuit.classical.expr.Binary.Op.EQUAL "qiskit.circuit.classical.expr.Binary.Op.EQUAL"), [`NOT_EQUAL`](#qiskit.circuit.classical.expr.Binary.Op.NOT_EQUAL "qiskit.circuit.classical.expr.Binary.Op.NOT_EQUAL"), [`LESS`](#qiskit.circuit.classical.expr.Binary.Op.LESS "qiskit.circuit.classical.expr.Binary.Op.LESS"), [`LESS_EQUAL`](#qiskit.circuit.classical.expr.Binary.Op.LESS_EQUAL "qiskit.circuit.classical.expr.Binary.Op.LESS_EQUAL"), [`GREATER`](#qiskit.circuit.classical.expr.Binary.Op.GREATER "qiskit.circuit.classical.expr.Binary.Op.GREATER") and [`GREATER_EQUAL`](#qiskit.circuit.classical.expr.Binary.Op.GREATER_EQUAL "qiskit.circuit.classical.expr.Binary.Op.GREATER_EQUAL") take unsigned integers (with an implicit cast to make them the same width), and return a Boolean. - ### BIT\_AND + ###### BIT\_AND Bitwise “and”. `lhs & rhs`. - ### BIT\_OR + ###### BIT\_OR Bitwise “or”. `lhs | rhs`. - ### BIT\_XOR + ###### BIT\_XOR Bitwise “exclusive or”. `lhs ^ rhs`. - ### LOGIC\_AND + ###### LOGIC\_AND Logical “and”. `lhs && rhs`. - ### LOGIC\_OR + ###### LOGIC\_OR Logical “or”. `lhs || rhs`. - ### EQUAL + ###### EQUAL Numeric equality. `lhs == rhs`. - ### NOT\_EQUAL + ###### NOT\_EQUAL Numeric inequality. `lhs != rhs`. - ### LESS + ###### LESS Numeric less than. `lhs < rhs`. - ### LESS\_EQUAL + ###### LESS\_EQUAL Numeric less than or equal to. `lhs <= rhs` - ### GREATER + ###### GREATER Numeric greater than. `lhs > rhs`. - ### GREATER\_EQUAL + ###### GREATER\_EQUAL Numeric greater than or equal to. `lhs >= rhs`. @@ -193,6 +207,8 @@ When constructing expressions, one must ensure that the types are valid for the Expressions in this system are defined to act only on certain sets of types. However, values may be cast to a suitable supertype in order to satisfy the typing requirements. In these cases, a node in the expression tree is used to represent the promotion. In all cases where operations note that they “implicitly cast” or “coerce” their arguments, the expression tree must have this node representing the conversion. +#### Cast + A cast from one type to another, implied by the use of an expression in a different context. @@ -205,7 +221,7 @@ Constructing the tree representation directly is verbose and easy to make a mist The functions and methods described in this section are a more user-friendly way to build the expression tree, while staying close to the internal representation. All these functions will automatically lift valid Python scalar values into corresponding [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.Var") or [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") objects, and will resolve any required implicit casts on your behalf. -### lift +#### lift Lift the given Python `value` to a [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.expr.Value") or [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.expr.Var"). @@ -243,7 +259,7 @@ The functions and methods described in this section are a more user-friendly way You can manually specify casts in cases where the cast is allowed in explicit form, but may be lossy (such as the cast of a higher precision [`Uint`](#qiskit.circuit.classical.types.Uint "qiskit.circuit.classical.types.Uint") to a lower precision one). -### cast +#### cast Create an explicit cast from the given value to the given type. @@ -266,7 +282,7 @@ You can manually specify casts in cases where the cast is allowed in explicit fo There are helper constructor functions for each of the unary operations. -### bit\_not +#### bit\_not Create a bitwise ‘not’ expression node from the given value, resolving any implicit casts and lifting the value into a [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") node if required. @@ -287,7 +303,7 @@ There are helper constructor functions for each of the unary operations. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### logic\_not +#### logic\_not Create a logical ‘not’ expression node from the given value, resolving any implicit casts and lifting the value into a [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") node if required. @@ -310,7 +326,7 @@ There are helper constructor functions for each of the unary operations. Similarly, the binary operations and relations have helper functions defined. -### bit\_and +#### bit\_and Create a bitwise ‘and’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -331,7 +347,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### bit\_or +#### bit\_or Create a bitwise ‘or’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -352,7 +368,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### bit\_xor +#### bit\_xor Create a bitwise ‘exclusive or’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -373,7 +389,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### logic\_and +#### logic\_and Create a logical ‘and’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -394,7 +410,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### logic\_or +#### logic\_or Create a logical ‘or’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -415,7 +431,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### equal +#### equal Create an ‘equal’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -436,7 +452,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### not\_equal +#### not\_equal Create a ‘not equal’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -457,7 +473,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### less +#### less Create a ‘less than’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -478,7 +494,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### less\_equal +#### less\_equal Create a ‘less than or equal to’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -499,7 +515,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### greater +#### greater Create a ‘greater than’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -520,7 +536,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### greater\_equal +#### greater\_equal Create a ‘greater than or equal to’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -543,7 +559,7 @@ Similarly, the binary operations and relations have helper functions defined. Qiskit’s legacy method for specifying equality conditions for use in conditionals is to use a two-tuple of a [`Clbit`](qiskit.circuit.Clbit "qiskit.circuit.Clbit") or [`ClassicalRegister`](qiskit.circuit.ClassicalRegister "qiskit.circuit.ClassicalRegister") and an integer. This represents an exact equality condition, and there are no ways to specify any other relations. The helper function [`lift_legacy_condition()`](#qiskit.circuit.classical.expr.lift_legacy_condition "qiskit.circuit.classical.expr.lift_legacy_condition") converts this legacy format into the new expression syntax. -### lift\_legacy\_condition +#### lift\_legacy\_condition Lift a legacy two-tuple equality condition into a new-style [`Expr`](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.Expr"). @@ -572,10 +588,12 @@ Qiskit’s legacy method for specifying equality conditions for use in condition A typical consumer of the expression tree wants to recursively walk through the tree, potentially statefully, acting on each node differently depending on its type. This is naturally a double-dispatch problem; the logic of ‘what is to be done’ is likely stateful and users should be free to define their own operations, yet each node defines ‘what is being acted on’. We enable this double dispatch by providing a base visitor class for the expression tree. +#### ExprVisitor + Base class for visitors to the [`Expr`](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.Expr") tree. Subclasses should override whichever of the `visit_*` methods that they are able to handle, and should be organised such that non-existent methods will never be called. - ### visit\_binary + ##### visit\_binary **Return type** @@ -583,7 +601,7 @@ A typical consumer of the expression tree wants to recursively walk through the *\_T\_co* - ### visit\_cast + ##### visit\_cast **Return type** @@ -591,7 +609,7 @@ A typical consumer of the expression tree wants to recursively walk through the *\_T\_co* - ### visit\_generic + ##### visit\_generic **Return type** @@ -599,7 +617,7 @@ A typical consumer of the expression tree wants to recursively walk through the *\_T\_co* - ### visit\_unary + ##### visit\_unary **Return type** @@ -607,7 +625,7 @@ A typical consumer of the expression tree wants to recursively walk through the *\_T\_co* - ### visit\_value + ##### visit\_value **Return type** @@ -615,7 +633,7 @@ A typical consumer of the expression tree wants to recursively walk through the *\_T\_co* - ### visit\_var + ##### visit\_var **Return type** @@ -628,7 +646,7 @@ Consumers of the expression tree should subclass the visitor, and override the ` For the convenience of simple visitors that only need to inspect the variables in an expression and not the general structure, the iterator method [`iter_vars()`](#qiskit.circuit.classical.expr.iter_vars "qiskit.circuit.classical.expr.iter_vars") is provided. -### iter\_vars +#### iter\_vars Get an iterator over the [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.expr.Var") nodes referenced at any level in the given [`Expr`](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr"). @@ -656,7 +674,7 @@ For the convenience of simple visitors that only need to inspect the variables i Two expressions can be compared for direct structural equality by using the built-in Python `==` operator. In general, though, one might want to compare two expressions slightly more semantically, allowing that the [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.Var") nodes inside them are bound to different memory-location descriptions between two different circuits. In this case, one can use [`structurally_equivalent()`](#qiskit.circuit.classical.expr.structurally_equivalent "qiskit.circuit.classical.expr.structurally_equivalent") with two suitable “key” functions to do the comparison. -### structurally\_equivalent +#### structurally\_equivalent Do these two expressions have exactly the same tree structure, up to some key function for the [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.expr.Var") objects? @@ -715,6 +733,8 @@ The type system of the expression tree is exposed through this module. This is i All types inherit from an abstract base class: +### Type + Root base class of all nodes in the type tree. The base case should never be instantiated directly. @@ -725,10 +745,14 @@ Types should be considered immutable objects, and you must not mutate them. It i The two different types available are for Booleans (corresponding to [`Clbit`](qiskit.circuit.Clbit "qiskit.circuit.Clbit") and the literals `True` and `False`), and unsigned integers (corresponding to [`ClassicalRegister`](qiskit.circuit.ClassicalRegister "qiskit.circuit.ClassicalRegister") and Python integers). +### Bool + The Boolean type. This has exactly two values: `True` and `False`. +### Uint + An unsigned integer of fixed bit width. @@ -770,6 +794,8 @@ The low-level interface to querying the subtyping relationship is the [`order()` The return value is an enumeration [`Ordering`](#qiskit.circuit.classical.types.Ordering "qiskit.circuit.classical.types.Ordering") that describes what, if any, subtyping relationship exists between the two types. +### Ordering + Enumeration listing the possible relations between two types. Types only have a partial ordering, so it’s possible for two types to have no sub-typing relationship. diff --git a/docs/api/qiskit/0.46/circuit_library.mdx b/docs/api/qiskit/0.46/circuit_library.mdx index c267ab3f318..7550e46b604 100644 --- a/docs/api/qiskit/0.46/circuit_library.mdx +++ b/docs/api/qiskit/0.46/circuit_library.mdx @@ -324,7 +324,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib **Reference:** Maslov, D. and Dueck, G. W. and Miller, D. M., Techniques for the synthesis of reversible Toffoli networks, 2007 [http://dx.doi.org/10.1145/1278349.1278355](http://dx.doi.org/10.1145/1278349.1278355) -### template\_nct\_2a\_1 +#### template\_nct\_2a\_1 **Returns** @@ -336,7 +336,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_2a\_2 +#### template\_nct\_2a\_2 **Returns** @@ -348,7 +348,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_2a\_3 +#### template\_nct\_2a\_3 **Returns** @@ -360,7 +360,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_4a\_1 +#### template\_nct\_4a\_1 **Returns** @@ -372,7 +372,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_4a\_2 +#### template\_nct\_4a\_2 **Returns** @@ -384,7 +384,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_4a\_3 +#### template\_nct\_4a\_3 **Returns** @@ -396,7 +396,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_4b\_1 +#### template\_nct\_4b\_1 **Returns** @@ -408,7 +408,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_4b\_2 +#### template\_nct\_4b\_2 **Returns** @@ -420,7 +420,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_5a\_1 +#### template\_nct\_5a\_1 **Returns** @@ -432,7 +432,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_5a\_2 +#### template\_nct\_5a\_2 **Returns** @@ -444,7 +444,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_5a\_3 +#### template\_nct\_5a\_3 **Returns** @@ -456,7 +456,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_5a\_4 +#### template\_nct\_5a\_4 **Returns** @@ -468,7 +468,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_6a\_1 +#### template\_nct\_6a\_1 **Returns** @@ -480,7 +480,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_6a\_2 +#### template\_nct\_6a\_2 **Returns** @@ -492,7 +492,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_6a\_3 +#### template\_nct\_6a\_3 **Returns** @@ -504,7 +504,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_6a\_4 +#### template\_nct\_6a\_4 **Returns** @@ -516,7 +516,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_6b\_1 +#### template\_nct\_6b\_1 **Returns** @@ -528,7 +528,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_6b\_2 +#### template\_nct\_6b\_2 **Returns** @@ -540,7 +540,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_6c\_1 +#### template\_nct\_6c\_1 **Returns** @@ -552,7 +552,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_7a\_1 +#### template\_nct\_7a\_1 **Returns** @@ -564,7 +564,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_7b\_1 +#### template\_nct\_7b\_1 **Returns** @@ -576,7 +576,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_7c\_1 +#### template\_nct\_7c\_1 **Returns** @@ -588,7 +588,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_7d\_1 +#### template\_nct\_7d\_1 **Returns** @@ -600,7 +600,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_7e\_1 +#### template\_nct\_7e\_1 **Returns** @@ -612,7 +612,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9a\_1 +#### template\_nct\_9a\_1 **Returns** @@ -624,7 +624,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_1 +#### template\_nct\_9c\_1 **Returns** @@ -636,7 +636,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_2 +#### template\_nct\_9c\_2 **Returns** @@ -648,7 +648,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_3 +#### template\_nct\_9c\_3 **Returns** @@ -660,7 +660,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_4 +#### template\_nct\_9c\_4 **Returns** @@ -672,7 +672,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_5 +#### template\_nct\_9c\_5 **Returns** @@ -684,7 +684,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_6 +#### template\_nct\_9c\_6 **Returns** @@ -696,7 +696,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_7 +#### template\_nct\_9c\_7 **Returns** @@ -708,7 +708,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_8 +#### template\_nct\_9c\_8 **Returns** @@ -720,7 +720,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_9 +#### template\_nct\_9c\_9 **Returns** @@ -732,7 +732,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_10 +#### template\_nct\_9c\_10 **Returns** @@ -744,7 +744,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_11 +#### template\_nct\_9c\_11 **Returns** @@ -756,7 +756,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_12 +#### template\_nct\_9c\_12 **Returns** @@ -768,7 +768,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_1 +#### template\_nct\_9d\_1 **Returns** @@ -780,7 +780,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_2 +#### template\_nct\_9d\_2 **Returns** @@ -792,7 +792,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_3 +#### template\_nct\_9d\_3 **Returns** @@ -804,7 +804,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_4 +#### template\_nct\_9d\_4 **Returns** @@ -816,7 +816,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_5 +#### template\_nct\_9d\_5 **Returns** @@ -828,7 +828,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_6 +#### template\_nct\_9d\_6 **Returns** @@ -840,7 +840,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_7 +#### template\_nct\_9d\_7 **Returns** @@ -852,7 +852,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_8 +#### template\_nct\_9d\_8 **Returns** @@ -864,7 +864,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_9 +#### template\_nct\_9d\_9 **Returns** @@ -876,7 +876,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_10 +#### template\_nct\_9d\_10 **Returns** @@ -892,7 +892,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib Template circuits over Clifford gates. -### clifford\_2\_1 +#### clifford\_2\_1 **Returns** @@ -904,7 +904,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_2\_2 +#### clifford\_2\_2 **Returns** @@ -916,7 +916,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_2\_3 +#### clifford\_2\_3 **Returns** @@ -928,7 +928,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_2\_4 +#### clifford\_2\_4 **Returns** @@ -940,7 +940,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_3\_1 +#### clifford\_3\_1 **Returns** @@ -952,7 +952,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_4\_1 +#### clifford\_4\_1 **Returns** @@ -964,7 +964,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_4\_2 +#### clifford\_4\_2 **Returns** @@ -976,7 +976,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_4\_3 +#### clifford\_4\_3 **Returns** @@ -988,7 +988,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_4\_4 +#### clifford\_4\_4 **Returns** @@ -1000,7 +1000,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_5\_1 +#### clifford\_5\_1 **Returns** @@ -1012,7 +1012,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_6\_1 +#### clifford\_6\_1 **Returns** @@ -1024,7 +1024,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_6\_2 +#### clifford\_6\_2 **Returns** @@ -1036,7 +1036,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_6\_3 +#### clifford\_6\_3 **Returns** @@ -1048,7 +1048,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_6\_4 +#### clifford\_6\_4 **Returns** @@ -1060,7 +1060,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_6\_5 +#### clifford\_6\_5 **Returns** @@ -1072,7 +1072,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_8\_1 +#### clifford\_8\_1 **Returns** @@ -1084,7 +1084,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_8\_2 +#### clifford\_8\_2 **Returns** @@ -1096,7 +1096,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_8\_3 +#### clifford\_8\_3 **Returns** @@ -1112,37 +1112,37 @@ Template circuits over Clifford gates. Template circuits with [`RZXGate`](qiskit.circuit.library.RZXGate "qiskit.circuit.library.RZXGate"). -### rzx\_yz +#### rzx\_yz Template for CX - RYGate - CX. -### rzx\_xz +#### rzx\_xz Template for CX - RXGate - CX. -### rzx\_cy +#### rzx\_cy Template for CX - RYGate - CX. -### rzx\_zz1 +#### rzx\_zz1 Template for CX - RZGate - CX. -### rzx\_zz2 +#### rzx\_zz2 Template for CX - RZGate - CX. -### rzx\_zz3 +#### rzx\_zz3 Template for CX - RZGate - CX. diff --git a/docs/api/qiskit/0.46/circuit_singleton.mdx b/docs/api/qiskit/0.46/circuit_singleton.mdx index bea4618e38d..f57bd19385d 100644 --- a/docs/api/qiskit/0.46/circuit_singleton.mdx +++ b/docs/api/qiskit/0.46/circuit_singleton.mdx @@ -44,6 +44,8 @@ assert XGate() is XGate() The public classes correspond to the standard classes [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.Instruction") and [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"), respectively, and are subclasses of these. +### SingletonInstruction + A base class to use for [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.Instruction") objects that by default are singleton instances. @@ -52,12 +54,16 @@ The public classes correspond to the standard classes [`Instruction`](qiskit.cir The exception to be aware of with this class though are the [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.Instruction") attributes [`label`](qiskit.circuit.Instruction#label "qiskit.circuit.Instruction.label"), [`condition`](qiskit.circuit.Instruction#condition "qiskit.circuit.Instruction.condition"), [`duration`](qiskit.circuit.Instruction#duration "qiskit.circuit.Instruction.duration"), and [`unit`](qiskit.circuit.Instruction#unit "qiskit.circuit.Instruction.unit") which can be set differently for specific instances of gates. For [`SingletonInstruction`](#qiskit.circuit.singleton.SingletonInstruction "qiskit.circuit.singleton.SingletonInstruction") usage to be sound setting these attributes is not available and they can only be set at creation time, or on an object that has been specifically made mutable using [`to_mutable()`](qiskit.circuit.Instruction#to_mutable "qiskit.circuit.Instruction.to_mutable"). If any of these attributes are used during creation, then instead of using a single shared global instance of the same gate a new separate instance will be created. +### SingletonGate + A base class to use for [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate") objects that by default are singleton instances. This class is very similar to [`SingletonInstruction`](#qiskit.circuit.singleton.SingletonInstruction "qiskit.circuit.singleton.SingletonInstruction"), except implies unitary [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate") semantics as well. The same caveats around setting attributes in that class apply here as well. +### SingletonControlledGate + A base class to use for [`ControlledGate`](qiskit.circuit.ControlledGate "qiskit.circuit.ControlledGate") objects that by default are singleton instances @@ -118,7 +124,7 @@ If your constructor does not have defaults for all its arguments, you must set ` Subclasses of [`SingletonInstruction`](#qiskit.circuit.singleton.SingletonInstruction "qiskit.circuit.singleton.SingletonInstruction") and the other associated classes can control how their constructor’s arguments are interpreted, in order to help the singleton machinery return the singleton even in the case than an optional argument is explicitly set to its default. -### \_singleton\_lookup\_key +#### \_singleton\_lookup\_key Given the arguments to the constructor, return a key tuple that identifies the singleton instance to retrieve, or `None` if the arguments imply that a mutable object must be created. diff --git a/docs/api/qiskit/0.46/converters.mdx b/docs/api/qiskit/0.46/converters.mdx index 71bcc1d6bf0..2fc9cb7cc42 100644 --- a/docs/api/qiskit/0.46/converters.mdx +++ b/docs/api/qiskit/0.46/converters.mdx @@ -18,7 +18,7 @@ python_api_name: qiskit.converters `qiskit.converters` -### circuit\_to\_dag +## circuit\_to\_dag Build a [`DAGCircuit`](qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit") object from a [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit"). @@ -60,7 +60,7 @@ python_api_name: qiskit.converters ``` -### dag\_to\_circuit +## dag\_to\_circuit Build a `QuantumCircuit` object from a `DAGCircuit`. @@ -102,7 +102,7 @@ python_api_name: qiskit.converters ![../\_images/converters-1.png](/images/api/qiskit/0.46/converters-1.png) -### circuit\_to\_instruction +## circuit\_to\_instruction Build an [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.Instruction") object from a [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit"). @@ -145,7 +145,7 @@ python_api_name: qiskit.converters ``` -### circuit\_to\_gate +## circuit\_to\_gate Build a [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate") object from a [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit"). @@ -172,7 +172,7 @@ python_api_name: qiskit.converters [Gate](qiskit.circuit.Gate "qiskit.circuit.Gate") -### ast\_to\_dag +## ast\_to\_dag Build a `DAGCircuit` object from an AST `Node` object. @@ -216,7 +216,7 @@ python_api_name: qiskit.converters ``` -### dagdependency\_to\_circuit +## dagdependency\_to\_circuit Build a `QuantumCircuit` object from a `DAGDependency`. @@ -234,7 +234,7 @@ python_api_name: qiskit.converters [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### circuit\_to\_dagdependency +## circuit\_to\_dagdependency Build a `DAGDependency` object from a [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit"). @@ -253,7 +253,7 @@ python_api_name: qiskit.converters [DAGDependency](qiskit.dagcircuit.DAGDependency "qiskit.dagcircuit.DAGDependency") -### dag\_to\_dagdependency +## dag\_to\_dagdependency Build a `DAGDependency` object from a `DAGCircuit`. @@ -272,7 +272,7 @@ python_api_name: qiskit.converters [DAGDependency](qiskit.dagcircuit.DAGDependency "qiskit.dagcircuit.DAGDependency") -### dagdependency\_to\_dag +## dagdependency\_to\_dag Build a `DAGCircuit` object from a `DAGDependency`. diff --git a/docs/api/qiskit/0.46/exceptions.mdx b/docs/api/qiskit/0.46/exceptions.mdx index 6a648451936..eca6a9235c8 100644 --- a/docs/api/qiskit/0.46/exceptions.mdx +++ b/docs/api/qiskit/0.46/exceptions.mdx @@ -20,7 +20,7 @@ python_api_name: qiskit.exceptions All Qiskit-related errors raised by Qiskit are subclasses of the base: -### QiskitError +## QiskitError Base class for errors raised by Qiskit. @@ -36,7 +36,7 @@ Many of the Qiskit subpackages define their own more granular error, to help in Qiskit has several optional features that depend on other packages that are not required for a minimal install. You can read more about those, and ways to check for their presence, in [`qiskit.utils.optionals`](utils#module-qiskit.utils.optionals "qiskit.utils.optionals"). Trying to use a feature that requires an optional extra will raise a particular error, which subclasses both [`QiskitError`](#qiskit.exceptions.QiskitError "qiskit.exceptions.QiskitError") and the Python built-in `ImportError`. -### MissingOptionalLibraryError +## MissingOptionalLibraryError Raised when an optional library is missing. @@ -46,7 +46,7 @@ Qiskit has several optional features that depend on other packages that are not Two more uncommon errors relate to failures in reading user-configuration files, or specifying a filename that cannot be used: -### QiskitUserConfigError +## QiskitUserConfigError Raised when an error is encountered reading a user config file. @@ -54,7 +54,7 @@ Two more uncommon errors relate to failures in reading user-configuration files, Set the error message. -### InvalidFileError +## InvalidFileError Raised when the file provided is not valid for the specific task. diff --git a/docs/api/qiskit/0.46/execute.mdx b/docs/api/qiskit/0.46/execute.mdx index befe9b05f57..ff4b142abf5 100644 --- a/docs/api/qiskit/0.46/execute.mdx +++ b/docs/api/qiskit/0.46/execute.mdx @@ -18,7 +18,7 @@ python_api_name: qiskit.execute_function `qiskit.execute_function` -### execute +## execute Execute a list of [`qiskit.circuit.QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") or [`qiskit.pulse.Schedule`](qiskit.pulse.Schedule "qiskit.pulse.Schedule") on a backend. diff --git a/docs/api/qiskit/0.46/passmanager.mdx b/docs/api/qiskit/0.46/passmanager.mdx index 064106ed278..73ab2dffa5e 100644 --- a/docs/api/qiskit/0.46/passmanager.mdx +++ b/docs/api/qiskit/0.46/passmanager.mdx @@ -161,7 +161,7 @@ With the pass manager framework, a developer can flexibly customize the optimiza ### Exceptions -### PassManagerError +#### PassManagerError Pass manager error. diff --git a/docs/api/qiskit/0.46/providers.mdx b/docs/api/qiskit/0.46/providers.mdx index fca0bad274e..8684cbfd8f7 100644 --- a/docs/api/qiskit/0.46/providers.mdx +++ b/docs/api/qiskit/0.46/providers.mdx @@ -75,7 +75,7 @@ It’s worth pointing out that Terra’s version support policy doesn’t mean p ### Exceptions -### QiskitBackendNotFoundError +#### QiskitBackendNotFoundError Base class for errors raised while looking for a backend. @@ -83,7 +83,7 @@ It’s worth pointing out that Terra’s version support policy doesn’t mean p Set the error message. -### BackendPropertyError +#### BackendPropertyError Base class for errors raised while looking for a backend property. @@ -91,7 +91,7 @@ It’s worth pointing out that Terra’s version support policy doesn’t mean p Set the error message. -### JobError +#### JobError Base class for errors raised by Jobs. @@ -99,7 +99,7 @@ It’s worth pointing out that Terra’s version support policy doesn’t mean p Set the error message. -### JobTimeoutError +#### JobTimeoutError Base class for timeout errors raised by jobs. @@ -107,7 +107,7 @@ It’s worth pointing out that Terra’s version support policy doesn’t mean p Set the error message. -### BackendConfigurationError +#### BackendConfigurationError Base class for errors raised by the BackendConfiguration. diff --git a/docs/api/qiskit/0.46/providers_fake_provider.mdx b/docs/api/qiskit/0.46/providers_fake_provider.mdx index 3b26734b7d8..eb71ff020e4 100644 --- a/docs/api/qiskit/0.46/providers_fake_provider.mdx +++ b/docs/api/qiskit/0.46/providers_fake_provider.mdx @@ -210,6 +210,8 @@ Special fake backends are fake backends that were created for special testing pu The fake backends based on IBM hardware are based on a set of base classes: +### FakeBackendV2 + A fake backend class for testing and noisy simulation using real backend snapshots. @@ -222,6 +224,8 @@ The fake backends based on IBM hardware are based on a set of base classes: +### FakeBackend + This is a dummy backend just for testing purposes. @@ -233,6 +237,8 @@ The fake backends based on IBM hardware are based on a set of base classes: * **time\_alive** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) – time to wait before returning result +### FakeQasmBackend + A fake OpenQASM backend. @@ -244,6 +250,8 @@ The fake backends based on IBM hardware are based on a set of base classes: * **time\_alive** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) – time to wait before returning result +### FakePulseBackend + A fake pulse backend. diff --git a/docs/api/qiskit/0.46/pulse.mdx b/docs/api/qiskit/0.46/pulse.mdx index c6596123686..20620ea6cad 100644 --- a/docs/api/qiskit/0.46/pulse.mdx +++ b/docs/api/qiskit/0.46/pulse.mdx @@ -71,6 +71,8 @@ An instruction can be added to a [`Schedule`](qiskit.pulse.Schedule "qiskit.puls These are all instances of the same base class: +### Instruction + The smallest schedulable unit: a single instruction. It has a fixed duration and specified channels. @@ -112,7 +114,7 @@ In contrast, the [`SymbolicPulse`](qiskit.pulse.library.SymbolicPulse "qiskit.pu ### Waveform Pulse Representation -### constant +#### constant Generates constant-sampled [`Waveform`](qiskit.pulse.library.Waveform "qiskit.pulse.library.Waveform"). @@ -138,7 +140,7 @@ $$ [*Waveform*](qiskit.pulse.library.Waveform "qiskit.pulse.library.waveform.Waveform") -### zero +#### zero Generates zero-sampled [`Waveform`](qiskit.pulse.library.Waveform "qiskit.pulse.library.Waveform"). @@ -163,7 +165,7 @@ $$ [*Waveform*](qiskit.pulse.library.Waveform "qiskit.pulse.library.waveform.Waveform") -### square +#### square Generates square wave [`Waveform`](qiskit.pulse.library.Waveform "qiskit.pulse.library.Waveform"). @@ -193,7 +195,7 @@ $$ [*Waveform*](qiskit.pulse.library.Waveform "qiskit.pulse.library.waveform.Waveform") -### sawtooth +#### sawtooth Generates sawtooth wave [`Waveform`](qiskit.pulse.library.Waveform "qiskit.pulse.library.Waveform"). @@ -240,7 +242,7 @@ $$ ![../\_images/pulse-1.png](/images/api/qiskit/0.46/pulse-1.png) -### triangle +#### triangle Generates triangle wave [`Waveform`](qiskit.pulse.library.Waveform "qiskit.pulse.library.Waveform"). @@ -287,7 +289,7 @@ $$ ![../\_images/pulse-2.png](/images/api/qiskit/0.46/pulse-2.png) -### cos +#### cos Generates cosine wave [`Waveform`](qiskit.pulse.library.Waveform "qiskit.pulse.library.Waveform"). @@ -315,7 +317,7 @@ $$ [*Waveform*](qiskit.pulse.library.Waveform "qiskit.pulse.library.waveform.Waveform") -### sin +#### sin Generates sine wave [`Waveform`](qiskit.pulse.library.Waveform "qiskit.pulse.library.Waveform"). @@ -343,7 +345,7 @@ $$ [*Waveform*](qiskit.pulse.library.Waveform "qiskit.pulse.library.waveform.Waveform") -### gaussian +#### gaussian Generates unnormalized gaussian [`Waveform`](qiskit.pulse.library.Waveform "qiskit.pulse.library.Waveform"). @@ -383,7 +385,7 @@ $$ [*Waveform*](qiskit.pulse.library.Waveform "qiskit.pulse.library.waveform.Waveform") -### gaussian\_deriv +#### gaussian\_deriv Generates unnormalized gaussian derivative [`Waveform`](qiskit.pulse.library.Waveform "qiskit.pulse.library.Waveform"). @@ -413,7 +415,7 @@ $$ [*Waveform*](qiskit.pulse.library.Waveform "qiskit.pulse.library.waveform.Waveform") -### sech +#### sech Generates unnormalized sech [`Waveform`](qiskit.pulse.library.Waveform "qiskit.pulse.library.Waveform"). @@ -451,7 +453,7 @@ $$ [*Waveform*](qiskit.pulse.library.Waveform "qiskit.pulse.library.waveform.Waveform") -### sech\_deriv +#### sech\_deriv Generates unnormalized sech derivative [`Waveform`](qiskit.pulse.library.Waveform "qiskit.pulse.library.Waveform"). @@ -482,7 +484,7 @@ $$ [*Waveform*](qiskit.pulse.library.Waveform "qiskit.pulse.library.waveform.Waveform") -### gaussian\_square +#### gaussian\_square Generates gaussian square [`Waveform`](qiskit.pulse.library.Waveform "qiskit.pulse.library.Waveform"). @@ -524,7 +526,7 @@ $$ [*Waveform*](qiskit.pulse.library.Waveform "qiskit.pulse.library.waveform.Waveform") -### drag +#### drag Generates Y-only correction DRAG [`Waveform`](qiskit.pulse.library.Waveform "qiskit.pulse.library.Waveform") for standard nonlinear oscillator (SNO) \[1]. @@ -616,6 +618,8 @@ Novel channel types can often utilize the [`ControlChannel`](qiskit.pulse.channe All channels are children of the same abstract base class: +### Channel + Base class of channels. Channels provide a Qiskit-side label for typical quantum control hardware signal channels. The final label -> physical channel mapping is the responsibility of the hardware backend. For instance, `DriveChannel(0)` holds instructions which the backend should map to the signal line driving gate operations on the qubit labeled (indexed) 0. @@ -669,6 +673,8 @@ The alignment transforms define alignment policies of instructions in [`Schedule These are all subtypes of the abstract base class [`AlignmentKind`](#qiskit.pulse.transforms.AlignmentKind "qiskit.pulse.transforms.AlignmentKind"). +#### AlignmentKind + An abstract class for schedule alignment. @@ -681,7 +687,7 @@ These are all subtypes of the abstract base class [`AlignmentKind`](#qiskit.puls The canonicalization transforms convert schedules to a form amenable for execution on OpenPulse backends. -### add\_implicit\_acquires +#### add\_implicit\_acquires Return a new schedule with implicit acquires from the measurement mapping replaced by explicit ones. @@ -704,7 +710,7 @@ The canonicalization transforms convert schedules to a form amenable for executi [*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") -### align\_measures +#### align\_measures Return new schedules where measurements occur at the same physical time. @@ -771,7 +777,7 @@ The canonicalization transforms convert schedules to a form amenable for executi [*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")\[[*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule")] -### block\_to\_schedule +#### block\_to\_schedule Convert `ScheduleBlock` to `Schedule`. @@ -798,7 +804,7 @@ The canonicalization transforms convert schedules to a form amenable for executi -### compress\_pulses +#### compress\_pulses Optimization pass to replace identical pulses. @@ -816,7 +822,7 @@ The canonicalization transforms convert schedules to a form amenable for executi [*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")\[[*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule")] -### flatten +#### flatten Flatten (inline) any called nodes into a Schedule tree with no nested children. @@ -838,7 +844,7 @@ The canonicalization transforms convert schedules to a form amenable for executi [*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") -### inline\_subroutines +#### inline\_subroutines Recursively remove call instructions and inline the respective subroutine instructions. @@ -862,7 +868,7 @@ The canonicalization transforms convert schedules to a form amenable for executi [*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") | [*ScheduleBlock*](qiskit.pulse.ScheduleBlock "qiskit.pulse.schedule.ScheduleBlock") -### pad +#### pad Pad the input Schedule with `Delay``s on all unoccupied timeslots until ``schedule.duration` or `until` if not `None`. @@ -888,7 +894,7 @@ The canonicalization transforms convert schedules to a form amenable for executi [*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") -### remove\_directives +#### remove\_directives Remove directives. @@ -906,7 +912,7 @@ The canonicalization transforms convert schedules to a form amenable for executi [*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") -### remove\_trivial\_barriers +#### remove\_trivial\_barriers Remove trivial barriers with 0 or 1 channels. @@ -930,7 +936,7 @@ The canonicalization transforms convert schedules to a form amenable for executi The DAG transforms create DAG representation of input program. This can be used for optimization of instructions and equality checks. -### block\_to\_dag +#### block\_to\_dag Convert schedule block instruction into DAG. @@ -988,7 +994,7 @@ The DAG transforms create DAG representation of input program. This can be used A sequence of transformations to generate a target code. -### target\_qobj\_transform +#### target\_qobj\_transform A basic pulse program transformation for OpenPulse API execution. @@ -1277,7 +1283,7 @@ with pulse.build(backend) as drive_sched: DriveChannel(0) ``` -### acquire\_channel +#### acquire\_channel Return `AcquireChannel` for `qubit` on the active builder backend. @@ -1303,7 +1309,7 @@ DriveChannel(0) [*AcquireChannel*](qiskit.pulse.channels.AcquireChannel "qiskit.pulse.channels.AcquireChannel") -### control\_channels +#### control\_channels Return `ControlChannel` for `qubit` on the active builder backend. @@ -1338,7 +1344,7 @@ DriveChannel(0) [*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")\[[*ControlChannel*](qiskit.pulse.channels.ControlChannel "qiskit.pulse.channels.ControlChannel")] -### drive\_channel +#### drive\_channel Return `DriveChannel` for `qubit` on the active builder backend. @@ -1364,7 +1370,7 @@ DriveChannel(0) [*DriveChannel*](qiskit.pulse.channels.DriveChannel "qiskit.pulse.channels.DriveChannel") -### measure\_channel +#### measure\_channel Return `MeasureChannel` for `qubit` on the active builder backend. @@ -1423,7 +1429,7 @@ drive_sched.draw() ![../\_images/pulse-6.png](/images/api/qiskit/0.46/pulse-6.png) -### acquire +#### acquire Acquire for a `duration` on a `channel` and store the result in a `register`. @@ -1460,7 +1466,7 @@ drive_sched.draw() [**exceptions.PulseError**](#qiskit.pulse.PulseError "qiskit.pulse.exceptions.PulseError") – If the register type is not supported. -### barrier +#### barrier Barrier directive for a set of channels and qubits. @@ -1527,7 +1533,7 @@ drive_sched.draw() * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) – Name for the barrier -### call +#### call Call the subroutine within the currently active builder context with arbitrary parameters which will be assigned to the target program. @@ -1704,7 +1710,7 @@ drive_sched.draw() * **kw\_params** ([*ParameterExpression*](qiskit.circuit.ParameterExpression "qiskit.circuit.parameterexpression.ParameterExpression") *|*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) – Alternative way to provide parameters. Since this is keyed on the string parameter name, the parameters having the same name are all updated together. If you want to avoid name collision, use `value_dict` with [`Parameter`](qiskit.circuit.Parameter "qiskit.circuit.Parameter") objects instead. -### delay +#### delay Delay on a `channel` for a `duration`. @@ -1727,7 +1733,7 @@ drive_sched.draw() * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) – Name of the instruction. -### play +#### play Play a `pulse` on a `channel`. @@ -1750,7 +1756,7 @@ drive_sched.draw() * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) – Name of the pulse. -### reference +#### reference Refer to undefined subroutine by string keys. @@ -1775,7 +1781,7 @@ drive_sched.draw() * **extra\_keys** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) – Helper keys to uniquely specify the subroutine. -### set\_frequency +#### set\_frequency Set the `frequency` of a pulse `channel`. @@ -1798,7 +1804,7 @@ drive_sched.draw() * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) – Name of the instruction. -### set\_phase +#### set\_phase Set the `phase` of a pulse `channel`. @@ -1823,7 +1829,7 @@ drive_sched.draw() * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) – Name of the instruction. -### shift\_frequency +#### shift\_frequency Shift the `frequency` of a pulse `channel`. @@ -1846,7 +1852,7 @@ drive_sched.draw() * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) – Name of the instruction. -### shift\_phase +#### shift\_phase Shift the `phase` of a pulse `channel`. @@ -1871,7 +1877,7 @@ drive_sched.draw() * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) – Name of the instruction. -### snapshot +#### snapshot Simulator snapshot. @@ -1913,7 +1919,7 @@ pulse_prog.draw() ![../\_images/pulse-7.png](/images/api/qiskit/0.46/pulse-7.png) -### align\_equispaced +#### align\_equispaced Equispaced alignment pulse scheduling context. @@ -1959,7 +1965,7 @@ pulse_prog.draw() The scheduling is performed for sub-schedules within the context rather than channel-wise. If you want to apply the equispaced context for each channel, you should use the context independently for channels. -### align\_func +#### align\_func Callback defined alignment pulse scheduling context. @@ -2011,7 +2017,7 @@ pulse_prog.draw() The scheduling is performed for sub-schedules within the context rather than channel-wise. If you want to apply the numerical context for each channel, you need to apply the context independently to channels. -### align\_left +#### align\_left Left alignment pulse scheduling context. @@ -2046,7 +2052,7 @@ pulse_prog.draw() [*ContextManager*](https://docs.python.org/3/library/typing.html#typing.ContextManager "(in Python v3.12)")\[None] -### align\_right +#### align\_right Right alignment pulse scheduling context. @@ -2081,7 +2087,7 @@ pulse_prog.draw() [*AlignmentKind*](#qiskit.pulse.transforms.AlignmentKind "qiskit.pulse.transforms.alignments.AlignmentKind") -### align\_sequential +#### align\_sequential Sequential alignment pulse scheduling context. @@ -2116,7 +2122,7 @@ pulse_prog.draw() [*AlignmentKind*](#qiskit.pulse.transforms.AlignmentKind "qiskit.pulse.transforms.alignments.AlignmentKind") -### circuit\_scheduler\_settings +#### circuit\_scheduler\_settings Set the currently active circuit scheduler settings for this context. @@ -2149,7 +2155,7 @@ pulse_prog.draw() [*ContextManager*](https://docs.python.org/3/library/typing.html#typing.ContextManager "(in Python v3.12)")\[None] -### frequency\_offset +#### frequency\_offset Shift the frequency of inputs channels on entry into context and undo on exit. @@ -2193,7 +2199,7 @@ pulse_prog.draw() [*ContextManager*](https://docs.python.org/3/library/typing.html#typing.ContextManager "(in Python v3.12)")\[None] -### phase\_offset +#### phase\_offset Shift the phase of input channels on entry into context and undo on exit. @@ -2228,7 +2234,7 @@ pulse_prog.draw() [*ContextManager*](https://docs.python.org/3/library/typing.html#typing.ContextManager "(in Python v3.12)")\[None] -### transpiler\_settings +#### transpiler\_settings Set the currently active transpiler settings for this context. @@ -2280,7 +2286,7 @@ with pulse.build(backend) as measure_sched: MemorySlot(0) ``` -### measure +#### measure Measure a qubit within the currently active builder context. @@ -2335,7 +2341,7 @@ MemorySlot(0) [*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")\[StorageLocation] | StorageLocation -### measure\_all +#### measure\_all Measure all qubits within the currently active builder context. @@ -2368,7 +2374,7 @@ MemorySlot(0) [*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")\[[*MemorySlot*](qiskit.pulse.channels.MemorySlot "qiskit.pulse.channels.MemorySlot")] -### delay\_qubits +#### delay\_qubits Insert delays on all of the `channels.Channel`s that correspond to the input `qubits` at the same time. @@ -2425,7 +2431,7 @@ There are 160 samples in 3.5555555555555554e-08 seconds There are 1e-06 seconds in 4500 samples. ``` -### active\_backend +#### active\_backend Get the backend of the currently active builder context. @@ -2445,7 +2451,7 @@ There are 1e-06 seconds in 4500 samples. [**exceptions.BackendNotSet**](#qiskit.pulse.BackendNotSet "qiskit.pulse.exceptions.BackendNotSet") – If the builder does not have a backend set. -### active\_transpiler\_settings +#### active\_transpiler\_settings Return the current active builder context’s transpiler settings. @@ -2478,7 +2484,7 @@ There are 1e-06 seconds in 4500 samples. [*Dict*](https://docs.python.org/3/library/typing.html#typing.Dict "(in Python v3.12)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)"), [*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.12)")] -### active\_circuit\_scheduler\_settings +#### active\_circuit\_scheduler\_settings Return the current active builder context’s circuit scheduler settings. @@ -2512,7 +2518,7 @@ There are 1e-06 seconds in 4500 samples. [*Dict*](https://docs.python.org/3/library/typing.html#typing.Dict "(in Python v3.12)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)"), [*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.12)")] -### num\_qubits +#### num\_qubits Return number of qubits in the currently active backend. @@ -2542,7 +2548,7 @@ There are 1e-06 seconds in 4500 samples. [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") -### qubit\_channels +#### qubit\_channels Returns the set of channels associated with a qubit. @@ -2576,7 +2582,7 @@ There are 1e-06 seconds in 4500 samples. [*Set*](https://docs.python.org/3/library/typing.html#typing.Set "(in Python v3.12)")\[[*Channel*](#qiskit.pulse.channels.Channel "qiskit.pulse.channels.Channel")] -### samples\_to\_seconds +#### samples\_to\_seconds Obtain the time in seconds that will elapse for the input number of samples on the active backend. @@ -2594,7 +2600,7 @@ There are 1e-06 seconds in 4500 samples. [float](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)") | [*ndarray*](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray "(in NumPy v1.26)") -### seconds\_to\_samples +#### seconds\_to\_samples Obtain the number of samples that will elapse in `seconds` on the active backend. diff --git a/docs/api/qiskit/0.46/qasm.mdx b/docs/api/qiskit/0.46/qasm.mdx index a3deaab892c..6f306eef6a5 100644 --- a/docs/api/qiskit/0.46/qasm.mdx +++ b/docs/api/qiskit/0.46/qasm.mdx @@ -24,6 +24,8 @@ python_api_name: qiskit.qasm ## QASM Routines +### Qasm + OPENQASM circuit object. @@ -32,14 +34,20 @@ python_api_name: qiskit.qasm ## Pygments +### OpenQASMLexer + A pygments lexer for OpenQasm. +### QasmHTMLStyle + A style for OpenQasm in a HTML env (e.g. Jupyter widget). +### QasmTerminalStyle + A style for OpenQasm in a Terminal env (e.g. Jupyter print). diff --git a/docs/api/qiskit/0.46/qasm2.mdx b/docs/api/qiskit/0.46/qasm2.mdx index 3dabaf15ca9..a3029a93fcd 100644 --- a/docs/api/qiskit/0.46/qasm2.mdx +++ b/docs/api/qiskit/0.46/qasm2.mdx @@ -83,6 +83,8 @@ Both of these loading functions also take an argument `include_path`, which is a You can extend the quantum components of the OpenQASM 2 language by passing an iterable of information on custom instructions as the argument `custom_instructions`. In files that have compatible definitions for these instructions, the given `constructor` will be used in place of whatever other handling [`qiskit.qasm2`](#module-qiskit.qasm2 "qiskit.qasm2") would have done. These instructions may optionally be marked as `builtin`, which causes them to not require an `opaque` or `gate` declaration, but they will silently ignore a compatible declaration. Either way, it is an error to provide a custom instruction that has a different number of parameters or qubits as a defined instruction in a parsed program. Each element of the argument iterable should be a particular data class: +#### CustomInstruction + Information about a custom instruction that should be defined during the parse. @@ -99,6 +101,8 @@ This can be particularly useful when trying to resolve ambiguities in the global Similar to the quantum extensions above, you can also extend the processing done to classical expressions (arguments to gates) by passing an iterable to the argument `custom_classical` to either loader. This needs the `name` (a valid OpenQASM 2 identifier), the number `num_params` of parameters it takes, and a Python callable that implements the function. The Python callable must be able to accept `num_params` positional floating-point arguments, and must return a float or integer (which will be converted to a float). Builtin functions cannot be overridden. +#### CustomClassical + Information about a custom classical function that should be defined in mathematical expressions. diff --git a/docs/api/qiskit/0.46/qasm3.mdx b/docs/api/qiskit/0.46/qasm3.mdx index 88873dfed29..d08dafd7a74 100644 --- a/docs/api/qiskit/0.46/qasm3.mdx +++ b/docs/api/qiskit/0.46/qasm3.mdx @@ -57,6 +57,8 @@ The high-level functions are simply [`dump()`](#qiskit.qasm3.dump "qiskit.qasm3. Both of these exporter functions are single-use wrappers around the main [`Exporter`](#qiskit.qasm3.Exporter "qiskit.qasm3.Exporter") class. For more complex exporting needs, including dumping multiple circuits in a single session, it may be more convenient or faster to use the complete interface. +### Exporter + QASM3 exporter main class. @@ -88,13 +90,13 @@ Both of these exporter functions are single-use wrappers around the main [`Expor * **experimental** ([*ExperimentalFeatures*](#qiskit.qasm3.ExperimentalFeatures "qiskit.qasm3.experimental.ExperimentalFeatures")) – any experimental features to enable during the export. See [`ExperimentalFeatures`](#qiskit.qasm3.ExperimentalFeatures "qiskit.qasm3.ExperimentalFeatures") for more details. - ### dump + #### dump Convert the circuit to OpenQASM 3, dumping the result to a file or text stream. - ### dumps + #### dumps Convert the circuit to OpenQASM 3, returning the result as a string. @@ -115,12 +117,14 @@ All of these interfaces will raise [`QASM3ExporterError`](#qiskit.qasm3.QASM3Exp The OpenQASM 3 language is still evolving as hardware capabilities improve, so there is no final syntax that Qiskit can reliably target. In order to represent the evolving language, we will sometimes release features before formal standardization, which may need to change as the review process in the OpenQASM 3 design committees progresses. By default, the exporters will only support standardised features of the language. To enable these early-release features, use the `experimental` keyword argument of [`dump()`](#qiskit.qasm3.dump "qiskit.qasm3.dump") and [`dumps()`](#qiskit.qasm3.dumps "qiskit.qasm3.dumps"). The available feature flags are: +#### ExperimentalFeatures + Flags for experimental features that the OpenQASM 3 exporter supports. These are experimental and are more liable to change, because the OpenQASM 3 specification has not formally accepted them yet, so the syntax may not be finalized. - ### SWITCH\_CASE\_V1 + ##### SWITCH\_CASE\_V1 Support exporting switch-case statements as proposed by [https://github.com/openqasm/openqasm/pull/463](https://github.com/openqasm/openqasm/pull/463) at [commit bfa787aa3078](https://github.com/openqasm/openqasm/pull/463/commits/bfa787aa3078). diff --git a/docs/api/qiskit/0.46/qpy.mdx b/docs/api/qiskit/0.46/qpy.mdx index 584b6d05dcd..2f606de64cc 100644 --- a/docs/api/qiskit/0.46/qpy.mdx +++ b/docs/api/qiskit/0.46/qpy.mdx @@ -55,7 +55,7 @@ and then loading that file will return a list with all the circuits ### API documentation -### load +#### load Load a QPY binary file @@ -100,7 +100,7 @@ and then loading that file will return a list with all the circuits [*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")\[[*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit") | [*ScheduleBlock*](qiskit.pulse.ScheduleBlock "qiskit.pulse.schedule.ScheduleBlock")] -### dump +#### dump Write QPY binary data to a file @@ -152,7 +152,7 @@ and then loading that file will return a list with all the circuits These functions will raise a custom subclass of [`QiskitError`](exceptions#qiskit.exceptions.QiskitError "qiskit.exceptions.QiskitError") if they encounter problems during serialization or deserialization. -### QpyError +#### QpyError Errors raised by the qpy module. diff --git a/docs/api/qiskit/0.46/result.mdx b/docs/api/qiskit/0.46/result.mdx index 64b19a077d9..d4bd206fe2e 100644 --- a/docs/api/qiskit/0.46/result.mdx +++ b/docs/api/qiskit/0.46/result.mdx @@ -24,7 +24,7 @@ python_api_name: qiskit.result | [`ResultError`](qiskit.result.ResultError "qiskit.result.ResultError")(error) | Exceptions raised due to errors in result output. | | [`Counts`](qiskit.result.Counts "qiskit.result.Counts")(data\[, time\_taken, creg\_sizes, ...]) | A class to store a counts result from a circuit execution. | -### marginal\_counts +## marginal\_counts Marginalize counts from an experiment over some indices of interest. @@ -52,7 +52,7 @@ python_api_name: qiskit.result [**QiskitError**](exceptions#qiskit.exceptions.QiskitError "qiskit.exceptions.QiskitError") – in case of invalid indices to marginalize over. -### marginal\_distribution +## marginal\_distribution Marginalize counts from an experiment over some indices of interest. @@ -79,7 +79,7 @@ python_api_name: qiskit.result * **is invalid.** – -### marginal\_memory +## marginal\_memory Marginalize shot memory diff --git a/docs/api/qiskit/0.46/scheduler.mdx b/docs/api/qiskit/0.46/scheduler.mdx index e9950de1a90..78e0b906a94 100644 --- a/docs/api/qiskit/0.46/scheduler.mdx +++ b/docs/api/qiskit/0.46/scheduler.mdx @@ -20,6 +20,8 @@ python_api_name: qiskit.scheduler A circuit scheduler compiles a circuit program to a pulse program. +## ScheduleConfig + Configuration for pulse scheduling. @@ -32,7 +34,7 @@ A circuit scheduler compiles a circuit program to a pulse program. * **dt** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) – Sample duration. -### schedule\_circuit +## schedule\_circuit Basic scheduling pass from a circuit to a pulse Schedule, using the backend. If no method is specified, then a basic, as late as possible scheduling pass is performed, i.e. pulses are scheduled to occur as late as possible. @@ -66,7 +68,7 @@ A circuit scheduler compiles a circuit program to a pulse program. Pulse scheduling methods. -### as\_soon\_as\_possible +## as\_soon\_as\_possible Return the pulse Schedule which implements the input circuit using an “as soon as possible” (asap) scheduling policy. @@ -88,7 +90,7 @@ Pulse scheduling methods. [*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") -### as\_late\_as\_possible +## as\_late\_as\_possible Return the pulse Schedule which implements the input circuit using an “as late as possible” (alap) scheduling policy. diff --git a/docs/api/qiskit/0.46/tools.mdx b/docs/api/qiskit/0.46/tools.mdx index 047fdde0bb7..7d801d8f062 100644 --- a/docs/api/qiskit/0.46/tools.mdx +++ b/docs/api/qiskit/0.46/tools.mdx @@ -93,6 +93,8 @@ A helper module to get IBM backend information and submitted job status. A helper component for publishing and subscribing to events. +#### TextProgressBar + A simple text-based progress bar. diff --git a/docs/api/qiskit/0.46/transpiler.mdx b/docs/api/qiskit/0.46/transpiler.mdx index 2829a82190b..9ef33b0717d 100644 --- a/docs/api/qiskit/0.46/transpiler.mdx +++ b/docs/api/qiskit/0.46/transpiler.mdx @@ -938,7 +938,7 @@ See [https://arxiv.org/abs/2102.01682](https://arxiv.org/abs/2102.01682) for mor ### Exceptions -### TranspilerError +#### TranspilerError Exceptions raised during transpilation. @@ -946,7 +946,7 @@ See [https://arxiv.org/abs/2102.01682](https://arxiv.org/abs/2102.01682) for mor Set the error message. -### TranspilerAccessError +#### TranspilerAccessError DEPRECATED: Exception of access error in the transpiler passes. @@ -954,7 +954,7 @@ See [https://arxiv.org/abs/2102.01682](https://arxiv.org/abs/2102.01682) for mor Set the error message. -### CouplingError +#### CouplingError Base class for errors raised by the coupling graph object. @@ -962,7 +962,7 @@ See [https://arxiv.org/abs/2102.01682](https://arxiv.org/abs/2102.01682) for mor Set the error message. -### LayoutError +#### LayoutError Errors raised by the layout object. diff --git a/docs/api/qiskit/0.46/utils.mdx b/docs/api/qiskit/0.46/utils.mdx index 89a72d4e2a3..73b8f32583a 100644 --- a/docs/api/qiskit/0.46/utils.mdx +++ b/docs/api/qiskit/0.46/utils.mdx @@ -18,7 +18,7 @@ python_api_name: qiskit.utils `qiskit.utils` -### add\_deprecation\_to\_docstring +## add\_deprecation\_to\_docstring Dynamically insert the deprecation message into `func`’s docstring. @@ -31,7 +31,7 @@ python_api_name: qiskit.utils * **pending** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) – Is the deprecation still pending? -### deprecate\_arg +## deprecate\_arg Decorator to indicate an argument has been deprecated in some way. @@ -59,7 +59,7 @@ python_api_name: qiskit.utils Callable -### deprecate\_arguments +## deprecate\_arguments Deprecated. Instead, use @deprecate\_arg. @@ -79,7 +79,7 @@ python_api_name: qiskit.utils Callable -### deprecate\_func +## deprecate\_func Decorator to indicate a function has been deprecated. @@ -106,7 +106,7 @@ python_api_name: qiskit.utils Callable -### deprecate\_function +## deprecate\_function Deprecated. Instead, use @deprecate\_func. @@ -127,7 +127,7 @@ python_api_name: qiskit.utils Callable -### local\_hardware\_info +## local\_hardware\_info Basic hardware information about the local machine. @@ -143,13 +143,13 @@ python_api_name: qiskit.utils [dict](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.12)") -### is\_main\_process +## is\_main\_process Checks whether the current process is the main one -### apply\_prefix +## apply\_prefix Given a SI unit prefix and value, apply the prefix to convert to standard SI unit. @@ -180,7 +180,7 @@ python_api_name: qiskit.utils [float](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)") | [ParameterExpression](qiskit.circuit.ParameterExpression "qiskit.circuit.ParameterExpression") -### detach\_prefix +## detach\_prefix Given a SI unit value, find the most suitable prefix to scale the value. @@ -222,7 +222,7 @@ python_api_name: qiskit.utils [tuple](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.12)")\[[float](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)"), [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")] -### wrap\_method +## wrap\_method Wrap the functionality the instance- or class method `cls.name` with additional behaviour `before` and `after`. @@ -399,7 +399,7 @@ A QuantumInstance holds the Qiskit backend as well as a number of compile and ru A helper function for calling a custom function with python `ProcessPoolExecutor`. Tasks can be executed in parallel using this function. It has a built-in event publisher to show the progress of the parallel tasks. -### parallel\_map +#### parallel\_map Parallel execution of a mapping of values to the function task. This is functionally equivalent to: @@ -515,6 +515,8 @@ Each of the lazy checkers is an instance of [`LazyDependencyManager`](#qiskit.ut from qiskit.utils import LazyImportTester ``` +#### LazyDependencyManager + A mananger for some optional features that are expensive to import, or to verify the existence of. @@ -553,7 +555,7 @@ from qiskit.utils import LazyImportTester * **install** – how to install this optional dependency. Passed to [`MissingOptionalLibraryError`](exceptions#qiskit.exceptions.MissingOptionalLibraryError "qiskit.exceptions.MissingOptionalLibraryError") as the `pip_install` parameter. * **msg** – an extra message to include in the error raised if this is required. - ### \_is\_available + ##### \_is\_available Subclasses of [`LazyDependencyManager`](#qiskit.utils.LazyDependencyManager "qiskit.utils.LazyDependencyManager") should override this method to implement the actual test of availability. This method should return a Boolean, where `True` indicates that the dependency was available. This method will only ever be called once. @@ -563,13 +565,13 @@ from qiskit.utils import LazyImportTester [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)") - ### disable\_locally + ##### disable\_locally Create a context, during which the value of the dependency manager will be `False`. This means that within the context, any calls to this object will behave as if the dependency is not available, including raising errors. It is valid to call this method whether or not the dependency has already been evaluated. This is most useful in tests. - ### require\_in\_call + ##### require\_in\_call Create a decorator for callables that requires that the dependency is available when the decorated function or method is called. @@ -587,7 +589,7 @@ from qiskit.utils import LazyImportTester Callable - ### require\_in\_instance + ##### require\_in\_instance A class decorator that requires the dependency is available when the class is initialised. This decorator can be used even if the class does not define an `__init__` method. @@ -605,7 +607,7 @@ from qiskit.utils import LazyImportTester Callable - ### require\_now + ##### require\_now Eagerly attempt to import the dependencies in this object, and raise an exception if they cannot be imported. @@ -620,6 +622,8 @@ from qiskit.utils import LazyImportTester +#### LazyImportTester + A lazy dependency tester for importable Python modules. Any required objects will only be imported at the point that this object is tested for its Boolean value. @@ -632,6 +636,8 @@ from qiskit.utils import LazyImportTester [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError "(in Python v3.12)") – if no modules are given. +#### LazySubprocessTester + A lazy checker that a command-line tool is available. The command will only be run once, at the point that this object is checked for its Boolean value. From 23ce8bd92849cfacbf170b29a87101898e294710 Mon Sep 17 00:00:00 2001 From: Arnau Casau Date: Fri, 3 May 2024 11:44:58 +0200 Subject: [PATCH 27/31] Regenerate qiskit 1.0.2 --- docs/api/qiskit/circuit.mdx | 4 +- docs/api/qiskit/circuit_classical.mdx | 112 ++++++++------ docs/api/qiskit/circuit_library.mdx | 142 +++++++++--------- docs/api/qiskit/circuit_singleton.mdx | 8 +- docs/api/qiskit/converters.mdx | 16 +- docs/api/qiskit/passmanager.mdx | 2 +- docs/api/qiskit/providers.mdx | 10 +- docs/api/qiskit/providers_fake_provider.mdx | 6 + docs/api/qiskit/pulse.mdx | 88 ++++++----- docs/api/qiskit/qasm2.mdx | 4 + docs/api/qiskit/qasm3.mdx | 16 +- .../qiskit/qiskit.synthesis.unitary.aqc.mdx | 2 +- docs/api/qiskit/qpy.mdx | 12 +- docs/api/qiskit/result.mdx | 6 +- docs/api/qiskit/scheduler.mdx | 8 +- docs/api/qiskit/transpiler.mdx | 12 +- docs/api/qiskit/utils.mdx | 16 +- 17 files changed, 264 insertions(+), 200 deletions(-) diff --git a/docs/api/qiskit/circuit.mdx b/docs/api/qiskit/circuit.mdx index 120cbb50675..998cb0ea4f8 100644 --- a/docs/api/qiskit/circuit.mdx +++ b/docs/api/qiskit/circuit.mdx @@ -300,7 +300,7 @@ with qc.switch(cr) as case: ### Random Circuits -### random\_circuit +#### random\_circuit Generate random circuit of arbitrary size and form. @@ -343,7 +343,7 @@ with qc.switch(cr) as case: Almost all circuit functions and methods will raise a [`CircuitError`](#qiskit.circuit.CircuitError "qiskit.circuit.CircuitError") when encountering an error that is particular to usage of Qiskit (as opposed to regular typing or indexing problems, which will typically raise the corresponding standard Python error). -### CircuitError +#### CircuitError Base class for errors raised while processing a circuit. diff --git a/docs/api/qiskit/circuit_classical.mdx b/docs/api/qiskit/circuit_classical.mdx index 53515cceac4..779e1e46f0e 100644 --- a/docs/api/qiskit/circuit_classical.mdx +++ b/docs/api/qiskit/circuit_classical.mdx @@ -48,6 +48,8 @@ There are two pathways for constructing expressions. The classes that form [the The expression system is based on tree representation. All nodes in the tree are final (uninheritable) instances of the abstract base class: +#### Expr + Root base class of all nodes in the expression tree. The base case should never be instantiated directly. @@ -60,6 +62,8 @@ These objects are mutable and should not be reused in a different location witho The entry point from general circuit objects to the expression system is by wrapping the object in a [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.Var") node and associating a [`Type`](#qiskit.circuit.classical.types.Type "qiskit.circuit.classical.types.Type") with it. +#### Var + A classical variable. @@ -68,12 +72,16 @@ The entry point from general circuit objects to the expression system is by wrap Similarly, literals used in comparison (such as integers) should be lifted to [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes with associated types. +#### Value + A single scalar value. The operations traditionally associated with pre-, post- or infix operators in programming are represented by the [`Unary`](#qiskit.circuit.classical.expr.Unary "qiskit.circuit.classical.expr.Unary") and [`Binary`](#qiskit.circuit.classical.expr.Binary "qiskit.circuit.classical.expr.Binary") nodes as appropriate. These each take an operation type code, which are exposed as enumerations inside each class as [`Unary.Op`](#qiskit.circuit.classical.expr.Unary.Op "qiskit.circuit.classical.expr.Unary.Op") and [`Binary.Op`](#qiskit.circuit.classical.expr.Binary.Op "qiskit.circuit.classical.expr.Binary.Op") respectively. +#### Unary + A unary expression. @@ -83,6 +91,8 @@ The operations traditionally associated with pre-, post- or infix operators in p * **operand** ([*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.Expr")) – The operand of the operation. * **type** ([*Type*](#qiskit.circuit.classical.types.Type "qiskit.circuit.classical.types.types.Type")) – The resolved type of the result. + ##### Op + Enumeration of the opcodes for unary operations. @@ -90,13 +100,13 @@ The operations traditionally associated with pre-, post- or infix operators in p The logical negation [`LOGIC_NOT`](#qiskit.circuit.classical.expr.Unary.Op.LOGIC_NOT "qiskit.circuit.classical.expr.Unary.Op.LOGIC_NOT") takes an input that is implicitly coerced to a Boolean, and returns a Boolean. - ### BIT\_NOT + ###### BIT\_NOT Bitwise negation. `~operand`. - ### LOGIC\_NOT + ###### LOGIC\_NOT Logical negation. `!operand`. @@ -104,6 +114,8 @@ The operations traditionally associated with pre-, post- or infix operators in p +#### Binary + A binary expression. @@ -114,6 +126,8 @@ The operations traditionally associated with pre-, post- or infix operators in p * **right** ([*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.Expr")) – The right-hand operand. * **type** ([*Type*](#qiskit.circuit.classical.types.Type "qiskit.circuit.classical.types.types.Type")) – The resolved type of the result. + ##### Op + Enumeration of the opcodes for binary operations. @@ -123,67 +137,67 @@ The operations traditionally associated with pre-, post- or infix operators in p The binary mathematical relations [`EQUAL`](#qiskit.circuit.classical.expr.Binary.Op.EQUAL "qiskit.circuit.classical.expr.Binary.Op.EQUAL"), [`NOT_EQUAL`](#qiskit.circuit.classical.expr.Binary.Op.NOT_EQUAL "qiskit.circuit.classical.expr.Binary.Op.NOT_EQUAL"), [`LESS`](#qiskit.circuit.classical.expr.Binary.Op.LESS "qiskit.circuit.classical.expr.Binary.Op.LESS"), [`LESS_EQUAL`](#qiskit.circuit.classical.expr.Binary.Op.LESS_EQUAL "qiskit.circuit.classical.expr.Binary.Op.LESS_EQUAL"), [`GREATER`](#qiskit.circuit.classical.expr.Binary.Op.GREATER "qiskit.circuit.classical.expr.Binary.Op.GREATER") and [`GREATER_EQUAL`](#qiskit.circuit.classical.expr.Binary.Op.GREATER_EQUAL "qiskit.circuit.classical.expr.Binary.Op.GREATER_EQUAL") take unsigned integers (with an implicit cast to make them the same width), and return a Boolean. - ### BIT\_AND + ###### BIT\_AND Bitwise “and”. `lhs & rhs`. - ### BIT\_OR + ###### BIT\_OR Bitwise “or”. `lhs | rhs`. - ### BIT\_XOR + ###### BIT\_XOR Bitwise “exclusive or”. `lhs ^ rhs`. - ### LOGIC\_AND + ###### LOGIC\_AND Logical “and”. `lhs && rhs`. - ### LOGIC\_OR + ###### LOGIC\_OR Logical “or”. `lhs || rhs`. - ### EQUAL + ###### EQUAL Numeric equality. `lhs == rhs`. - ### NOT\_EQUAL + ###### NOT\_EQUAL Numeric inequality. `lhs != rhs`. - ### LESS + ###### LESS Numeric less than. `lhs < rhs`. - ### LESS\_EQUAL + ###### LESS\_EQUAL Numeric less than or equal to. `lhs <= rhs` - ### GREATER + ###### GREATER Numeric greater than. `lhs > rhs`. - ### GREATER\_EQUAL + ###### GREATER\_EQUAL Numeric greater than or equal to. `lhs >= rhs`. @@ -195,6 +209,8 @@ When constructing expressions, one must ensure that the types are valid for the Expressions in this system are defined to act only on certain sets of types. However, values may be cast to a suitable supertype in order to satisfy the typing requirements. In these cases, a node in the expression tree is used to represent the promotion. In all cases where operations note that they “implicitly cast” or “coerce” their arguments, the expression tree must have this node representing the conversion. +#### Cast + A cast from one type to another, implied by the use of an expression in a different context. @@ -207,7 +223,7 @@ Constructing the tree representation directly is verbose and easy to make a mist The functions and methods described in this section are a more user-friendly way to build the expression tree, while staying close to the internal representation. All these functions will automatically lift valid Python scalar values into corresponding [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.Var") or [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") objects, and will resolve any required implicit casts on your behalf. If you want to directly use some scalar value as an [`Expr`](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.Expr") node, you can manually [`lift()`](#qiskit.circuit.classical.expr.lift "qiskit.circuit.classical.expr.lift") it yourself. -### lift +#### lift Lift the given Python `value` to a [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.expr.Value") or [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.expr.Var"). @@ -245,7 +261,7 @@ The functions and methods described in this section are a more user-friendly way You can manually specify casts in cases where the cast is allowed in explicit form, but may be lossy (such as the cast of a higher precision [`Uint`](#qiskit.circuit.classical.types.Uint "qiskit.circuit.classical.types.Uint") to a lower precision one). -### cast +#### cast Create an explicit cast from the given value to the given type. @@ -268,7 +284,7 @@ You can manually specify casts in cases where the cast is allowed in explicit fo There are helper constructor functions for each of the unary operations. -### bit\_not +#### bit\_not Create a bitwise ‘not’ expression node from the given value, resolving any implicit casts and lifting the value into a [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") node if required. @@ -289,7 +305,7 @@ There are helper constructor functions for each of the unary operations. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### logic\_not +#### logic\_not Create a logical ‘not’ expression node from the given value, resolving any implicit casts and lifting the value into a [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") node if required. @@ -312,7 +328,7 @@ There are helper constructor functions for each of the unary operations. Similarly, the binary operations and relations have helper functions defined. -### bit\_and +#### bit\_and Create a bitwise ‘and’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -333,7 +349,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### bit\_or +#### bit\_or Create a bitwise ‘or’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -354,7 +370,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### bit\_xor +#### bit\_xor Create a bitwise ‘exclusive or’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -375,7 +391,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### logic\_and +#### logic\_and Create a logical ‘and’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -396,7 +412,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### logic\_or +#### logic\_or Create a logical ‘or’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -417,7 +433,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### equal +#### equal Create an ‘equal’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -438,7 +454,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### not\_equal +#### not\_equal Create a ‘not equal’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -459,7 +475,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### less +#### less Create a ‘less than’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -480,7 +496,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### less\_equal +#### less\_equal Create a ‘less than or equal to’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -501,7 +517,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### greater +#### greater Create a ‘greater than’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -522,7 +538,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### greater\_equal +#### greater\_equal Create a ‘greater than or equal to’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -545,7 +561,7 @@ Similarly, the binary operations and relations have helper functions defined. Qiskit’s legacy method for specifying equality conditions for use in conditionals is to use a two-tuple of a [`Clbit`](qiskit.circuit.Clbit "qiskit.circuit.Clbit") or [`ClassicalRegister`](qiskit.circuit.ClassicalRegister "qiskit.circuit.ClassicalRegister") and an integer. This represents an exact equality condition, and there are no ways to specify any other relations. The helper function [`lift_legacy_condition()`](#qiskit.circuit.classical.expr.lift_legacy_condition "qiskit.circuit.classical.expr.lift_legacy_condition") converts this legacy format into the new expression syntax. -### lift\_legacy\_condition +#### lift\_legacy\_condition Lift a legacy two-tuple equality condition into a new-style [`Expr`](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.Expr"). @@ -574,10 +590,12 @@ Qiskit’s legacy method for specifying equality conditions for use in condition A typical consumer of the expression tree wants to recursively walk through the tree, potentially statefully, acting on each node differently depending on its type. This is naturally a double-dispatch problem; the logic of ‘what is to be done’ is likely stateful and users should be free to define their own operations, yet each node defines ‘what is being acted on’. We enable this double dispatch by providing a base visitor class for the expression tree. +#### ExprVisitor + Base class for visitors to the [`Expr`](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.Expr") tree. Subclasses should override whichever of the `visit_*` methods that they are able to handle, and should be organised such that non-existent methods will never be called. - ### visit\_binary + ##### visit\_binary **Return type** @@ -585,7 +603,7 @@ A typical consumer of the expression tree wants to recursively walk through the *\_T\_co* - ### visit\_cast + ##### visit\_cast **Return type** @@ -593,7 +611,7 @@ A typical consumer of the expression tree wants to recursively walk through the *\_T\_co* - ### visit\_generic + ##### visit\_generic **Return type** @@ -601,7 +619,7 @@ A typical consumer of the expression tree wants to recursively walk through the *\_T\_co* - ### visit\_unary + ##### visit\_unary **Return type** @@ -609,7 +627,7 @@ A typical consumer of the expression tree wants to recursively walk through the *\_T\_co* - ### visit\_value + ##### visit\_value **Return type** @@ -617,7 +635,7 @@ A typical consumer of the expression tree wants to recursively walk through the *\_T\_co* - ### visit\_var + ##### visit\_var **Return type** @@ -630,7 +648,7 @@ Consumers of the expression tree should subclass the visitor, and override the ` For the convenience of simple visitors that only need to inspect the variables in an expression and not the general structure, the iterator method [`iter_vars()`](#qiskit.circuit.classical.expr.iter_vars "qiskit.circuit.classical.expr.iter_vars") is provided. -### iter\_vars +#### iter\_vars Get an iterator over the [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.expr.Var") nodes referenced at any level in the given [`Expr`](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr"). @@ -658,7 +676,7 @@ For the convenience of simple visitors that only need to inspect the variables i Two expressions can be compared for direct structural equality by using the built-in Python `==` operator. In general, though, one might want to compare two expressions slightly more semantically, allowing that the [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.Var") nodes inside them are bound to different memory-location descriptions between two different circuits. In this case, one can use [`structurally_equivalent()`](#qiskit.circuit.classical.expr.structurally_equivalent "qiskit.circuit.classical.expr.structurally_equivalent") with two suitable “key” functions to do the comparison. -### structurally\_equivalent +#### structurally\_equivalent Do these two expressions have exactly the same tree structure, up to some key function for the [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.expr.Var") objects? @@ -721,6 +739,8 @@ The type system of the expression tree is exposed through this module. This is i All types inherit from an abstract base class: +#### Type + Root base class of all nodes in the type tree. The base case should never be instantiated directly. @@ -731,10 +751,14 @@ Types should be considered immutable objects, and you must not mutate them. It i The two different types available are for Booleans (corresponding to [`Clbit`](qiskit.circuit.Clbit "qiskit.circuit.Clbit") and the literals `True` and `False`), and unsigned integers (corresponding to [`ClassicalRegister`](qiskit.circuit.ClassicalRegister "qiskit.circuit.ClassicalRegister") and Python integers). +#### Bool + The Boolean type. This has exactly two values: `True` and `False`. +#### Uint + An unsigned integer of fixed bit width. @@ -751,7 +775,7 @@ The type system is equipped with a partial ordering, where $a < b$ is interprete The low-level interface to querying the subtyping relationship is the [`order()`](#qiskit.circuit.classical.types.order "qiskit.circuit.classical.types.order") function. -### order +##### order Get the ordering relationship between the two types as an enumeration value. @@ -780,6 +804,8 @@ The low-level interface to querying the subtyping relationship is the [`order()` The return value is an enumeration [`Ordering`](#qiskit.circuit.classical.types.Ordering "qiskit.circuit.classical.types.Ordering") that describes what, if any, subtyping relationship exists between the two types. +##### Ordering + Enumeration listing the possible relations between two types. Types only have a partial ordering, so it’s possible for two types to have no sub-typing relationship. @@ -788,7 +814,7 @@ The return value is an enumeration [`Ordering`](#qiskit.circuit.classical.types. Some helper methods are then defined in terms of this low-level [`order()`](#qiskit.circuit.classical.types.order "qiskit.circuit.classical.types.order") primitive: -### is\_subtype +##### is\_subtype Does the relation $\text{left} \le \text{right}$ hold? If there is no ordering relation between the two types, then this returns `False`. If `strict`, then the equality is also forbidden. @@ -817,7 +843,7 @@ Some helper methods are then defined in terms of this low-level [`order()`](#qis [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)") -### is\_supertype +##### is\_supertype Does the relation $\text{left} \ge \text{right}$ hold? If there is no ordering relation between the two types, then this returns `False`. If `strict`, then the equality is also forbidden. @@ -846,7 +872,7 @@ Some helper methods are then defined in terms of this low-level [`order()`](#qis [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)") -### greater +##### greater Get the greater of the two types, assuming that there is an ordering relation between them. Technically, this is a slightly restricted version of the concept of the ‘meet’ of the two types in that the return value must be one of the inputs. In practice in the type system there is no concept of a ‘sum’ type, so the ‘meet’ exists if and only if there is an ordering between the two types, and is equal to the greater of the two types. @@ -878,7 +904,7 @@ Some helper methods are then defined in terms of this low-level [`order()`](#qis It is common to need to cast values of one type to another type. The casting rules for this are embedded into the [`types`](https://docs.python.org/3/library/types.html#module-types "(in Python v3.12)") module. You can query the casting kinds using [`cast_kind()`](#qiskit.circuit.classical.types.cast_kind "qiskit.circuit.classical.types.cast_kind"): -### cast\_kind +##### cast\_kind Determine the sort of cast that is required to move from the left type to the right type. @@ -904,6 +930,8 @@ It is common to need to cast values of one type to another type. The casting rul The return values from this function are an enumeration explaining the types of cast that are allowed from the left type to the right type. +##### CastKind + A return value indicating the type of cast that can occur from one type to another. diff --git a/docs/api/qiskit/circuit_library.mdx b/docs/api/qiskit/circuit_library.mdx index 33161cce0f0..58a7137f92e 100644 --- a/docs/api/qiskit/circuit_library.mdx +++ b/docs/api/qiskit/circuit_library.mdx @@ -324,7 +324,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib **Reference:** Maslov, D. and Dueck, G. W. and Miller, D. M., Techniques for the synthesis of reversible Toffoli networks, 2007 [http://dx.doi.org/10.1145/1278349.1278355](http://dx.doi.org/10.1145/1278349.1278355) -### template\_nct\_2a\_1 +#### template\_nct\_2a\_1 **Returns** @@ -336,7 +336,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_2a\_2 +#### template\_nct\_2a\_2 **Returns** @@ -348,7 +348,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_2a\_3 +#### template\_nct\_2a\_3 **Returns** @@ -360,7 +360,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_4a\_1 +#### template\_nct\_4a\_1 **Returns** @@ -372,7 +372,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_4a\_2 +#### template\_nct\_4a\_2 **Returns** @@ -384,7 +384,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_4a\_3 +#### template\_nct\_4a\_3 **Returns** @@ -396,7 +396,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_4b\_1 +#### template\_nct\_4b\_1 **Returns** @@ -408,7 +408,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_4b\_2 +#### template\_nct\_4b\_2 **Returns** @@ -420,7 +420,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_5a\_1 +#### template\_nct\_5a\_1 **Returns** @@ -432,7 +432,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_5a\_2 +#### template\_nct\_5a\_2 **Returns** @@ -444,7 +444,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_5a\_3 +#### template\_nct\_5a\_3 **Returns** @@ -456,7 +456,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_5a\_4 +#### template\_nct\_5a\_4 **Returns** @@ -468,7 +468,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_6a\_1 +#### template\_nct\_6a\_1 **Returns** @@ -480,7 +480,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_6a\_2 +#### template\_nct\_6a\_2 **Returns** @@ -492,7 +492,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_6a\_3 +#### template\_nct\_6a\_3 **Returns** @@ -504,7 +504,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_6a\_4 +#### template\_nct\_6a\_4 **Returns** @@ -516,7 +516,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_6b\_1 +#### template\_nct\_6b\_1 **Returns** @@ -528,7 +528,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_6b\_2 +#### template\_nct\_6b\_2 **Returns** @@ -540,7 +540,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_6c\_1 +#### template\_nct\_6c\_1 **Returns** @@ -552,7 +552,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_7a\_1 +#### template\_nct\_7a\_1 **Returns** @@ -564,7 +564,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_7b\_1 +#### template\_nct\_7b\_1 **Returns** @@ -576,7 +576,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_7c\_1 +#### template\_nct\_7c\_1 **Returns** @@ -588,7 +588,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_7d\_1 +#### template\_nct\_7d\_1 **Returns** @@ -600,7 +600,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_7e\_1 +#### template\_nct\_7e\_1 **Returns** @@ -612,7 +612,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9a\_1 +#### template\_nct\_9a\_1 **Returns** @@ -624,7 +624,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_1 +#### template\_nct\_9c\_1 **Returns** @@ -636,7 +636,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_2 +#### template\_nct\_9c\_2 **Returns** @@ -648,7 +648,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_3 +#### template\_nct\_9c\_3 **Returns** @@ -660,7 +660,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_4 +#### template\_nct\_9c\_4 **Returns** @@ -672,7 +672,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_5 +#### template\_nct\_9c\_5 **Returns** @@ -684,7 +684,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_6 +#### template\_nct\_9c\_6 **Returns** @@ -696,7 +696,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_7 +#### template\_nct\_9c\_7 **Returns** @@ -708,7 +708,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_8 +#### template\_nct\_9c\_8 **Returns** @@ -720,7 +720,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_9 +#### template\_nct\_9c\_9 **Returns** @@ -732,7 +732,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_10 +#### template\_nct\_9c\_10 **Returns** @@ -744,7 +744,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_11 +#### template\_nct\_9c\_11 **Returns** @@ -756,7 +756,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_12 +#### template\_nct\_9c\_12 **Returns** @@ -768,7 +768,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_1 +#### template\_nct\_9d\_1 **Returns** @@ -780,7 +780,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_2 +#### template\_nct\_9d\_2 **Returns** @@ -792,7 +792,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_3 +#### template\_nct\_9d\_3 **Returns** @@ -804,7 +804,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_4 +#### template\_nct\_9d\_4 **Returns** @@ -816,7 +816,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_5 +#### template\_nct\_9d\_5 **Returns** @@ -828,7 +828,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_6 +#### template\_nct\_9d\_6 **Returns** @@ -840,7 +840,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_7 +#### template\_nct\_9d\_7 **Returns** @@ -852,7 +852,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_8 +#### template\_nct\_9d\_8 **Returns** @@ -864,7 +864,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_9 +#### template\_nct\_9d\_9 **Returns** @@ -876,7 +876,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_10 +#### template\_nct\_9d\_10 **Returns** @@ -892,7 +892,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib Template circuits over Clifford gates. -### clifford\_2\_1 +#### clifford\_2\_1 **Returns** @@ -904,7 +904,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_2\_2 +#### clifford\_2\_2 **Returns** @@ -916,7 +916,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_2\_3 +#### clifford\_2\_3 **Returns** @@ -928,7 +928,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_2\_4 +#### clifford\_2\_4 **Returns** @@ -940,7 +940,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_3\_1 +#### clifford\_3\_1 **Returns** @@ -952,7 +952,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_4\_1 +#### clifford\_4\_1 **Returns** @@ -964,7 +964,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_4\_2 +#### clifford\_4\_2 **Returns** @@ -976,7 +976,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_4\_3 +#### clifford\_4\_3 **Returns** @@ -988,7 +988,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_4\_4 +#### clifford\_4\_4 **Returns** @@ -1000,7 +1000,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_5\_1 +#### clifford\_5\_1 **Returns** @@ -1012,7 +1012,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_6\_1 +#### clifford\_6\_1 **Returns** @@ -1024,7 +1024,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_6\_2 +#### clifford\_6\_2 **Returns** @@ -1036,7 +1036,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_6\_3 +#### clifford\_6\_3 **Returns** @@ -1048,7 +1048,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_6\_4 +#### clifford\_6\_4 **Returns** @@ -1060,7 +1060,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_6\_5 +#### clifford\_6\_5 **Returns** @@ -1072,7 +1072,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_8\_1 +#### clifford\_8\_1 **Returns** @@ -1084,7 +1084,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_8\_2 +#### clifford\_8\_2 **Returns** @@ -1096,7 +1096,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_8\_3 +#### clifford\_8\_3 **Returns** @@ -1112,37 +1112,37 @@ Template circuits over Clifford gates. Template circuits with [`RZXGate`](qiskit.circuit.library.RZXGate "qiskit.circuit.library.RZXGate"). -### rzx\_yz +#### rzx\_yz Template for CX - RYGate - CX. -### rzx\_xz +#### rzx\_xz Template for CX - RXGate - CX. -### rzx\_cy +#### rzx\_cy Template for CX - RYGate - CX. -### rzx\_zz1 +#### rzx\_zz1 Template for CX - RZGate - CX. -### rzx\_zz2 +#### rzx\_zz2 Template for CX - RZGate - CX. -### rzx\_zz3 +#### rzx\_zz3 Template for CX - RZGate - CX. diff --git a/docs/api/qiskit/circuit_singleton.mdx b/docs/api/qiskit/circuit_singleton.mdx index a9a98f6e4e9..2c1ad70f4c9 100644 --- a/docs/api/qiskit/circuit_singleton.mdx +++ b/docs/api/qiskit/circuit_singleton.mdx @@ -44,6 +44,8 @@ assert XGate() is XGate() The public classes correspond to the standard classes [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.Instruction") and [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"), respectively, and are subclasses of these. +### SingletonInstruction + A base class to use for [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.Instruction") objects that by default are singleton instances. @@ -52,12 +54,16 @@ The public classes correspond to the standard classes [`Instruction`](qiskit.cir The exception to be aware of with this class though are the [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.Instruction") attributes [`label`](qiskit.circuit.Instruction#label "qiskit.circuit.Instruction.label"), [`condition`](qiskit.circuit.Instruction#condition "qiskit.circuit.Instruction.condition"), [`duration`](qiskit.circuit.Instruction#duration "qiskit.circuit.Instruction.duration"), and [`unit`](qiskit.circuit.Instruction#unit "qiskit.circuit.Instruction.unit") which can be set differently for specific instances of gates. For [`SingletonInstruction`](#qiskit.circuit.singleton.SingletonInstruction "qiskit.circuit.singleton.SingletonInstruction") usage to be sound setting these attributes is not available and they can only be set at creation time, or on an object that has been specifically made mutable using [`to_mutable()`](qiskit.circuit.Instruction#to_mutable "qiskit.circuit.Instruction.to_mutable"). If any of these attributes are used during creation, then instead of using a single shared global instance of the same gate a new separate instance will be created. +### SingletonGate + A base class to use for [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate") objects that by default are singleton instances. This class is very similar to [`SingletonInstruction`](#qiskit.circuit.singleton.SingletonInstruction "qiskit.circuit.singleton.SingletonInstruction"), except implies unitary [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate") semantics as well. The same caveats around setting attributes in that class apply here as well. +### SingletonControlledGate + A base class to use for [`ControlledGate`](qiskit.circuit.ControlledGate "qiskit.circuit.ControlledGate") objects that by default are singleton instances @@ -118,7 +124,7 @@ If your constructor does not have defaults for all its arguments, you must set ` Subclasses of [`SingletonInstruction`](#qiskit.circuit.singleton.SingletonInstruction "qiskit.circuit.singleton.SingletonInstruction") and the other associated classes can control how their constructor’s arguments are interpreted, in order to help the singleton machinery return the singleton even in the case than an optional argument is explicitly set to its default. -### \_singleton\_lookup\_key +#### \_singleton\_lookup\_key Given the arguments to the constructor, return a key tuple that identifies the singleton instance to retrieve, or `None` if the arguments imply that a mutable object must be created. diff --git a/docs/api/qiskit/converters.mdx b/docs/api/qiskit/converters.mdx index 3b6cf7663bc..ebfd38035a5 100644 --- a/docs/api/qiskit/converters.mdx +++ b/docs/api/qiskit/converters.mdx @@ -18,7 +18,7 @@ python_api_name: qiskit.converters `qiskit.converters` -### circuit\_to\_dag +## circuit\_to\_dag Build a [`DAGCircuit`](qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit") object from a [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit"). @@ -60,7 +60,7 @@ python_api_name: qiskit.converters ``` -### dag\_to\_circuit +## dag\_to\_circuit Build a `QuantumCircuit` object from a `DAGCircuit`. @@ -102,7 +102,7 @@ python_api_name: qiskit.converters ![../\_images/converters-1.png](/images/api/qiskit/converters-1.png) -### circuit\_to\_instruction +## circuit\_to\_instruction Build an [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.Instruction") object from a [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit"). @@ -145,7 +145,7 @@ python_api_name: qiskit.converters ``` -### circuit\_to\_gate +## circuit\_to\_gate Build a [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate") object from a [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit"). @@ -172,7 +172,7 @@ python_api_name: qiskit.converters [Gate](qiskit.circuit.Gate "qiskit.circuit.Gate") -### dagdependency\_to\_circuit +## dagdependency\_to\_circuit Build a `QuantumCircuit` object from a `DAGDependency`. @@ -190,7 +190,7 @@ python_api_name: qiskit.converters [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### circuit\_to\_dagdependency +## circuit\_to\_dagdependency Build a `DAGDependency` object from a [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit"). @@ -209,7 +209,7 @@ python_api_name: qiskit.converters [DAGDependency](qiskit.dagcircuit.DAGDependency "qiskit.dagcircuit.DAGDependency") -### dag\_to\_dagdependency +## dag\_to\_dagdependency Build a `DAGDependency` object from a `DAGCircuit`. @@ -228,7 +228,7 @@ python_api_name: qiskit.converters [DAGDependency](qiskit.dagcircuit.DAGDependency "qiskit.dagcircuit.DAGDependency") -### dagdependency\_to\_dag +## dagdependency\_to\_dag Build a `DAGCircuit` object from a `DAGDependency`. diff --git a/docs/api/qiskit/passmanager.mdx b/docs/api/qiskit/passmanager.mdx index 69ea7386ccb..3430d7f8a90 100644 --- a/docs/api/qiskit/passmanager.mdx +++ b/docs/api/qiskit/passmanager.mdx @@ -160,7 +160,7 @@ With the pass manager framework, a developer can flexibly customize the optimiza ### Exceptions -### PassManagerError +#### PassManagerError Pass manager error. diff --git a/docs/api/qiskit/providers.mdx b/docs/api/qiskit/providers.mdx index dd2da338244..24ccd884525 100644 --- a/docs/api/qiskit/providers.mdx +++ b/docs/api/qiskit/providers.mdx @@ -75,7 +75,7 @@ It’s worth pointing out that Terra’s version support policy doesn’t mean p ### Exceptions -### QiskitBackendNotFoundError +#### QiskitBackendNotFoundError Base class for errors raised while looking for a backend. @@ -83,7 +83,7 @@ It’s worth pointing out that Terra’s version support policy doesn’t mean p Set the error message. -### BackendPropertyError +#### BackendPropertyError Base class for errors raised while looking for a backend property. @@ -91,7 +91,7 @@ It’s worth pointing out that Terra’s version support policy doesn’t mean p Set the error message. -### JobError +#### JobError Base class for errors raised by Jobs. @@ -99,7 +99,7 @@ It’s worth pointing out that Terra’s version support policy doesn’t mean p Set the error message. -### JobTimeoutError +#### JobTimeoutError Base class for timeout errors raised by jobs. @@ -107,7 +107,7 @@ It’s worth pointing out that Terra’s version support policy doesn’t mean p Set the error message. -### BackendConfigurationError +#### BackendConfigurationError Base class for errors raised by the BackendConfiguration. diff --git a/docs/api/qiskit/providers_fake_provider.mdx b/docs/api/qiskit/providers_fake_provider.mdx index 4a7865965db..bb48c07297b 100644 --- a/docs/api/qiskit/providers_fake_provider.mdx +++ b/docs/api/qiskit/providers_fake_provider.mdx @@ -81,6 +81,8 @@ plot_histogram(counts) The V1 fake backends are based on a set of base classes: +### FakeBackend + This is a dummy backend just for testing purposes. @@ -92,6 +94,8 @@ The V1 fake backends are based on a set of base classes: * **time\_alive** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) – time to wait before returning result +### FakeQasmBackend + A fake OpenQASM backend. @@ -103,6 +107,8 @@ The V1 fake backends are based on a set of base classes: * **time\_alive** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) – time to wait before returning result +### FakePulseBackend + A fake pulse backend. diff --git a/docs/api/qiskit/pulse.mdx b/docs/api/qiskit/pulse.mdx index 56fb87c039b..abf6970c359 100644 --- a/docs/api/qiskit/pulse.mdx +++ b/docs/api/qiskit/pulse.mdx @@ -70,6 +70,8 @@ An instruction can be added to a [`Schedule`](qiskit.pulse.Schedule "qiskit.puls These are all instances of the same base class: +### Instruction + The smallest schedulable unit: a single instruction. It has a fixed duration and specified channels. @@ -161,6 +163,8 @@ Novel channel types can often utilize the [`ControlChannel`](qiskit.pulse.channe All channels are children of the same abstract base class: +### Channel + Base class of channels. Channels provide a Qiskit-side label for typical quantum control hardware signal channels. The final label -> physical channel mapping is the responsibility of the hardware backend. For instance, `DriveChannel(0)` holds instructions which the backend should map to the signal line driving gate operations on the qubit labeled (indexed) 0. @@ -214,6 +218,8 @@ The alignment transforms define alignment policies of instructions in [`Schedule These are all subtypes of the abstract base class [`AlignmentKind`](#qiskit.pulse.transforms.AlignmentKind "qiskit.pulse.transforms.AlignmentKind"). +#### AlignmentKind + An abstract class for schedule alignment. @@ -226,7 +232,7 @@ These are all subtypes of the abstract base class [`AlignmentKind`](#qiskit.puls The canonicalization transforms convert schedules to a form amenable for execution on OpenPulse backends. -### add\_implicit\_acquires +#### add\_implicit\_acquires Return a new schedule with implicit acquires from the measurement mapping replaced by explicit ones. @@ -249,7 +255,7 @@ The canonicalization transforms convert schedules to a form amenable for executi [*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") -### align\_measures +#### align\_measures Return new schedules where measurements occur at the same physical time. @@ -316,7 +322,7 @@ The canonicalization transforms convert schedules to a form amenable for executi [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")\[[Schedule](qiskit.pulse.Schedule "qiskit.pulse.Schedule")] -### block\_to\_schedule +#### block\_to\_schedule Convert `ScheduleBlock` to `Schedule`. @@ -343,7 +349,7 @@ The canonicalization transforms convert schedules to a form amenable for executi -### compress\_pulses +#### compress\_pulses Optimization pass to replace identical pulses. @@ -361,7 +367,7 @@ The canonicalization transforms convert schedules to a form amenable for executi [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")\[[qiskit.pulse.schedule.Schedule](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule")] -### flatten +#### flatten Flatten (inline) any called nodes into a Schedule tree with no nested children. @@ -383,7 +389,7 @@ The canonicalization transforms convert schedules to a form amenable for executi [*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") -### inline\_subroutines +#### inline\_subroutines Recursively remove call instructions and inline the respective subroutine instructions. @@ -407,7 +413,7 @@ The canonicalization transforms convert schedules to a form amenable for executi [Schedule](qiskit.pulse.Schedule "qiskit.pulse.Schedule") | [ScheduleBlock](qiskit.pulse.ScheduleBlock "qiskit.pulse.ScheduleBlock") -### pad +#### pad Pad the input Schedule with `Delay``s on all unoccupied timeslots until ``schedule.duration` or `until` if not `None`. @@ -433,7 +439,7 @@ The canonicalization transforms convert schedules to a form amenable for executi [Schedule](qiskit.pulse.Schedule "qiskit.pulse.Schedule") -### remove\_directives +#### remove\_directives Remove directives. @@ -451,7 +457,7 @@ The canonicalization transforms convert schedules to a form amenable for executi [*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") -### remove\_trivial\_barriers +#### remove\_trivial\_barriers Remove trivial barriers with 0 or 1 channels. @@ -475,7 +481,7 @@ The canonicalization transforms convert schedules to a form amenable for executi The DAG transforms create DAG representation of input program. This can be used for optimization of instructions and equality checks. -### block\_to\_dag +#### block\_to\_dag Convert schedule block instruction into DAG. @@ -533,7 +539,7 @@ The DAG transforms create DAG representation of input program. This can be used A sequence of transformations to generate a target code. -### target\_qobj\_transform +#### target\_qobj\_transform A basic pulse program transformation for OpenPulse API execution. @@ -810,7 +816,7 @@ with pulse.build(backend) as drive_sched: DriveChannel(0) ``` -### acquire\_channel +#### acquire\_channel Return `AcquireChannel` for `qubit` on the active builder backend. @@ -836,7 +842,7 @@ DriveChannel(0) [*AcquireChannel*](qiskit.pulse.channels.AcquireChannel "qiskit.pulse.channels.AcquireChannel") -### control\_channels +#### control\_channels Return `ControlChannel` for `qubit` on the active builder backend. @@ -871,7 +877,7 @@ DriveChannel(0) [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")\[[qiskit.pulse.channels.ControlChannel](qiskit.pulse.channels.ControlChannel "qiskit.pulse.channels.ControlChannel")] -### drive\_channel +#### drive\_channel Return `DriveChannel` for `qubit` on the active builder backend. @@ -897,7 +903,7 @@ DriveChannel(0) [*DriveChannel*](qiskit.pulse.channels.DriveChannel "qiskit.pulse.channels.DriveChannel") -### measure\_channel +#### measure\_channel Return `MeasureChannel` for `qubit` on the active builder backend. @@ -956,7 +962,7 @@ drive_sched.draw() ![../\_images/pulse-4.png](/images/api/qiskit/pulse-4.png) -### acquire +#### acquire Acquire for a `duration` on a `channel` and store the result in a `register`. @@ -993,7 +999,7 @@ drive_sched.draw() [**exceptions.PulseError**](#qiskit.pulse.PulseError "qiskit.pulse.exceptions.PulseError") – If the register type is not supported. -### barrier +#### barrier Barrier directive for a set of channels and qubits. @@ -1060,7 +1066,7 @@ drive_sched.draw() * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) – Name for the barrier -### call +#### call Call the subroutine within the currently active builder context with arbitrary parameters which will be assigned to the target program. @@ -1229,7 +1235,7 @@ drive_sched.draw() * **kw\_params** (*ParameterValueType*) – Alternative way to provide parameters. Since this is keyed on the string parameter name, the parameters having the same name are all updated together. If you want to avoid name collision, use `value_dict` with [`Parameter`](qiskit.circuit.Parameter "qiskit.circuit.Parameter") objects instead. -### delay +#### delay Delay on a `channel` for a `duration`. @@ -1252,7 +1258,7 @@ drive_sched.draw() * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) – Name of the instruction. -### play +#### play Play a `pulse` on a `channel`. @@ -1275,7 +1281,7 @@ drive_sched.draw() * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) – Name of the pulse. -### reference +#### reference Refer to undefined subroutine by string keys. @@ -1300,7 +1306,7 @@ drive_sched.draw() * **extra\_keys** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) – Helper keys to uniquely specify the subroutine. -### set\_frequency +#### set\_frequency Set the `frequency` of a pulse `channel`. @@ -1323,7 +1329,7 @@ drive_sched.draw() * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) – Name of the instruction. -### set\_phase +#### set\_phase Set the `phase` of a pulse `channel`. @@ -1348,7 +1354,7 @@ drive_sched.draw() * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) – Name of the instruction. -### shift\_frequency +#### shift\_frequency Shift the `frequency` of a pulse `channel`. @@ -1371,7 +1377,7 @@ drive_sched.draw() * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) – Name of the instruction. -### shift\_phase +#### shift\_phase Shift the `phase` of a pulse `channel`. @@ -1396,7 +1402,7 @@ drive_sched.draw() * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) – Name of the instruction. -### snapshot +#### snapshot Simulator snapshot. @@ -1438,7 +1444,7 @@ pulse_prog.draw() ![../\_images/pulse-5.png](/images/api/qiskit/pulse-5.png) -### align\_equispaced +#### align\_equispaced Equispaced alignment pulse scheduling context. @@ -1484,7 +1490,7 @@ pulse_prog.draw() The scheduling is performed for sub-schedules within the context rather than channel-wise. If you want to apply the equispaced context for each channel, you should use the context independently for channels. -### align\_func +#### align\_func Callback defined alignment pulse scheduling context. @@ -1536,7 +1542,7 @@ pulse_prog.draw() The scheduling is performed for sub-schedules within the context rather than channel-wise. If you want to apply the numerical context for each channel, you need to apply the context independently to channels. -### align\_left +#### align\_left Left alignment pulse scheduling context. @@ -1571,7 +1577,7 @@ pulse_prog.draw() [*Generator*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Generator "(in Python v3.12)")\[None, None, None] -### align\_right +#### align\_right Right alignment pulse scheduling context. @@ -1606,7 +1612,7 @@ pulse_prog.draw() [*Generator*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Generator "(in Python v3.12)")\[None, None, None] -### align\_sequential +#### align\_sequential Sequential alignment pulse scheduling context. @@ -1641,7 +1647,7 @@ pulse_prog.draw() [*Generator*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Generator "(in Python v3.12)")\[None, None, None] -### frequency\_offset +#### frequency\_offset Shift the frequency of inputs channels on entry into context and undo on exit. @@ -1685,7 +1691,7 @@ pulse_prog.draw() [*Generator*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Generator "(in Python v3.12)")\[None, None, None] -### phase\_offset +#### phase\_offset Shift the phase of input channels on entry into context and undo on exit. @@ -1739,7 +1745,7 @@ with pulse.build(backend) as measure_sched: MemorySlot(0) ``` -### measure +#### measure Measure a qubit within the currently active builder context. @@ -1794,7 +1800,7 @@ MemorySlot(0) [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")\[StorageLocation] | StorageLocation -### measure\_all +#### measure\_all Measure all qubits within the currently active builder context. @@ -1827,7 +1833,7 @@ MemorySlot(0) [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")\[[qiskit.pulse.channels.MemorySlot](qiskit.pulse.channels.MemorySlot "qiskit.pulse.channels.MemorySlot")] -### delay\_qubits +#### delay\_qubits Insert delays on all the `channels.Channel`s that correspond to the input `qubits` at the same time. @@ -1884,7 +1890,7 @@ There are 160 samples in 3.5555555555555554e-08 seconds There are 1e-06 seconds in 4500 samples. ``` -### active\_backend +#### active\_backend Get the backend of the currently active builder context. @@ -1904,7 +1910,7 @@ There are 1e-06 seconds in 4500 samples. [**exceptions.BackendNotSet**](#qiskit.pulse.BackendNotSet "qiskit.pulse.exceptions.BackendNotSet") – If the builder does not have a backend set. -### num\_qubits +#### num\_qubits Return number of qubits in the currently active backend. @@ -1934,7 +1940,7 @@ There are 1e-06 seconds in 4500 samples. [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") -### qubit\_channels +#### qubit\_channels Returns the set of channels associated with a qubit. @@ -1968,7 +1974,7 @@ There are 1e-06 seconds in 4500 samples. [set](https://docs.python.org/3/library/stdtypes.html#set "(in Python v3.12)")\[[qiskit.pulse.channels.Channel](#qiskit.pulse.channels.Channel "qiskit.pulse.channels.Channel")] -### samples\_to\_seconds +#### samples\_to\_seconds Obtain the time in seconds that will elapse for the input number of samples on the active backend. @@ -1986,7 +1992,7 @@ There are 1e-06 seconds in 4500 samples. [float](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)") | np.ndarray -### seconds\_to\_samples +#### seconds\_to\_samples Obtain the number of samples that will elapse in `seconds` on the active backend. diff --git a/docs/api/qiskit/qasm2.mdx b/docs/api/qiskit/qasm2.mdx index 631a32f8f9a..543eb3060c2 100644 --- a/docs/api/qiskit/qasm2.mdx +++ b/docs/api/qiskit/qasm2.mdx @@ -83,6 +83,8 @@ Both of these loading functions also take an argument `include_path`, which is a You can extend the quantum components of the OpenQASM 2 language by passing an iterable of information on custom instructions as the argument `custom_instructions`. In files that have compatible definitions for these instructions, the given `constructor` will be used in place of whatever other handling [`qiskit.qasm2`](#module-qiskit.qasm2 "qiskit.qasm2") would have done. These instructions may optionally be marked as `builtin`, which causes them to not require an `opaque` or `gate` declaration, but they will silently ignore a compatible declaration. Either way, it is an error to provide a custom instruction that has a different number of parameters or qubits as a defined instruction in a parsed program. Each element of the argument iterable should be a particular data class: +#### CustomInstruction + Information about a custom instruction that should be defined during the parse. @@ -99,6 +101,8 @@ This can be particularly useful when trying to resolve ambiguities in the global Similar to the quantum extensions above, you can also extend the processing done to classical expressions (arguments to gates) by passing an iterable to the argument `custom_classical` to either loader. This needs the `name` (a valid OpenQASM 2 identifier), the number `num_params` of parameters it takes, and a Python callable that implements the function. The Python callable must be able to accept `num_params` positional floating-point arguments, and must return a float or integer (which will be converted to a float). Builtin functions cannot be overridden. +#### CustomClassical + Information about a custom classical function that should be defined in mathematical expressions. diff --git a/docs/api/qiskit/qasm3.mdx b/docs/api/qiskit/qasm3.mdx index eac88ec841d..6ba52719f33 100644 --- a/docs/api/qiskit/qasm3.mdx +++ b/docs/api/qiskit/qasm3.mdx @@ -57,6 +57,8 @@ The high-level functions are simply [`dump()`](#qiskit.qasm3.dump "qiskit.qasm3. Both of these exporter functions are single-use wrappers around the main [`Exporter`](#qiskit.qasm3.Exporter "qiskit.qasm3.Exporter") class. For more complex exporting needs, including dumping multiple circuits in a single session, it may be more convenient or faster to use the complete interface. +### Exporter + QASM3 exporter main class. @@ -88,13 +90,13 @@ Both of these exporter functions are single-use wrappers around the main [`Expor * **experimental** ([*ExperimentalFeatures*](#qiskit.qasm3.ExperimentalFeatures "qiskit.qasm3.experimental.ExperimentalFeatures")) – any experimental features to enable during the export. See [`ExperimentalFeatures`](#qiskit.qasm3.ExperimentalFeatures "qiskit.qasm3.ExperimentalFeatures") for more details. - ### dump + #### dump Convert the circuit to OpenQASM 3, dumping the result to a file or text stream. - ### dumps + #### dumps Convert the circuit to OpenQASM 3, returning the result as a string. @@ -115,12 +117,14 @@ All of these interfaces will raise [`QASM3ExporterError`](#qiskit.qasm3.QASM3Exp The OpenQASM 3 language is still evolving as hardware capabilities improve, so there is no final syntax that Qiskit can reliably target. In order to represent the evolving language, we will sometimes release features before formal standardization, which may need to change as the review process in the OpenQASM 3 design committees progresses. By default, the exporters will only support standardised features of the language. To enable these early-release features, use the `experimental` keyword argument of [`dump()`](#qiskit.qasm3.dump "qiskit.qasm3.dump") and [`dumps()`](#qiskit.qasm3.dumps "qiskit.qasm3.dumps"). The available feature flags are: +#### ExperimentalFeatures + Flags for experimental features that the OpenQASM 3 exporter supports. These are experimental and are more liable to change, because the OpenQASM 3 specification has not formally accepted them yet, so the syntax may not be finalized. - ### SWITCH\_CASE\_V1 + ##### SWITCH\_CASE\_V1 Support exporting switch-case statements as proposed by [https://github.com/openqasm/openqasm/pull/463](https://github.com/openqasm/openqasm/pull/463) at [commit bfa787aa3078](https://github.com/openqasm/openqasm/pull/463/commits/bfa787aa3078). @@ -320,7 +324,7 @@ Qiskit is developing a native parser, written in Rust, which is available as par You can use the experimental interface immediately, with similar functions to the main interface above: -### load\_experimental +#### load\_experimental Load an OpenQASM 3 program from a source file into a [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit"). @@ -348,7 +352,7 @@ You can use the experimental interface immediately, with similar functions to th **.QASM3ImporterError** – if an error occurred during parsing or semantic analysis. In the case of a parsing error, most of the error messages are printed to the terminal and formatted, for better legibility. -### loads\_experimental +#### loads\_experimental Load an OpenQASM 3 program from a string into a [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit"). @@ -387,6 +391,8 @@ warnings.filterwarnings("ignore", category=ExperimentalWarning, module="qiskit.q These two functions allow for specifying include paths as an iterable of paths, and for specifying custom Python constructors to use for particular gates. These custom constructors are specified by using the [`CustomGate`](#qiskit.qasm3.CustomGate "qiskit.qasm3.CustomGate") object: +#### CustomGate + Information received from Python space about how to construct a Python-space object to represent a given gate that might be declared. diff --git a/docs/api/qiskit/qiskit.synthesis.unitary.aqc.mdx b/docs/api/qiskit/qiskit.synthesis.unitary.aqc.mdx index f9415f155c6..af1b2d69e5d 100644 --- a/docs/api/qiskit/qiskit.synthesis.unitary.aqc.mdx +++ b/docs/api/qiskit/qiskit.synthesis.unitary.aqc.mdx @@ -127,7 +127,7 @@ Now `approximate_circuit` is a circuit that approximates the target unitary to a This uses a helper function, [`make_cnot_network`](#qiskit.synthesis.unitary.aqc.make_cnot_network "qiskit.synthesis.unitary.aqc.make_cnot_network"). -### make\_cnot\_network +#### make\_cnot\_network Generates a network consisting of building blocks each containing a CNOT gate and possibly some single-qubit ones. This network models a quantum operator in question. Note, each building block has 2 input and outputs corresponding to a pair of qubits. What we actually return here is a chain of indices of qubit pairs shared by every building block in a row. diff --git a/docs/api/qiskit/qpy.mdx b/docs/api/qiskit/qpy.mdx index 45a7923fa02..46e510de420 100644 --- a/docs/api/qiskit/qpy.mdx +++ b/docs/api/qiskit/qpy.mdx @@ -55,7 +55,7 @@ and then loading that file will return a list with all the circuits ### API documentation -### load +#### load Load a QPY binary file @@ -100,7 +100,7 @@ and then loading that file will return a list with all the circuits [*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")\[[*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit") | [*ScheduleBlock*](qiskit.pulse.ScheduleBlock "qiskit.pulse.schedule.ScheduleBlock")] -### dump +#### dump Write QPY binary data to a file @@ -164,7 +164,7 @@ and then loading that file will return a list with all the circuits These functions will raise a custom subclass of [`QiskitError`](exceptions#qiskit.exceptions.QiskitError "qiskit.exceptions.QiskitError") if they encounter problems during serialization or deserialization. -### QpyError +#### QpyError Errors raised by the qpy module. @@ -172,7 +172,7 @@ These functions will raise a custom subclass of [`QiskitError`](exceptions#qiski Set the error message. -### qiskit.qpy.QPY\_VERSION +#### qiskit.qpy.QPY\_VERSION The current QPY format version as of this release. This is the default value of the `version` keyword argument on [`qpy.dump()`](#qiskit.qpy.dump "qiskit.qpy.dump") and also the upper bound for accepted values for the same argument. This is also the upper bond on the versions supported by [`qpy.load()`](#qiskit.qpy.load "qiskit.qpy.load"). @@ -182,7 +182,7 @@ These functions will raise a custom subclass of [`QiskitError`](exceptions#qiski [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") -### qiskit.qpy.QPY\_COMPATIBILITY\_VERSION +#### qiskit.qpy.QPY\_COMPATIBILITY\_VERSION The current minimum compatibility QPY format version. This is the minimum version that [`qpy.dump()`](#qiskit.qpy.dump "qiskit.qpy.dump") will accept for the `version` keyword argument. [`qpy.load()`](#qiskit.qpy.load "qiskit.qpy.load") will be able to load all released format versions of QPY (up until `QPY_VERSION`). @@ -200,7 +200,7 @@ For example, if you generated a QPY file using qiskit-terra 0.18.1 you could loa If a feature being loaded is deprecated in the corresponding qiskit release, QPY will raise a [`QPYLoadingDeprecatedFeatureWarning`](#qiskit.qpy.QPYLoadingDeprecatedFeatureWarning "qiskit.qpy.QPYLoadingDeprecatedFeatureWarning") informing of the deprecation period and how the feature will be internally handled. -### QPYLoadingDeprecatedFeatureWarning +#### QPYLoadingDeprecatedFeatureWarning Visible deprecation warning for QPY loading functions without a stable point in the call stack. diff --git a/docs/api/qiskit/result.mdx b/docs/api/qiskit/result.mdx index 403623de8e9..dfed0b27f9a 100644 --- a/docs/api/qiskit/result.mdx +++ b/docs/api/qiskit/result.mdx @@ -24,7 +24,7 @@ python_api_name: qiskit.result | [`ResultError`](qiskit.result.ResultError "qiskit.result.ResultError")(error) | Exceptions raised due to errors in result output. | | [`Counts`](qiskit.result.Counts "qiskit.result.Counts")(data\[, time\_taken, creg\_sizes, ...]) | A class to store a counts result from a circuit execution. | -### marginal\_counts +## marginal\_counts Marginalize counts from an experiment over some indices of interest. @@ -52,7 +52,7 @@ python_api_name: qiskit.result [**QiskitError**](exceptions#qiskit.exceptions.QiskitError "qiskit.exceptions.QiskitError") – in case of invalid indices to marginalize over. -### marginal\_distribution +## marginal\_distribution Marginalize counts from an experiment over some indices of interest. @@ -79,7 +79,7 @@ python_api_name: qiskit.result * **is invalid.** – -### marginal\_memory +## marginal\_memory Marginalize shot memory diff --git a/docs/api/qiskit/scheduler.mdx b/docs/api/qiskit/scheduler.mdx index 6225970d003..507f1aee66c 100644 --- a/docs/api/qiskit/scheduler.mdx +++ b/docs/api/qiskit/scheduler.mdx @@ -20,6 +20,8 @@ python_api_name: qiskit.scheduler A circuit scheduler compiles a circuit program to a pulse program. +## ScheduleConfig + Configuration for pulse scheduling. @@ -32,7 +34,7 @@ A circuit scheduler compiles a circuit program to a pulse program. * **dt** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) – Sample duration. -### schedule\_circuit +## schedule\_circuit Basic scheduling pass from a circuit to a pulse Schedule, using the backend. If no method is specified, then a basic, as late as possible scheduling pass is performed, i.e. pulses are scheduled to occur as late as possible. @@ -66,7 +68,7 @@ A circuit scheduler compiles a circuit program to a pulse program. Pulse scheduling methods. -### as\_soon\_as\_possible +## as\_soon\_as\_possible Return the pulse Schedule which implements the input circuit using an “as soon as possible” (asap) scheduling policy. @@ -88,7 +90,7 @@ Pulse scheduling methods. [*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") -### as\_late\_as\_possible +## as\_late\_as\_possible Return the pulse Schedule which implements the input circuit using an “as late as possible” (alap) scheduling policy. diff --git a/docs/api/qiskit/transpiler.mdx b/docs/api/qiskit/transpiler.mdx index f0b331a845f..08f0e0ee5f6 100644 --- a/docs/api/qiskit/transpiler.mdx +++ b/docs/api/qiskit/transpiler.mdx @@ -935,7 +935,7 @@ See [https://arxiv.org/abs/2102.01682](https://arxiv.org/abs/2102.01682) for mor ### Exceptions -### TranspilerError +#### TranspilerError Exceptions raised during transpilation. @@ -943,7 +943,7 @@ See [https://arxiv.org/abs/2102.01682](https://arxiv.org/abs/2102.01682) for mor Set the error message. -### TranspilerAccessError +#### TranspilerAccessError DEPRECATED: Exception of access error in the transpiler passes. @@ -951,7 +951,7 @@ See [https://arxiv.org/abs/2102.01682](https://arxiv.org/abs/2102.01682) for mor Set the error message. -### CouplingError +#### CouplingError Base class for errors raised by the coupling graph object. @@ -959,7 +959,7 @@ See [https://arxiv.org/abs/2102.01682](https://arxiv.org/abs/2102.01682) for mor Set the error message. -### LayoutError +#### LayoutError Errors raised by the layout object. @@ -967,7 +967,7 @@ See [https://arxiv.org/abs/2102.01682](https://arxiv.org/abs/2102.01682) for mor Set the error message. -### CircuitTooWideForTarget +#### CircuitTooWideForTarget Error raised if the circuit is too wide for the target. @@ -975,7 +975,7 @@ See [https://arxiv.org/abs/2102.01682](https://arxiv.org/abs/2102.01682) for mor Set the error message. -### InvalidLayoutError +#### InvalidLayoutError Error raised when a user provided layout is invalid. diff --git a/docs/api/qiskit/utils.mdx b/docs/api/qiskit/utils.mdx index ce28646d5b0..ae4fe5a5ba3 100644 --- a/docs/api/qiskit/utils.mdx +++ b/docs/api/qiskit/utils.mdx @@ -363,6 +363,8 @@ Each of the lazy checkers is an instance of [`LazyDependencyManager`](#qiskit.ut from qiskit.utils import LazyImportTester ``` +#### LazyDependencyManager + A mananger for some optional features that are expensive to import, or to verify the existence of. @@ -401,7 +403,7 @@ from qiskit.utils import LazyImportTester * **install** – how to install this optional dependency. Passed to [`MissingOptionalLibraryError`](exceptions#qiskit.exceptions.MissingOptionalLibraryError "qiskit.exceptions.MissingOptionalLibraryError") as the `pip_install` parameter. * **msg** – an extra message to include in the error raised if this is required. - ### \_is\_available + ##### \_is\_available Subclasses of [`LazyDependencyManager`](#qiskit.utils.LazyDependencyManager "qiskit.utils.LazyDependencyManager") should override this method to implement the actual test of availability. This method should return a Boolean, where `True` indicates that the dependency was available. This method will only ever be called once. @@ -411,13 +413,13 @@ from qiskit.utils import LazyImportTester [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)") - ### disable\_locally + ##### disable\_locally Create a context, during which the value of the dependency manager will be `False`. This means that within the context, any calls to this object will behave as if the dependency is not available, including raising errors. It is valid to call this method whether or not the dependency has already been evaluated. This is most useful in tests. - ### require\_in\_call + ##### require\_in\_call Create a decorator for callables that requires that the dependency is available when the decorated function or method is called. @@ -435,7 +437,7 @@ from qiskit.utils import LazyImportTester Callable - ### require\_in\_instance + ##### require\_in\_instance A class decorator that requires the dependency is available when the class is initialised. This decorator can be used even if the class does not define an `__init__` method. @@ -453,7 +455,7 @@ from qiskit.utils import LazyImportTester Callable - ### require\_now + ##### require\_now Eagerly attempt to import the dependencies in this object, and raise an exception if they cannot be imported. @@ -468,6 +470,8 @@ from qiskit.utils import LazyImportTester +#### LazyImportTester + A lazy dependency tester for importable Python modules. Any required objects will only be imported at the point that this object is tested for its Boolean value. @@ -480,6 +484,8 @@ from qiskit.utils import LazyImportTester [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError "(in Python v3.12)") – if no modules are given. +#### LazySubprocessTester + A lazy checker that a command-line tool is available. The command will only be run once, at the point that this object is checked for its Boolean value. From 9c12233f0cce9d50d11ec7e91554e27187fff511 Mon Sep 17 00:00:00 2001 From: Arnau Casau Date: Fri, 3 May 2024 11:46:23 +0200 Subject: [PATCH 28/31] Regenerate qiskit 1.1.0-dev --- docs/api/qiskit/dev/circuit.mdx | 48 +++++- docs/api/qiskit/dev/circuit_classical.mdx | 118 +++++++++------ docs/api/qiskit/dev/circuit_library.mdx | 142 +++++++++--------- docs/api/qiskit/dev/circuit_singleton.mdx | 8 +- docs/api/qiskit/dev/converters.mdx | 16 +- docs/api/qiskit/dev/passmanager.mdx | 2 +- docs/api/qiskit/dev/providers.mdx | 10 +- .../qiskit/dev/providers_fake_provider.mdx | 6 + docs/api/qiskit/dev/pulse.mdx | 88 ++++++----- docs/api/qiskit/dev/qasm2.mdx | 4 + docs/api/qiskit/dev/qasm3.mdx | 16 +- .../dev/qiskit.synthesis.unitary.aqc.mdx | 2 +- docs/api/qiskit/dev/qpy.mdx | 12 +- docs/api/qiskit/dev/result.mdx | 6 +- docs/api/qiskit/dev/scheduler.mdx | 8 +- docs/api/qiskit/dev/transpiler.mdx | 12 +- docs/api/qiskit/dev/utils.mdx | 16 +- 17 files changed, 305 insertions(+), 209 deletions(-) diff --git a/docs/api/qiskit/dev/circuit.mdx b/docs/api/qiskit/dev/circuit.mdx index c007e6abd35..32a90b3a9fb 100644 --- a/docs/api/qiskit/dev/circuit.mdx +++ b/docs/api/qiskit/dev/circuit.mdx @@ -257,6 +257,8 @@ Internally, a [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.Q Qubits and classical bits are represented by a shared base [`Bit`](#qiskit.circuit.Bit "qiskit.circuit.Bit") type, which is just intended to be a “type tag”; the classes have no behavior other than being immutable objects: +#### Bit + Implement a generic bit. @@ -267,12 +269,16 @@ Qubits and classical bits are represented by a shared base [`Bit`](#qiskit.circu Create a new generic bit. +#### Qubit + Bases: [`Bit`](#qiskit.circuit.Bit "qiskit.circuit.bit.Bit") Implement a quantum bit. +#### Clbit + Bases: [`Bit`](#qiskit.circuit.Bit "qiskit.circuit.bit.Bit") @@ -281,6 +287,8 @@ Qubits and classical bits are represented by a shared base [`Bit`](#qiskit.circu Qubits and clbits are instantiated by users with no arguments, such as by `Qubit()`. Bits compare equal if they are the same Python object, or if they were both created by a register of the same name and size, and they refer to the same index within that register. There is also a special type tag for “ancilla” qubits, but this is little used in the current state of Qiskit: +#### AncillaQubit + Bases: [`Qubit`](#qiskit.circuit.Qubit "qiskit.circuit.quantumregister.Qubit") @@ -289,6 +297,8 @@ Qubits and clbits are instantiated by users with no arguments, such as by `Qubit A collection bits of the same type can be encapsulated in a register of the matching type. The base functionality is in a base class that is not directly instantiated: +#### Register + Implement a generic register. @@ -314,19 +324,19 @@ A collection bits of the same type can be encapsulated in a register of the matc * [**CircuitError**](#qiskit.circuit.CircuitError "qiskit.circuit.CircuitError") – if `bits` contained duplicated bits. * [**CircuitError**](#qiskit.circuit.CircuitError "qiskit.circuit.CircuitError") – if `bits` contained bits of an incorrect type. - ### index + ##### index Find the index of the provided bit within this register. - ### name + ##### name Get the register name. - ### size + ##### size Get the register size. @@ -335,18 +345,24 @@ A collection bits of the same type can be encapsulated in a register of the matc Each of the defined bit subtypes has an associated register, which have the same constructor signatures, methods and properties as the base class: +#### QuantumRegister + Bases: [`Register`](#qiskit.circuit.Register "qiskit.circuit.register.Register") Implement a quantum register. +#### ClassicalRegister + Bases: [`Register`](#qiskit.circuit.Register "qiskit.circuit.register.Register") Implement a classical register. +#### AncillaRegister + Bases: [`QuantumRegister`](#qiskit.circuit.QuantumRegister "qiskit.circuit.quantumregister.QuantumRegister") @@ -421,14 +437,20 @@ Each of [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.Instruction") The available modifiers for [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation") are: +#### InverseModifier + Inverse modifier: specifies that the operation is inverted. +#### ControlModifier + Control modifier: specifies that the operation is controlled by `num_ctrl_qubits` and has control state `ctrl_state`. +#### PowerModifier + Power modifier: specifies that the operation is raised to the power `power`. @@ -441,6 +463,8 @@ Qiskit contains a few [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit Measurements in Qiskit are of a single [`Qubit`](#qiskit.circuit.Qubit "qiskit.circuit.Qubit") into a single [`Clbit`](#qiskit.circuit.Clbit "qiskit.circuit.Clbit"). These are the two that the instruction is applied to. Measurements are in the computational basis. +#### Measure + Bases: [`SingletonInstruction`](circuit_singleton#qiskit.circuit.singleton.SingletonInstruction "qiskit.circuit.singleton.SingletonInstruction") @@ -453,6 +477,8 @@ Measurements in Qiskit are of a single [`Qubit`](#qiskit.circuit.Qubit "qiskit.c Related to measurements, there is a [`Reset`](#qiskit.circuit.Reset "qiskit.circuit.Reset") operation, which produces no classical data but instructs hardware to return the qubit to the $\lvert0\rangle$ state. This is assumed to happen incoherently and to collapse any entanglement. +#### Reset + Bases: [`SingletonInstruction`](circuit_singleton#qiskit.circuit.singleton.SingletonInstruction "qiskit.circuit.singleton.SingletonInstruction") @@ -465,6 +491,8 @@ Related to measurements, there is a [`Reset`](#qiskit.circuit.Reset "qiskit.circ Hardware can be instructed to apply a real-time idle period on a given qubit. A scheduled circuit (see [`qiskit.transpiler`](transpiler#module-qiskit.transpiler "qiskit.transpiler")) will include all the idle times on qubits explicitly in terms of this [`Delay`](#qiskit.circuit.Delay "qiskit.circuit.Delay"). +#### Delay + Bases: [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.instruction.Instruction") @@ -489,6 +517,8 @@ qc.x(0) it is forbidden for the optimizer to cancel out the two $X$ instructions. +#### Barrier + Bases: [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.instruction.Instruction") @@ -504,6 +534,8 @@ it is forbidden for the optimizer to cancel out the two $X$ instructions. The [`Store`](#qiskit.circuit.Store "qiskit.circuit.Store") instruction is particularly special, in that it allows writing the result of a [real-time classical computation expression](#circuit-repr-real-time-classical) (an [`expr.Expr`](circuit_classical#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.Expr")) in a local classical variable (a [`expr.Var`](circuit_classical#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.Var")). It takes *neither* [`Qubit`](#qiskit.circuit.Qubit "qiskit.circuit.Qubit") nor [`Clbit`](#qiskit.circuit.Clbit "qiskit.circuit.Clbit") operands, but has an explicit [`lvalue`](#qiskit.circuit.Store.lvalue "qiskit.circuit.Store.lvalue") and [`rvalue`](#qiskit.circuit.Store.rvalue "qiskit.circuit.Store.rvalue"). +#### Store + Bases: [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.instruction.Instruction") @@ -516,13 +548,13 @@ The [`Store`](#qiskit.circuit.Store "qiskit.circuit.Store") instruction is parti * **lvalue** ([*expr.Expr*](circuit_classical#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.Expr")) – the memory location being stored into. * **rvalue** ([*expr.Expr*](circuit_classical#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.Expr")) – the expression result being stored. - ### lvalue + ##### lvalue Get the l-value [`Expr`](circuit_classical#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.Expr") node that is being stored to. - ### rvalue + ##### rvalue Get the r-value [`Expr`](circuit_classical#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.Expr") node that is being written into the l-value. @@ -643,7 +675,7 @@ Subclasses should typically define a default constructor that calls the :class\` Subclasses of [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.Instruction") (or one of its subclasses) should implement the private [`Instruction._define()`](#qiskit.circuit.Instruction._define "qiskit.circuit.Instruction._define") method, which lazily populates the hidden `_definition` cache that backs the public [`definition`](qiskit.circuit.Instruction#definition "qiskit.circuit.Instruction.definition") method. -### \_define +#### \_define Populate the cached `_definition` field of this [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.Instruction"). @@ -657,7 +689,7 @@ If the subclass is using the singleton machinery, beware that [`_define()`](#qis Subclasses of [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate") will also likely wish to override [the Numpy array-protocol instance method](https://numpy.org/devdocs/user/basics.interoperability.html#the-array-method), `__array__`. This is used by [`Gate.to_matrix()`](qiskit.circuit.Gate#to_matrix "qiskit.circuit.Gate.to_matrix"), and has the signature: -### array\_\_ +#### array\_\_ Return a Numpy array representing the gate. This can use the gate’s `params` field, and may assume that these are numeric values (assuming the subclass expects that) and not [compile-time parameters](#circuit-compile-time-parameters). @@ -864,7 +896,7 @@ The default instance of [`EquivalenceLibrary`](qiskit.circuit.EquivalenceLibrary ### Generating random circuits -### random\_circuit +#### random\_circuit Generate random circuit of arbitrary size and form. diff --git a/docs/api/qiskit/dev/circuit_classical.mdx b/docs/api/qiskit/dev/circuit_classical.mdx index 3570794453a..2caf8022499 100644 --- a/docs/api/qiskit/dev/circuit_classical.mdx +++ b/docs/api/qiskit/dev/circuit_classical.mdx @@ -48,6 +48,8 @@ There are two pathways for constructing expressions. The classes that form [the The expression system is based on tree representation. All nodes in the tree are final (uninheritable) instances of the abstract base class: +#### Expr + Root base class of all nodes in the expression tree. The base case should never be instantiated directly. @@ -60,6 +62,8 @@ These objects are mutable and should not be reused in a different location witho The base for dynamic variables is the [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.Var"), which can be either an arbitrarily typed real-time variable, or a wrapper around a [`Clbit`](circuit#qiskit.circuit.Clbit "qiskit.circuit.Clbit") or [`ClassicalRegister`](circuit#qiskit.circuit.ClassicalRegister "qiskit.circuit.ClassicalRegister"). +#### Var + A classical variable. @@ -67,13 +71,13 @@ The base for dynamic variables is the [`Var`](#qiskit.circuit.classical.expr.Var Variables are immutable after construction, so they can be used as dictionary keys. - ### name + ##### name The name of the variable. This is required to exist if the backing [`var`](#qiskit.circuit.classical.expr.Var.var "qiskit.circuit.classical.expr.Var.var") attribute is a [`UUID`](https://docs.python.org/3/library/uuid.html#uuid.UUID "(in Python v3.12)"), i.e. if it is a new-style variable, and must be `None` if it is an old-style variable. - ### var + ##### var A reference to the backing data storage of the [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.Var") instance. When lifting old-style [`Clbit`](circuit#qiskit.circuit.Clbit "qiskit.circuit.Clbit") or [`ClassicalRegister`](circuit#qiskit.circuit.ClassicalRegister "qiskit.circuit.ClassicalRegister") instances into a [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.Var"), this is exactly the [`Clbit`](circuit#qiskit.circuit.Clbit "qiskit.circuit.Clbit") or [`ClassicalRegister`](circuit#qiskit.circuit.ClassicalRegister "qiskit.circuit.ClassicalRegister"). If the variable is a new-style classical variable (one that owns its own storage separate to the old [`Clbit`](circuit#qiskit.circuit.Clbit "qiskit.circuit.Clbit")/[`ClassicalRegister`](circuit#qiskit.circuit.ClassicalRegister "qiskit.circuit.ClassicalRegister") model), this field will be a [`UUID`](https://docs.python.org/3/library/uuid.html#uuid.UUID "(in Python v3.12)") to uniquely identify it. @@ -82,12 +86,16 @@ The base for dynamic variables is the [`Var`](#qiskit.circuit.classical.expr.Var Similarly, literals used in comparison (such as integers) should be lifted to [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes with associated types. +#### Value + A single scalar value. The operations traditionally associated with pre-, post- or infix operators in programming are represented by the [`Unary`](#qiskit.circuit.classical.expr.Unary "qiskit.circuit.classical.expr.Unary") and [`Binary`](#qiskit.circuit.classical.expr.Binary "qiskit.circuit.classical.expr.Binary") nodes as appropriate. These each take an operation type code, which are exposed as enumerations inside each class as [`Unary.Op`](#qiskit.circuit.classical.expr.Unary.Op "qiskit.circuit.classical.expr.Unary.Op") and [`Binary.Op`](#qiskit.circuit.classical.expr.Binary.Op "qiskit.circuit.classical.expr.Binary.Op") respectively. +#### Unary + A unary expression. @@ -97,6 +105,8 @@ The operations traditionally associated with pre-, post- or infix operators in p * **operand** ([*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.Expr")) – The operand of the operation. * **type** ([*Type*](#qiskit.circuit.classical.types.Type "qiskit.circuit.classical.types.types.Type")) – The resolved type of the result. + ##### Op + Enumeration of the opcodes for unary operations. @@ -104,13 +114,13 @@ The operations traditionally associated with pre-, post- or infix operators in p The logical negation [`LOGIC_NOT`](#qiskit.circuit.classical.expr.Unary.Op.LOGIC_NOT "qiskit.circuit.classical.expr.Unary.Op.LOGIC_NOT") takes an input that is implicitly coerced to a Boolean, and returns a Boolean. - ### BIT\_NOT + ###### BIT\_NOT Bitwise negation. `~operand`. - ### LOGIC\_NOT + ###### LOGIC\_NOT Logical negation. `!operand`. @@ -118,6 +128,8 @@ The operations traditionally associated with pre-, post- or infix operators in p +#### Binary + A binary expression. @@ -128,6 +140,8 @@ The operations traditionally associated with pre-, post- or infix operators in p * **right** ([*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.Expr")) – The right-hand operand. * **type** ([*Type*](#qiskit.circuit.classical.types.Type "qiskit.circuit.classical.types.types.Type")) – The resolved type of the result. + ##### Op + Enumeration of the opcodes for binary operations. @@ -137,67 +151,67 @@ The operations traditionally associated with pre-, post- or infix operators in p The binary mathematical relations [`EQUAL`](#qiskit.circuit.classical.expr.Binary.Op.EQUAL "qiskit.circuit.classical.expr.Binary.Op.EQUAL"), [`NOT_EQUAL`](#qiskit.circuit.classical.expr.Binary.Op.NOT_EQUAL "qiskit.circuit.classical.expr.Binary.Op.NOT_EQUAL"), [`LESS`](#qiskit.circuit.classical.expr.Binary.Op.LESS "qiskit.circuit.classical.expr.Binary.Op.LESS"), [`LESS_EQUAL`](#qiskit.circuit.classical.expr.Binary.Op.LESS_EQUAL "qiskit.circuit.classical.expr.Binary.Op.LESS_EQUAL"), [`GREATER`](#qiskit.circuit.classical.expr.Binary.Op.GREATER "qiskit.circuit.classical.expr.Binary.Op.GREATER") and [`GREATER_EQUAL`](#qiskit.circuit.classical.expr.Binary.Op.GREATER_EQUAL "qiskit.circuit.classical.expr.Binary.Op.GREATER_EQUAL") take unsigned integers (with an implicit cast to make them the same width), and return a Boolean. - ### BIT\_AND + ###### BIT\_AND Bitwise “and”. `lhs & rhs`. - ### BIT\_OR + ###### BIT\_OR Bitwise “or”. `lhs | rhs`. - ### BIT\_XOR + ###### BIT\_XOR Bitwise “exclusive or”. `lhs ^ rhs`. - ### LOGIC\_AND + ###### LOGIC\_AND Logical “and”. `lhs && rhs`. - ### LOGIC\_OR + ###### LOGIC\_OR Logical “or”. `lhs || rhs`. - ### EQUAL + ###### EQUAL Numeric equality. `lhs == rhs`. - ### NOT\_EQUAL + ###### NOT\_EQUAL Numeric inequality. `lhs != rhs`. - ### LESS + ###### LESS Numeric less than. `lhs < rhs`. - ### LESS\_EQUAL + ###### LESS\_EQUAL Numeric less than or equal to. `lhs <= rhs` - ### GREATER + ###### GREATER Numeric greater than. `lhs > rhs`. - ### GREATER\_EQUAL + ###### GREATER\_EQUAL Numeric greater than or equal to. `lhs >= rhs`. @@ -209,6 +223,8 @@ When constructing expressions, one must ensure that the types are valid for the Expressions in this system are defined to act only on certain sets of types. However, values may be cast to a suitable supertype in order to satisfy the typing requirements. In these cases, a node in the expression tree is used to represent the promotion. In all cases where operations note that they “implicitly cast” or “coerce” their arguments, the expression tree must have this node representing the conversion. +#### Cast + A cast from one type to another, implied by the use of an expression in a different context. @@ -221,7 +237,7 @@ Constructing the tree representation directly is verbose and easy to make a mist The functions and methods described in this section are a more user-friendly way to build the expression tree, while staying close to the internal representation. All these functions will automatically lift valid Python scalar values into corresponding [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.Var") or [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") objects, and will resolve any required implicit casts on your behalf. If you want to directly use some scalar value as an [`Expr`](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.Expr") node, you can manually [`lift()`](#qiskit.circuit.classical.expr.lift "qiskit.circuit.classical.expr.lift") it yourself. -### lift +#### lift Lift the given Python `value` to a [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.expr.Value") or [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.expr.Var"). @@ -261,7 +277,7 @@ Typically you should create memory-owning [`Var`](#qiskit.circuit.classical.expr You can manually specify casts in cases where the cast is allowed in explicit form, but may be lossy (such as the cast of a higher precision [`Uint`](#qiskit.circuit.classical.types.Uint "qiskit.circuit.classical.types.Uint") to a lower precision one). -### cast +#### cast Create an explicit cast from the given value to the given type. @@ -284,7 +300,7 @@ You can manually specify casts in cases where the cast is allowed in explicit fo There are helper constructor functions for each of the unary operations. -### bit\_not +#### bit\_not Create a bitwise ‘not’ expression node from the given value, resolving any implicit casts and lifting the value into a [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") node if required. @@ -305,7 +321,7 @@ There are helper constructor functions for each of the unary operations. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### logic\_not +#### logic\_not Create a logical ‘not’ expression node from the given value, resolving any implicit casts and lifting the value into a [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") node if required. @@ -328,7 +344,7 @@ There are helper constructor functions for each of the unary operations. Similarly, the binary operations and relations have helper functions defined. -### bit\_and +#### bit\_and Create a bitwise ‘and’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -349,7 +365,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### bit\_or +#### bit\_or Create a bitwise ‘or’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -370,7 +386,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### bit\_xor +#### bit\_xor Create a bitwise ‘exclusive or’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -391,7 +407,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### logic\_and +#### logic\_and Create a logical ‘and’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -412,7 +428,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### logic\_or +#### logic\_or Create a logical ‘or’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -433,7 +449,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### equal +#### equal Create an ‘equal’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -454,7 +470,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### not\_equal +#### not\_equal Create a ‘not equal’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -475,7 +491,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### less +#### less Create a ‘less than’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -496,7 +512,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### less\_equal +#### less\_equal Create a ‘less than or equal to’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -517,7 +533,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### greater +#### greater Create a ‘greater than’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -538,7 +554,7 @@ Similarly, the binary operations and relations have helper functions defined. [*Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") -### greater\_equal +#### greater\_equal Create a ‘greater than or equal to’ expression node from the given value, resolving any implicit casts and lifting the values into [`Value`](#qiskit.circuit.classical.expr.Value "qiskit.circuit.classical.expr.Value") nodes if required. @@ -561,7 +577,7 @@ Similarly, the binary operations and relations have helper functions defined. Qiskit’s legacy method for specifying equality conditions for use in conditionals is to use a two-tuple of a [`Clbit`](circuit#qiskit.circuit.Clbit "qiskit.circuit.Clbit") or [`ClassicalRegister`](circuit#qiskit.circuit.ClassicalRegister "qiskit.circuit.ClassicalRegister") and an integer. This represents an exact equality condition, and there are no ways to specify any other relations. The helper function [`lift_legacy_condition()`](#qiskit.circuit.classical.expr.lift_legacy_condition "qiskit.circuit.classical.expr.lift_legacy_condition") converts this legacy format into the new expression syntax. -### lift\_legacy\_condition +#### lift\_legacy\_condition Lift a legacy two-tuple equality condition into a new-style [`Expr`](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.Expr"). @@ -590,10 +606,12 @@ Qiskit’s legacy method for specifying equality conditions for use in condition A typical consumer of the expression tree wants to recursively walk through the tree, potentially statefully, acting on each node differently depending on its type. This is naturally a double-dispatch problem; the logic of ‘what is to be done’ is likely stateful and users should be free to define their own operations, yet each node defines ‘what is being acted on’. We enable this double dispatch by providing a base visitor class for the expression tree. +#### ExprVisitor + Base class for visitors to the [`Expr`](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.Expr") tree. Subclasses should override whichever of the `visit_*` methods that they are able to handle, and should be organised such that non-existent methods will never be called. - ### visit\_binary + ##### visit\_binary **Return type** @@ -601,7 +619,7 @@ A typical consumer of the expression tree wants to recursively walk through the *\_T\_co* - ### visit\_cast + ##### visit\_cast **Return type** @@ -609,7 +627,7 @@ A typical consumer of the expression tree wants to recursively walk through the *\_T\_co* - ### visit\_generic + ##### visit\_generic **Return type** @@ -617,7 +635,7 @@ A typical consumer of the expression tree wants to recursively walk through the *\_T\_co* - ### visit\_unary + ##### visit\_unary **Return type** @@ -625,7 +643,7 @@ A typical consumer of the expression tree wants to recursively walk through the *\_T\_co* - ### visit\_value + ##### visit\_value **Return type** @@ -633,7 +651,7 @@ A typical consumer of the expression tree wants to recursively walk through the *\_T\_co* - ### visit\_var + ##### visit\_var **Return type** @@ -646,7 +664,7 @@ Consumers of the expression tree should subclass the visitor, and override the ` For the convenience of simple visitors that only need to inspect the variables in an expression and not the general structure, the iterator method [`iter_vars()`](#qiskit.circuit.classical.expr.iter_vars "qiskit.circuit.classical.expr.iter_vars") is provided. -### iter\_vars +#### iter\_vars Get an iterator over the [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.expr.Var") nodes referenced at any level in the given [`Expr`](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr"). @@ -674,7 +692,7 @@ For the convenience of simple visitors that only need to inspect the variables i Two expressions can be compared for direct structural equality by using the built-in Python `==` operator. In general, though, one might want to compare two expressions slightly more semantically, allowing that the [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.Var") nodes inside them are bound to different memory-location descriptions between two different circuits. In this case, one can use [`structurally_equivalent()`](#qiskit.circuit.classical.expr.structurally_equivalent "qiskit.circuit.classical.expr.structurally_equivalent") with two suitable “key” functions to do the comparison. -### structurally\_equivalent +#### structurally\_equivalent Do these two expressions have exactly the same tree structure, up to some key function for the [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.expr.Var") objects? @@ -721,7 +739,7 @@ Two expressions can be compared for direct structural equality by using the buil Some expressions have associated memory locations, and others may be purely temporary. You can use [`is_lvalue()`](#qiskit.circuit.classical.expr.is_lvalue "qiskit.circuit.classical.expr.is_lvalue") to determine whether an expression has an associated memory location. -### is\_lvalue +#### is\_lvalue Return whether this expression can be used in l-value positions, that is, whether it has a well-defined location in memory, such as one that might be writeable. @@ -783,6 +801,8 @@ The type system of the expression tree is exposed through this module. This is i All types inherit from an abstract base class: +#### Type + Root base class of all nodes in the type tree. The base case should never be instantiated directly. @@ -793,10 +813,14 @@ Types should be considered immutable objects, and you must not mutate them. It i The two different types available are for Booleans (corresponding to [`Clbit`](circuit#qiskit.circuit.Clbit "qiskit.circuit.Clbit") and the literals `True` and `False`), and unsigned integers (corresponding to [`ClassicalRegister`](circuit#qiskit.circuit.ClassicalRegister "qiskit.circuit.ClassicalRegister") and Python integers). +#### Bool + The Boolean type. This has exactly two values: `True` and `False`. +#### Uint + An unsigned integer of fixed bit width. @@ -813,7 +837,7 @@ The type system is equipped with a partial ordering, where $a < b$ is interprete The low-level interface to querying the subtyping relationship is the [`order()`](#qiskit.circuit.classical.types.order "qiskit.circuit.classical.types.order") function. -### order +##### order Get the ordering relationship between the two types as an enumeration value. @@ -842,6 +866,8 @@ The low-level interface to querying the subtyping relationship is the [`order()` The return value is an enumeration [`Ordering`](#qiskit.circuit.classical.types.Ordering "qiskit.circuit.classical.types.Ordering") that describes what, if any, subtyping relationship exists between the two types. +##### Ordering + Enumeration listing the possible relations between two types. Types only have a partial ordering, so it’s possible for two types to have no sub-typing relationship. @@ -850,7 +876,7 @@ The return value is an enumeration [`Ordering`](#qiskit.circuit.classical.types. Some helper methods are then defined in terms of this low-level [`order()`](#qiskit.circuit.classical.types.order "qiskit.circuit.classical.types.order") primitive: -### is\_subtype +##### is\_subtype Does the relation $\text{left} \le \text{right}$ hold? If there is no ordering relation between the two types, then this returns `False`. If `strict`, then the equality is also forbidden. @@ -879,7 +905,7 @@ Some helper methods are then defined in terms of this low-level [`order()`](#qis [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)") -### is\_supertype +##### is\_supertype Does the relation $\text{left} \ge \text{right}$ hold? If there is no ordering relation between the two types, then this returns `False`. If `strict`, then the equality is also forbidden. @@ -908,7 +934,7 @@ Some helper methods are then defined in terms of this low-level [`order()`](#qis [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)") -### greater +##### greater Get the greater of the two types, assuming that there is an ordering relation between them. Technically, this is a slightly restricted version of the concept of the ‘meet’ of the two types in that the return value must be one of the inputs. In practice in the type system there is no concept of a ‘sum’ type, so the ‘meet’ exists if and only if there is an ordering between the two types, and is equal to the greater of the two types. @@ -940,7 +966,7 @@ Some helper methods are then defined in terms of this low-level [`order()`](#qis It is common to need to cast values of one type to another type. The casting rules for this are embedded into the [`types`](https://docs.python.org/3/library/types.html#module-types "(in Python v3.12)") module. You can query the casting kinds using [`cast_kind()`](#qiskit.circuit.classical.types.cast_kind "qiskit.circuit.classical.types.cast_kind"): -### cast\_kind +##### cast\_kind Determine the sort of cast that is required to move from the left type to the right type. @@ -966,6 +992,8 @@ It is common to need to cast values of one type to another type. The casting rul The return values from this function are an enumeration explaining the types of cast that are allowed from the left type to the right type. +##### CastKind + A return value indicating the type of cast that can occur from one type to another. diff --git a/docs/api/qiskit/dev/circuit_library.mdx b/docs/api/qiskit/dev/circuit_library.mdx index f58c9e55ef1..15ab364bb87 100644 --- a/docs/api/qiskit/dev/circuit_library.mdx +++ b/docs/api/qiskit/dev/circuit_library.mdx @@ -324,7 +324,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib **Reference:** Maslov, D. and Dueck, G. W. and Miller, D. M., Techniques for the synthesis of reversible Toffoli networks, 2007 [http://dx.doi.org/10.1145/1278349.1278355](http://dx.doi.org/10.1145/1278349.1278355) -### template\_nct\_2a\_1 +#### template\_nct\_2a\_1 **Returns** @@ -336,7 +336,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_2a\_2 +#### template\_nct\_2a\_2 **Returns** @@ -348,7 +348,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_2a\_3 +#### template\_nct\_2a\_3 **Returns** @@ -360,7 +360,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_4a\_1 +#### template\_nct\_4a\_1 **Returns** @@ -372,7 +372,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_4a\_2 +#### template\_nct\_4a\_2 **Returns** @@ -384,7 +384,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_4a\_3 +#### template\_nct\_4a\_3 **Returns** @@ -396,7 +396,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_4b\_1 +#### template\_nct\_4b\_1 **Returns** @@ -408,7 +408,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_4b\_2 +#### template\_nct\_4b\_2 **Returns** @@ -420,7 +420,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_5a\_1 +#### template\_nct\_5a\_1 **Returns** @@ -432,7 +432,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_5a\_2 +#### template\_nct\_5a\_2 **Returns** @@ -444,7 +444,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_5a\_3 +#### template\_nct\_5a\_3 **Returns** @@ -456,7 +456,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_5a\_4 +#### template\_nct\_5a\_4 **Returns** @@ -468,7 +468,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_6a\_1 +#### template\_nct\_6a\_1 **Returns** @@ -480,7 +480,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_6a\_2 +#### template\_nct\_6a\_2 **Returns** @@ -492,7 +492,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_6a\_3 +#### template\_nct\_6a\_3 **Returns** @@ -504,7 +504,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_6a\_4 +#### template\_nct\_6a\_4 **Returns** @@ -516,7 +516,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_6b\_1 +#### template\_nct\_6b\_1 **Returns** @@ -528,7 +528,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_6b\_2 +#### template\_nct\_6b\_2 **Returns** @@ -540,7 +540,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_6c\_1 +#### template\_nct\_6c\_1 **Returns** @@ -552,7 +552,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_7a\_1 +#### template\_nct\_7a\_1 **Returns** @@ -564,7 +564,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_7b\_1 +#### template\_nct\_7b\_1 **Returns** @@ -576,7 +576,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_7c\_1 +#### template\_nct\_7c\_1 **Returns** @@ -588,7 +588,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_7d\_1 +#### template\_nct\_7d\_1 **Returns** @@ -600,7 +600,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_7e\_1 +#### template\_nct\_7e\_1 **Returns** @@ -612,7 +612,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9a\_1 +#### template\_nct\_9a\_1 **Returns** @@ -624,7 +624,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_1 +#### template\_nct\_9c\_1 **Returns** @@ -636,7 +636,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_2 +#### template\_nct\_9c\_2 **Returns** @@ -648,7 +648,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_3 +#### template\_nct\_9c\_3 **Returns** @@ -660,7 +660,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_4 +#### template\_nct\_9c\_4 **Returns** @@ -672,7 +672,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_5 +#### template\_nct\_9c\_5 **Returns** @@ -684,7 +684,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_6 +#### template\_nct\_9c\_6 **Returns** @@ -696,7 +696,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_7 +#### template\_nct\_9c\_7 **Returns** @@ -708,7 +708,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_8 +#### template\_nct\_9c\_8 **Returns** @@ -720,7 +720,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_9 +#### template\_nct\_9c\_9 **Returns** @@ -732,7 +732,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_10 +#### template\_nct\_9c\_10 **Returns** @@ -744,7 +744,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_11 +#### template\_nct\_9c\_11 **Returns** @@ -756,7 +756,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9c\_12 +#### template\_nct\_9c\_12 **Returns** @@ -768,7 +768,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_1 +#### template\_nct\_9d\_1 **Returns** @@ -780,7 +780,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_2 +#### template\_nct\_9d\_2 **Returns** @@ -792,7 +792,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_3 +#### template\_nct\_9d\_3 **Returns** @@ -804,7 +804,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_4 +#### template\_nct\_9d\_4 **Returns** @@ -816,7 +816,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_5 +#### template\_nct\_9d\_5 **Returns** @@ -828,7 +828,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_6 +#### template\_nct\_9d\_6 **Returns** @@ -840,7 +840,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_7 +#### template\_nct\_9d\_7 **Returns** @@ -852,7 +852,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_8 +#### template\_nct\_9d\_8 **Returns** @@ -864,7 +864,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_9 +#### template\_nct\_9d\_9 **Returns** @@ -876,7 +876,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### template\_nct\_9d\_10 +#### template\_nct\_9d\_10 **Returns** @@ -892,7 +892,7 @@ Template circuits for [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.lib Template circuits over Clifford gates. -### clifford\_2\_1 +#### clifford\_2\_1 **Returns** @@ -904,7 +904,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_2\_2 +#### clifford\_2\_2 **Returns** @@ -916,7 +916,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_2\_3 +#### clifford\_2\_3 **Returns** @@ -928,7 +928,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_2\_4 +#### clifford\_2\_4 **Returns** @@ -940,7 +940,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_3\_1 +#### clifford\_3\_1 **Returns** @@ -952,7 +952,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_4\_1 +#### clifford\_4\_1 **Returns** @@ -964,7 +964,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_4\_2 +#### clifford\_4\_2 **Returns** @@ -976,7 +976,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_4\_3 +#### clifford\_4\_3 **Returns** @@ -988,7 +988,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_4\_4 +#### clifford\_4\_4 **Returns** @@ -1000,7 +1000,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_5\_1 +#### clifford\_5\_1 **Returns** @@ -1012,7 +1012,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_6\_1 +#### clifford\_6\_1 **Returns** @@ -1024,7 +1024,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_6\_2 +#### clifford\_6\_2 **Returns** @@ -1036,7 +1036,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_6\_3 +#### clifford\_6\_3 **Returns** @@ -1048,7 +1048,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_6\_4 +#### clifford\_6\_4 **Returns** @@ -1060,7 +1060,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_6\_5 +#### clifford\_6\_5 **Returns** @@ -1072,7 +1072,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_8\_1 +#### clifford\_8\_1 **Returns** @@ -1084,7 +1084,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_8\_2 +#### clifford\_8\_2 **Returns** @@ -1096,7 +1096,7 @@ Template circuits over Clifford gates. [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### clifford\_8\_3 +#### clifford\_8\_3 **Returns** @@ -1112,37 +1112,37 @@ Template circuits over Clifford gates. Template circuits with [`RZXGate`](qiskit.circuit.library.RZXGate "qiskit.circuit.library.RZXGate"). -### rzx\_yz +#### rzx\_yz Template for CX - RYGate - CX. -### rzx\_xz +#### rzx\_xz Template for CX - RXGate - CX. -### rzx\_cy +#### rzx\_cy Template for CX - RYGate - CX. -### rzx\_zz1 +#### rzx\_zz1 Template for CX - RZGate - CX. -### rzx\_zz2 +#### rzx\_zz2 Template for CX - RZGate - CX. -### rzx\_zz3 +#### rzx\_zz3 Template for CX - RZGate - CX. diff --git a/docs/api/qiskit/dev/circuit_singleton.mdx b/docs/api/qiskit/dev/circuit_singleton.mdx index b92c94c481e..dd484b97cff 100644 --- a/docs/api/qiskit/dev/circuit_singleton.mdx +++ b/docs/api/qiskit/dev/circuit_singleton.mdx @@ -44,6 +44,8 @@ assert XGate() is XGate() The public classes correspond to the standard classes [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.Instruction") and [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"), respectively, and are subclasses of these. +### SingletonInstruction + A base class to use for [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.Instruction") objects that by default are singleton instances. @@ -52,12 +54,16 @@ The public classes correspond to the standard classes [`Instruction`](qiskit.cir The exception to be aware of with this class though are the [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.Instruction") attributes [`label`](qiskit.circuit.Instruction#label "qiskit.circuit.Instruction.label"), [`condition`](qiskit.circuit.Instruction#condition "qiskit.circuit.Instruction.condition"), [`duration`](qiskit.circuit.Instruction#duration "qiskit.circuit.Instruction.duration"), and [`unit`](qiskit.circuit.Instruction#unit "qiskit.circuit.Instruction.unit") which can be set differently for specific instances of gates. For [`SingletonInstruction`](#qiskit.circuit.singleton.SingletonInstruction "qiskit.circuit.singleton.SingletonInstruction") usage to be sound setting these attributes is not available and they can only be set at creation time, or on an object that has been specifically made mutable using [`to_mutable()`](qiskit.circuit.Instruction#to_mutable "qiskit.circuit.Instruction.to_mutable"). If any of these attributes are used during creation, then instead of using a single shared global instance of the same gate a new separate instance will be created. +### SingletonGate + A base class to use for [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate") objects that by default are singleton instances. This class is very similar to [`SingletonInstruction`](#qiskit.circuit.singleton.SingletonInstruction "qiskit.circuit.singleton.SingletonInstruction"), except implies unitary [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate") semantics as well. The same caveats around setting attributes in that class apply here as well. +### SingletonControlledGate + A base class to use for [`ControlledGate`](qiskit.circuit.ControlledGate "qiskit.circuit.ControlledGate") objects that by default are singleton instances @@ -118,7 +124,7 @@ If your constructor does not have defaults for all its arguments, you must set ` Subclasses of [`SingletonInstruction`](#qiskit.circuit.singleton.SingletonInstruction "qiskit.circuit.singleton.SingletonInstruction") and the other associated classes can control how their constructor’s arguments are interpreted, in order to help the singleton machinery return the singleton even in the case than an optional argument is explicitly set to its default. -### \_singleton\_lookup\_key +#### \_singleton\_lookup\_key Given the arguments to the constructor, return a key tuple that identifies the singleton instance to retrieve, or `None` if the arguments imply that a mutable object must be created. diff --git a/docs/api/qiskit/dev/converters.mdx b/docs/api/qiskit/dev/converters.mdx index ad99b143836..a0baba6531a 100644 --- a/docs/api/qiskit/dev/converters.mdx +++ b/docs/api/qiskit/dev/converters.mdx @@ -18,7 +18,7 @@ python_api_name: qiskit.converters `qiskit.converters` -### circuit\_to\_dag +## circuit\_to\_dag Build a [`DAGCircuit`](qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit") object from a [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit"). @@ -60,7 +60,7 @@ python_api_name: qiskit.converters ``` -### dag\_to\_circuit +## dag\_to\_circuit Build a `QuantumCircuit` object from a `DAGCircuit`. @@ -102,7 +102,7 @@ python_api_name: qiskit.converters ![../\_images/converters-1.png](/images/api/qiskit/dev/converters-1.png) -### circuit\_to\_instruction +## circuit\_to\_instruction Build an [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.Instruction") object from a [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit"). @@ -145,7 +145,7 @@ python_api_name: qiskit.converters ``` -### circuit\_to\_gate +## circuit\_to\_gate Build a [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate") object from a [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit"). @@ -172,7 +172,7 @@ python_api_name: qiskit.converters [Gate](qiskit.circuit.Gate "qiskit.circuit.Gate") -### dagdependency\_to\_circuit +## dagdependency\_to\_circuit Build a `QuantumCircuit` object from a `DAGDependency`. @@ -190,7 +190,7 @@ python_api_name: qiskit.converters [QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") -### circuit\_to\_dagdependency +## circuit\_to\_dagdependency Build a `DAGDependency` object from a [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit"). @@ -209,7 +209,7 @@ python_api_name: qiskit.converters [DAGDependency](qiskit.dagcircuit.DAGDependency "qiskit.dagcircuit.DAGDependency") -### dag\_to\_dagdependency +## dag\_to\_dagdependency Build a `DAGDependency` object from a `DAGCircuit`. @@ -228,7 +228,7 @@ python_api_name: qiskit.converters [DAGDependency](qiskit.dagcircuit.DAGDependency "qiskit.dagcircuit.DAGDependency") -### dagdependency\_to\_dag +## dagdependency\_to\_dag Build a `DAGCircuit` object from a `DAGDependency`. diff --git a/docs/api/qiskit/dev/passmanager.mdx b/docs/api/qiskit/dev/passmanager.mdx index 95f8daf2bfa..fef7e5d73ea 100644 --- a/docs/api/qiskit/dev/passmanager.mdx +++ b/docs/api/qiskit/dev/passmanager.mdx @@ -160,7 +160,7 @@ With the pass manager framework, a developer can flexibly customize the optimiza ### Exceptions -### PassManagerError +#### PassManagerError Pass manager error. diff --git a/docs/api/qiskit/dev/providers.mdx b/docs/api/qiskit/dev/providers.mdx index 8947078c15c..524acffa0ab 100644 --- a/docs/api/qiskit/dev/providers.mdx +++ b/docs/api/qiskit/dev/providers.mdx @@ -75,7 +75,7 @@ It’s worth pointing out that Terra’s version support policy doesn’t mean p ### Exceptions -### QiskitBackendNotFoundError +#### QiskitBackendNotFoundError Base class for errors raised while looking for a backend. @@ -83,7 +83,7 @@ It’s worth pointing out that Terra’s version support policy doesn’t mean p Set the error message. -### BackendPropertyError +#### BackendPropertyError Base class for errors raised while looking for a backend property. @@ -91,7 +91,7 @@ It’s worth pointing out that Terra’s version support policy doesn’t mean p Set the error message. -### JobError +#### JobError Base class for errors raised by Jobs. @@ -99,7 +99,7 @@ It’s worth pointing out that Terra’s version support policy doesn’t mean p Set the error message. -### JobTimeoutError +#### JobTimeoutError Base class for timeout errors raised by jobs. @@ -107,7 +107,7 @@ It’s worth pointing out that Terra’s version support policy doesn’t mean p Set the error message. -### BackendConfigurationError +#### BackendConfigurationError Base class for errors raised by the BackendConfiguration. diff --git a/docs/api/qiskit/dev/providers_fake_provider.mdx b/docs/api/qiskit/dev/providers_fake_provider.mdx index be361f9924a..8f284eccc8c 100644 --- a/docs/api/qiskit/dev/providers_fake_provider.mdx +++ b/docs/api/qiskit/dev/providers_fake_provider.mdx @@ -81,6 +81,8 @@ plot_histogram(counts) The V1 fake backends are based on a set of base classes: +### FakeBackend + This is a dummy backend just for testing purposes. @@ -92,6 +94,8 @@ The V1 fake backends are based on a set of base classes: * **time\_alive** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) – time to wait before returning result +### FakeQasmBackend + A fake OpenQASM backend. @@ -103,6 +107,8 @@ The V1 fake backends are based on a set of base classes: * **time\_alive** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) – time to wait before returning result +### FakePulseBackend + A fake pulse backend. diff --git a/docs/api/qiskit/dev/pulse.mdx b/docs/api/qiskit/dev/pulse.mdx index 944eef8af46..0f2dcc814f5 100644 --- a/docs/api/qiskit/dev/pulse.mdx +++ b/docs/api/qiskit/dev/pulse.mdx @@ -70,6 +70,8 @@ An instruction can be added to a [`Schedule`](qiskit.pulse.Schedule "qiskit.puls These are all instances of the same base class: +### Instruction + The smallest schedulable unit: a single instruction. It has a fixed duration and specified channels. @@ -161,6 +163,8 @@ Novel channel types can often utilize the [`ControlChannel`](qiskit.pulse.channe All channels are children of the same abstract base class: +### Channel + Base class of channels. Channels provide a Qiskit-side label for typical quantum control hardware signal channels. The final label -> physical channel mapping is the responsibility of the hardware backend. For instance, `DriveChannel(0)` holds instructions which the backend should map to the signal line driving gate operations on the qubit labeled (indexed) 0. @@ -214,6 +218,8 @@ The alignment transforms define alignment policies of instructions in [`Schedule These are all subtypes of the abstract base class [`AlignmentKind`](#qiskit.pulse.transforms.AlignmentKind "qiskit.pulse.transforms.AlignmentKind"). +#### AlignmentKind + An abstract class for schedule alignment. @@ -226,7 +232,7 @@ These are all subtypes of the abstract base class [`AlignmentKind`](#qiskit.puls The canonicalization transforms convert schedules to a form amenable for execution on OpenPulse backends. -### add\_implicit\_acquires +#### add\_implicit\_acquires Return a new schedule with implicit acquires from the measurement mapping replaced by explicit ones. @@ -249,7 +255,7 @@ The canonicalization transforms convert schedules to a form amenable for executi [*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") -### align\_measures +#### align\_measures Return new schedules where measurements occur at the same physical time. @@ -316,7 +322,7 @@ The canonicalization transforms convert schedules to a form amenable for executi [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")\[[Schedule](qiskit.pulse.Schedule "qiskit.pulse.Schedule")] -### block\_to\_schedule +#### block\_to\_schedule Convert `ScheduleBlock` to `Schedule`. @@ -343,7 +349,7 @@ The canonicalization transforms convert schedules to a form amenable for executi -### compress\_pulses +#### compress\_pulses Optimization pass to replace identical pulses. @@ -361,7 +367,7 @@ The canonicalization transforms convert schedules to a form amenable for executi [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")\[[qiskit.pulse.schedule.Schedule](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule")] -### flatten +#### flatten Flatten (inline) any called nodes into a Schedule tree with no nested children. @@ -383,7 +389,7 @@ The canonicalization transforms convert schedules to a form amenable for executi [*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") -### inline\_subroutines +#### inline\_subroutines Recursively remove call instructions and inline the respective subroutine instructions. @@ -407,7 +413,7 @@ The canonicalization transforms convert schedules to a form amenable for executi [Schedule](qiskit.pulse.Schedule "qiskit.pulse.Schedule") | [ScheduleBlock](qiskit.pulse.ScheduleBlock "qiskit.pulse.ScheduleBlock") -### pad +#### pad Pad the input Schedule with `Delay``s on all unoccupied timeslots until ``schedule.duration` or `until` if not `None`. @@ -433,7 +439,7 @@ The canonicalization transforms convert schedules to a form amenable for executi [Schedule](qiskit.pulse.Schedule "qiskit.pulse.Schedule") -### remove\_directives +#### remove\_directives Remove directives. @@ -451,7 +457,7 @@ The canonicalization transforms convert schedules to a form amenable for executi [*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") -### remove\_trivial\_barriers +#### remove\_trivial\_barriers Remove trivial barriers with 0 or 1 channels. @@ -475,7 +481,7 @@ The canonicalization transforms convert schedules to a form amenable for executi The DAG transforms create DAG representation of input program. This can be used for optimization of instructions and equality checks. -### block\_to\_dag +#### block\_to\_dag Convert schedule block instruction into DAG. @@ -533,7 +539,7 @@ The DAG transforms create DAG representation of input program. This can be used A sequence of transformations to generate a target code. -### target\_qobj\_transform +#### target\_qobj\_transform A basic pulse program transformation for OpenPulse API execution. @@ -810,7 +816,7 @@ with pulse.build(backend) as drive_sched: DriveChannel(0) ``` -### acquire\_channel +#### acquire\_channel Return `AcquireChannel` for `qubit` on the active builder backend. @@ -836,7 +842,7 @@ DriveChannel(0) [*AcquireChannel*](qiskit.pulse.channels.AcquireChannel "qiskit.pulse.channels.AcquireChannel") -### control\_channels +#### control\_channels Return `ControlChannel` for `qubit` on the active builder backend. @@ -871,7 +877,7 @@ DriveChannel(0) [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")\[[qiskit.pulse.channels.ControlChannel](qiskit.pulse.channels.ControlChannel "qiskit.pulse.channels.ControlChannel")] -### drive\_channel +#### drive\_channel Return `DriveChannel` for `qubit` on the active builder backend. @@ -897,7 +903,7 @@ DriveChannel(0) [*DriveChannel*](qiskit.pulse.channels.DriveChannel "qiskit.pulse.channels.DriveChannel") -### measure\_channel +#### measure\_channel Return `MeasureChannel` for `qubit` on the active builder backend. @@ -956,7 +962,7 @@ drive_sched.draw() ![../\_images/pulse-4.png](/images/api/qiskit/dev/pulse-4.png) -### acquire +#### acquire Acquire for a `duration` on a `channel` and store the result in a `register`. @@ -993,7 +999,7 @@ drive_sched.draw() [**exceptions.PulseError**](#qiskit.pulse.PulseError "qiskit.pulse.exceptions.PulseError") – If the register type is not supported. -### barrier +#### barrier Barrier directive for a set of channels and qubits. @@ -1060,7 +1066,7 @@ drive_sched.draw() * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) – Name for the barrier -### call +#### call Call the subroutine within the currently active builder context with arbitrary parameters which will be assigned to the target program. @@ -1229,7 +1235,7 @@ drive_sched.draw() * **kw\_params** (*ParameterValueType*) – Alternative way to provide parameters. Since this is keyed on the string parameter name, the parameters having the same name are all updated together. If you want to avoid name collision, use `value_dict` with [`Parameter`](qiskit.circuit.Parameter "qiskit.circuit.Parameter") objects instead. -### delay +#### delay Delay on a `channel` for a `duration`. @@ -1252,7 +1258,7 @@ drive_sched.draw() * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) – Name of the instruction. -### play +#### play Play a `pulse` on a `channel`. @@ -1275,7 +1281,7 @@ drive_sched.draw() * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) – Name of the pulse. -### reference +#### reference Refer to undefined subroutine by string keys. @@ -1300,7 +1306,7 @@ drive_sched.draw() * **extra\_keys** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) – Helper keys to uniquely specify the subroutine. -### set\_frequency +#### set\_frequency Set the `frequency` of a pulse `channel`. @@ -1323,7 +1329,7 @@ drive_sched.draw() * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) – Name of the instruction. -### set\_phase +#### set\_phase Set the `phase` of a pulse `channel`. @@ -1348,7 +1354,7 @@ drive_sched.draw() * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) – Name of the instruction. -### shift\_frequency +#### shift\_frequency Shift the `frequency` of a pulse `channel`. @@ -1371,7 +1377,7 @@ drive_sched.draw() * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) – Name of the instruction. -### shift\_phase +#### shift\_phase Shift the `phase` of a pulse `channel`. @@ -1396,7 +1402,7 @@ drive_sched.draw() * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) – Name of the instruction. -### snapshot +#### snapshot Simulator snapshot. @@ -1438,7 +1444,7 @@ pulse_prog.draw() ![../\_images/pulse-5.png](/images/api/qiskit/dev/pulse-5.png) -### align\_equispaced +#### align\_equispaced Equispaced alignment pulse scheduling context. @@ -1484,7 +1490,7 @@ pulse_prog.draw() The scheduling is performed for sub-schedules within the context rather than channel-wise. If you want to apply the equispaced context for each channel, you should use the context independently for channels. -### align\_func +#### align\_func Callback defined alignment pulse scheduling context. @@ -1536,7 +1542,7 @@ pulse_prog.draw() The scheduling is performed for sub-schedules within the context rather than channel-wise. If you want to apply the numerical context for each channel, you need to apply the context independently to channels. -### align\_left +#### align\_left Left alignment pulse scheduling context. @@ -1571,7 +1577,7 @@ pulse_prog.draw() [*Generator*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Generator "(in Python v3.12)")\[None, None, None] -### align\_right +#### align\_right Right alignment pulse scheduling context. @@ -1606,7 +1612,7 @@ pulse_prog.draw() [*Generator*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Generator "(in Python v3.12)")\[None, None, None] -### align\_sequential +#### align\_sequential Sequential alignment pulse scheduling context. @@ -1641,7 +1647,7 @@ pulse_prog.draw() [*Generator*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Generator "(in Python v3.12)")\[None, None, None] -### frequency\_offset +#### frequency\_offset Shift the frequency of inputs channels on entry into context and undo on exit. @@ -1685,7 +1691,7 @@ pulse_prog.draw() [*Generator*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Generator "(in Python v3.12)")\[None, None, None] -### phase\_offset +#### phase\_offset Shift the phase of input channels on entry into context and undo on exit. @@ -1739,7 +1745,7 @@ with pulse.build(backend) as measure_sched: MemorySlot(0) ``` -### measure +#### measure Measure a qubit within the currently active builder context. @@ -1794,7 +1800,7 @@ MemorySlot(0) [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")\[StorageLocation] | StorageLocation -### measure\_all +#### measure\_all Measure all qubits within the currently active builder context. @@ -1827,7 +1833,7 @@ MemorySlot(0) [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")\[[qiskit.pulse.channels.MemorySlot](qiskit.pulse.channels.MemorySlot "qiskit.pulse.channels.MemorySlot")] -### delay\_qubits +#### delay\_qubits Insert delays on all the `channels.Channel`s that correspond to the input `qubits` at the same time. @@ -1884,7 +1890,7 @@ There are 160 samples in 3.5555555555555554e-08 seconds There are 1e-06 seconds in 4500 samples. ``` -### active\_backend +#### active\_backend Get the backend of the currently active builder context. @@ -1904,7 +1910,7 @@ There are 1e-06 seconds in 4500 samples. [**exceptions.BackendNotSet**](#qiskit.pulse.BackendNotSet "qiskit.pulse.exceptions.BackendNotSet") – If the builder does not have a backend set. -### num\_qubits +#### num\_qubits Return number of qubits in the currently active backend. @@ -1934,7 +1940,7 @@ There are 1e-06 seconds in 4500 samples. [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") -### qubit\_channels +#### qubit\_channels Returns the set of channels associated with a qubit. @@ -1968,7 +1974,7 @@ There are 1e-06 seconds in 4500 samples. [set](https://docs.python.org/3/library/stdtypes.html#set "(in Python v3.12)")\[[qiskit.pulse.channels.Channel](#qiskit.pulse.channels.Channel "qiskit.pulse.channels.Channel")] -### samples\_to\_seconds +#### samples\_to\_seconds Obtain the time in seconds that will elapse for the input number of samples on the active backend. @@ -1986,7 +1992,7 @@ There are 1e-06 seconds in 4500 samples. [float](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)") | np.ndarray -### seconds\_to\_samples +#### seconds\_to\_samples Obtain the number of samples that will elapse in `seconds` on the active backend. diff --git a/docs/api/qiskit/dev/qasm2.mdx b/docs/api/qiskit/dev/qasm2.mdx index 666cb3cb1b8..1e45e350072 100644 --- a/docs/api/qiskit/dev/qasm2.mdx +++ b/docs/api/qiskit/dev/qasm2.mdx @@ -83,6 +83,8 @@ Both of these loading functions also take an argument `include_path`, which is a You can extend the quantum components of the OpenQASM 2 language by passing an iterable of information on custom instructions as the argument `custom_instructions`. In files that have compatible definitions for these instructions, the given `constructor` will be used in place of whatever other handling [`qiskit.qasm2`](#module-qiskit.qasm2 "qiskit.qasm2") would have done. These instructions may optionally be marked as `builtin`, which causes them to not require an `opaque` or `gate` declaration, but they will silently ignore a compatible declaration. Either way, it is an error to provide a custom instruction that has a different number of parameters or qubits as a defined instruction in a parsed program. Each element of the argument iterable should be a particular data class: +#### CustomInstruction + Information about a custom instruction that should be defined during the parse. @@ -99,6 +101,8 @@ This can be particularly useful when trying to resolve ambiguities in the global Similar to the quantum extensions above, you can also extend the processing done to classical expressions (arguments to gates) by passing an iterable to the argument `custom_classical` to either loader. This needs the `name` (a valid OpenQASM 2 identifier), the number `num_params` of parameters it takes, and a Python callable that implements the function. The Python callable must be able to accept `num_params` positional floating-point arguments, and must return a float or integer (which will be converted to a float). Builtin functions cannot be overridden. +#### CustomClassical + Information about a custom classical function that should be defined in mathematical expressions. diff --git a/docs/api/qiskit/dev/qasm3.mdx b/docs/api/qiskit/dev/qasm3.mdx index f8c44c6d556..22cd897c276 100644 --- a/docs/api/qiskit/dev/qasm3.mdx +++ b/docs/api/qiskit/dev/qasm3.mdx @@ -57,6 +57,8 @@ The high-level functions are simply [`dump()`](#qiskit.qasm3.dump "qiskit.qasm3. Both of these exporter functions are single-use wrappers around the main [`Exporter`](#qiskit.qasm3.Exporter "qiskit.qasm3.Exporter") class. For more complex exporting needs, including dumping multiple circuits in a single session, it may be more convenient or faster to use the complete interface. +### Exporter + QASM3 exporter main class. @@ -88,13 +90,13 @@ Both of these exporter functions are single-use wrappers around the main [`Expor * **experimental** ([*ExperimentalFeatures*](#qiskit.qasm3.ExperimentalFeatures "qiskit.qasm3.experimental.ExperimentalFeatures")) – any experimental features to enable during the export. See [`ExperimentalFeatures`](#qiskit.qasm3.ExperimentalFeatures "qiskit.qasm3.ExperimentalFeatures") for more details. - ### dump + #### dump Convert the circuit to OpenQASM 3, dumping the result to a file or text stream. - ### dumps + #### dumps Convert the circuit to OpenQASM 3, returning the result as a string. @@ -115,12 +117,14 @@ All of these interfaces will raise [`QASM3ExporterError`](#qiskit.qasm3.QASM3Exp The OpenQASM 3 language is still evolving as hardware capabilities improve, so there is no final syntax that Qiskit can reliably target. In order to represent the evolving language, we will sometimes release features before formal standardization, which may need to change as the review process in the OpenQASM 3 design committees progresses. By default, the exporters will only support standardised features of the language. To enable these early-release features, use the `experimental` keyword argument of [`dump()`](#qiskit.qasm3.dump "qiskit.qasm3.dump") and [`dumps()`](#qiskit.qasm3.dumps "qiskit.qasm3.dumps"). The available feature flags are: +#### ExperimentalFeatures + Flags for experimental features that the OpenQASM 3 exporter supports. These are experimental and are more liable to change, because the OpenQASM 3 specification has not formally accepted them yet, so the syntax may not be finalized. - ### SWITCH\_CASE\_V1 + ##### SWITCH\_CASE\_V1 Support exporting switch-case statements as proposed by [https://github.com/openqasm/openqasm/pull/463](https://github.com/openqasm/openqasm/pull/463) at [commit bfa787aa3078](https://github.com/openqasm/openqasm/pull/463/commits/bfa787aa3078). @@ -320,7 +324,7 @@ Qiskit is developing a native parser, written in Rust, which is available as par You can use the experimental interface immediately, with similar functions to the main interface above: -### load\_experimental +#### load\_experimental Load an OpenQASM 3 program from a source file into a [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit"). @@ -348,7 +352,7 @@ You can use the experimental interface immediately, with similar functions to th **.QASM3ImporterError** – if an error occurred during parsing or semantic analysis. In the case of a parsing error, most of the error messages are printed to the terminal and formatted, for better legibility. -### loads\_experimental +#### loads\_experimental Load an OpenQASM 3 program from a string into a [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit"). @@ -387,6 +391,8 @@ warnings.filterwarnings("ignore", category=ExperimentalWarning, module="qiskit.q These two functions allow for specifying include paths as an iterable of paths, and for specifying custom Python constructors to use for particular gates. These custom constructors are specified by using the [`CustomGate`](#qiskit.qasm3.CustomGate "qiskit.qasm3.CustomGate") object: +#### CustomGate + Information received from Python space about how to construct a Python-space object to represent a given gate that might be declared. diff --git a/docs/api/qiskit/dev/qiskit.synthesis.unitary.aqc.mdx b/docs/api/qiskit/dev/qiskit.synthesis.unitary.aqc.mdx index 668c3dd713f..ed2d21d271b 100644 --- a/docs/api/qiskit/dev/qiskit.synthesis.unitary.aqc.mdx +++ b/docs/api/qiskit/dev/qiskit.synthesis.unitary.aqc.mdx @@ -127,7 +127,7 @@ Now `approximate_circuit` is a circuit that approximates the target unitary to a This uses a helper function, [`make_cnot_network`](#qiskit.synthesis.unitary.aqc.make_cnot_network "qiskit.synthesis.unitary.aqc.make_cnot_network"). -### make\_cnot\_network +#### make\_cnot\_network Generates a network consisting of building blocks each containing a CNOT gate and possibly some single-qubit ones. This network models a quantum operator in question. Note, each building block has 2 input and outputs corresponding to a pair of qubits. What we actually return here is a chain of indices of qubit pairs shared by every building block in a row. diff --git a/docs/api/qiskit/dev/qpy.mdx b/docs/api/qiskit/dev/qpy.mdx index 5306486e3c1..dc5659599b5 100644 --- a/docs/api/qiskit/dev/qpy.mdx +++ b/docs/api/qiskit/dev/qpy.mdx @@ -55,7 +55,7 @@ and then loading that file will return a list with all the circuits ### API documentation -### load +#### load Load a QPY binary file @@ -100,7 +100,7 @@ and then loading that file will return a list with all the circuits [*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")\[[*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit") | [*ScheduleBlock*](qiskit.pulse.ScheduleBlock "qiskit.pulse.schedule.ScheduleBlock")] -### dump +#### dump Write QPY binary data to a file @@ -164,7 +164,7 @@ and then loading that file will return a list with all the circuits These functions will raise a custom subclass of [`QiskitError`](exceptions#qiskit.exceptions.QiskitError "qiskit.exceptions.QiskitError") if they encounter problems during serialization or deserialization. -### QpyError +#### QpyError Errors raised by the qpy module. @@ -172,7 +172,7 @@ These functions will raise a custom subclass of [`QiskitError`](exceptions#qiski Set the error message. -### qiskit.qpy.QPY\_VERSION +#### qiskit.qpy.QPY\_VERSION The current QPY format version as of this release. This is the default value of the `version` keyword argument on [`qpy.dump()`](#qiskit.qpy.dump "qiskit.qpy.dump") and also the upper bound for accepted values for the same argument. This is also the upper bond on the versions supported by [`qpy.load()`](#qiskit.qpy.load "qiskit.qpy.load"). @@ -182,7 +182,7 @@ These functions will raise a custom subclass of [`QiskitError`](exceptions#qiski [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") -### qiskit.qpy.QPY\_COMPATIBILITY\_VERSION +#### qiskit.qpy.QPY\_COMPATIBILITY\_VERSION The current minimum compatibility QPY format version. This is the minimum version that [`qpy.dump()`](#qiskit.qpy.dump "qiskit.qpy.dump") will accept for the `version` keyword argument. [`qpy.load()`](#qiskit.qpy.load "qiskit.qpy.load") will be able to load all released format versions of QPY (up until `QPY_VERSION`). @@ -200,7 +200,7 @@ For example, if you generated a QPY file using qiskit-terra 0.18.1 you could loa If a feature being loaded is deprecated in the corresponding qiskit release, QPY will raise a [`QPYLoadingDeprecatedFeatureWarning`](#qiskit.qpy.QPYLoadingDeprecatedFeatureWarning "qiskit.qpy.QPYLoadingDeprecatedFeatureWarning") informing of the deprecation period and how the feature will be internally handled. -### QPYLoadingDeprecatedFeatureWarning +#### QPYLoadingDeprecatedFeatureWarning Visible deprecation warning for QPY loading functions without a stable point in the call stack. diff --git a/docs/api/qiskit/dev/result.mdx b/docs/api/qiskit/dev/result.mdx index 662ccfae10a..b22847e148f 100644 --- a/docs/api/qiskit/dev/result.mdx +++ b/docs/api/qiskit/dev/result.mdx @@ -24,7 +24,7 @@ python_api_name: qiskit.result | [`ResultError`](qiskit.result.ResultError "qiskit.result.ResultError")(error) | Exceptions raised due to errors in result output. | | [`Counts`](qiskit.result.Counts "qiskit.result.Counts")(data\[, time\_taken, creg\_sizes, ...]) | A class to store a counts result from a circuit execution. | -### marginal\_counts +## marginal\_counts Marginalize counts from an experiment over some indices of interest. @@ -52,7 +52,7 @@ python_api_name: qiskit.result [**QiskitError**](exceptions#qiskit.exceptions.QiskitError "qiskit.exceptions.QiskitError") – in case of invalid indices to marginalize over. -### marginal\_distribution +## marginal\_distribution Marginalize counts from an experiment over some indices of interest. @@ -79,7 +79,7 @@ python_api_name: qiskit.result * **is invalid.** – -### marginal\_memory +## marginal\_memory Marginalize shot memory diff --git a/docs/api/qiskit/dev/scheduler.mdx b/docs/api/qiskit/dev/scheduler.mdx index ae2fbb95409..4bbdfc5d783 100644 --- a/docs/api/qiskit/dev/scheduler.mdx +++ b/docs/api/qiskit/dev/scheduler.mdx @@ -20,6 +20,8 @@ python_api_name: qiskit.scheduler A circuit scheduler compiles a circuit program to a pulse program. +## ScheduleConfig + Configuration for pulse scheduling. @@ -32,7 +34,7 @@ A circuit scheduler compiles a circuit program to a pulse program. * **dt** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) – Sample duration. -### schedule\_circuit +## schedule\_circuit Basic scheduling pass from a circuit to a pulse Schedule, using the backend. If no method is specified, then a basic, as late as possible scheduling pass is performed, i.e. pulses are scheduled to occur as late as possible. @@ -66,7 +68,7 @@ A circuit scheduler compiles a circuit program to a pulse program. Pulse scheduling methods. -### as\_soon\_as\_possible +## as\_soon\_as\_possible Return the pulse Schedule which implements the input circuit using an “as soon as possible” (asap) scheduling policy. @@ -88,7 +90,7 @@ Pulse scheduling methods. [*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") -### as\_late\_as\_possible +## as\_late\_as\_possible Return the pulse Schedule which implements the input circuit using an “as late as possible” (alap) scheduling policy. diff --git a/docs/api/qiskit/dev/transpiler.mdx b/docs/api/qiskit/dev/transpiler.mdx index addf580646e..6c344ca2167 100644 --- a/docs/api/qiskit/dev/transpiler.mdx +++ b/docs/api/qiskit/dev/transpiler.mdx @@ -935,7 +935,7 @@ See [https://arxiv.org/abs/2102.01682](https://arxiv.org/abs/2102.01682) for mor ### Exceptions -### TranspilerError +#### TranspilerError Exceptions raised during transpilation. @@ -943,7 +943,7 @@ See [https://arxiv.org/abs/2102.01682](https://arxiv.org/abs/2102.01682) for mor Set the error message. -### TranspilerAccessError +#### TranspilerAccessError DEPRECATED: Exception of access error in the transpiler passes. @@ -951,7 +951,7 @@ See [https://arxiv.org/abs/2102.01682](https://arxiv.org/abs/2102.01682) for mor Set the error message. -### CouplingError +#### CouplingError Base class for errors raised by the coupling graph object. @@ -959,7 +959,7 @@ See [https://arxiv.org/abs/2102.01682](https://arxiv.org/abs/2102.01682) for mor Set the error message. -### LayoutError +#### LayoutError Errors raised by the layout object. @@ -967,7 +967,7 @@ See [https://arxiv.org/abs/2102.01682](https://arxiv.org/abs/2102.01682) for mor Set the error message. -### CircuitTooWideForTarget +#### CircuitTooWideForTarget Error raised if the circuit is too wide for the target. @@ -975,7 +975,7 @@ See [https://arxiv.org/abs/2102.01682](https://arxiv.org/abs/2102.01682) for mor Set the error message. -### InvalidLayoutError +#### InvalidLayoutError Error raised when a user provided layout is invalid. diff --git a/docs/api/qiskit/dev/utils.mdx b/docs/api/qiskit/dev/utils.mdx index 4fd49881a6d..a410e4d7048 100644 --- a/docs/api/qiskit/dev/utils.mdx +++ b/docs/api/qiskit/dev/utils.mdx @@ -363,6 +363,8 @@ Each of the lazy checkers is an instance of [`LazyDependencyManager`](#qiskit.ut from qiskit.utils import LazyImportTester ``` +#### LazyDependencyManager + A mananger for some optional features that are expensive to import, or to verify the existence of. @@ -401,7 +403,7 @@ from qiskit.utils import LazyImportTester * **install** – how to install this optional dependency. Passed to [`MissingOptionalLibraryError`](exceptions#qiskit.exceptions.MissingOptionalLibraryError "qiskit.exceptions.MissingOptionalLibraryError") as the `pip_install` parameter. * **msg** – an extra message to include in the error raised if this is required. - ### \_is\_available + ##### \_is\_available Subclasses of [`LazyDependencyManager`](#qiskit.utils.LazyDependencyManager "qiskit.utils.LazyDependencyManager") should override this method to implement the actual test of availability. This method should return a Boolean, where `True` indicates that the dependency was available. This method will only ever be called once. @@ -411,13 +413,13 @@ from qiskit.utils import LazyImportTester [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)") - ### disable\_locally + ##### disable\_locally Create a context, during which the value of the dependency manager will be `False`. This means that within the context, any calls to this object will behave as if the dependency is not available, including raising errors. It is valid to call this method whether or not the dependency has already been evaluated. This is most useful in tests. - ### require\_in\_call + ##### require\_in\_call Create a decorator for callables that requires that the dependency is available when the decorated function or method is called. @@ -435,7 +437,7 @@ from qiskit.utils import LazyImportTester Callable - ### require\_in\_instance + ##### require\_in\_instance A class decorator that requires the dependency is available when the class is initialised. This decorator can be used even if the class does not define an `__init__` method. @@ -453,7 +455,7 @@ from qiskit.utils import LazyImportTester Callable - ### require\_now + ##### require\_now Eagerly attempt to import the dependencies in this object, and raise an exception if they cannot be imported. @@ -468,6 +470,8 @@ from qiskit.utils import LazyImportTester +#### LazyImportTester + A lazy dependency tester for importable Python modules. Any required objects will only be imported at the point that this object is tested for its Boolean value. @@ -480,6 +484,8 @@ from qiskit.utils import LazyImportTester [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError "(in Python v3.12)") – if no modules are given. +#### LazySubprocessTester + A lazy checker that a command-line tool is available. The command will only be run once, at the point that this object is checked for its Boolean value. From 34622e3698b271daf8cc28a2bf5e16db7da0699f Mon Sep 17 00:00:00 2001 From: Arnau Casau Date: Fri, 3 May 2024 11:49:58 +0200 Subject: [PATCH 29/31] Regenerate qiskit-ibm-provider 0.10.0 --- docs/api/qiskit-ibm-provider/0.10/ibm_utils.mdx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/api/qiskit-ibm-provider/0.10/ibm_utils.mdx b/docs/api/qiskit-ibm-provider/0.10/ibm_utils.mdx index cdea1d340f3..18f048a2627 100644 --- a/docs/api/qiskit-ibm-provider/0.10/ibm_utils.mdx +++ b/docs/api/qiskit-ibm-provider/0.10/ibm_utils.mdx @@ -42,6 +42,8 @@ Utility functions related to the IBM Quantum Provider. Message broker for the Publisher / Subscriber mechanism +### Publisher + Represents a “publisher”. @@ -51,7 +53,7 @@ Message broker for the Publisher / Subscriber mechanism Publisher().publish("event", args, ... ) ``` - ### publish + #### publish Triggers an event, and associates some data to it, so if there are any subscribers, their callback will be called synchronously. @@ -62,12 +64,14 @@ Message broker for the Publisher / Subscriber mechanism +### Subscriber + Represents a “subscriber”. Every component (class) can become a [`Subscriber`](#qiskit_ibm_provider.utils.pubsub.Subscriber "qiskit_ibm_provider.utils.pubsub.Subscriber") and subscribe to events, that will call callback functions when they are emitted. - ### clear + #### clear Unsubscribe everything @@ -77,7 +81,7 @@ Message broker for the Publisher / Subscriber mechanism `None` - ### subscribe + #### subscribe Subscribes to an event, associating a callback function to that event, so when the event occurs, the callback will be called. @@ -89,7 +93,7 @@ Message broker for the Publisher / Subscriber mechanism `bool` - ### unsubscribe + #### unsubscribe Unsubscribe a pair event-callback, so the callback will not be called anymore when the event occurs. From 9e08133200ecab47ca627c697a37060ca4258544 Mon Sep 17 00:00:00 2001 From: Arnau Casau Date: Fri, 3 May 2024 11:50:24 +0200 Subject: [PATCH 30/31] Regenerate qiskit-ibm-provider 0.9.0 --- docs/api/qiskit-ibm-provider/0.9/ibm_utils.mdx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/api/qiskit-ibm-provider/0.9/ibm_utils.mdx b/docs/api/qiskit-ibm-provider/0.9/ibm_utils.mdx index b976143375f..50ca1bbd6de 100644 --- a/docs/api/qiskit-ibm-provider/0.9/ibm_utils.mdx +++ b/docs/api/qiskit-ibm-provider/0.9/ibm_utils.mdx @@ -42,6 +42,8 @@ Utility functions related to the IBM Quantum Provider. Message broker for the Publisher / Subscriber mechanism +### Publisher + Represents a “publisher”. @@ -51,7 +53,7 @@ Message broker for the Publisher / Subscriber mechanism Publisher().publish("event", args, ... ) ``` - ### publish + #### publish Triggers an event, and associates some data to it, so if there are any subscribers, their callback will be called synchronously. @@ -62,12 +64,14 @@ Message broker for the Publisher / Subscriber mechanism +### Subscriber + Represents a “subscriber”. Every component (class) can become a [`Subscriber`](#qiskit_ibm_provider.utils.pubsub.Subscriber "qiskit_ibm_provider.utils.pubsub.Subscriber") and subscribe to events, that will call callback functions when they are emitted. - ### clear + #### clear Unsubscribe everything @@ -77,7 +81,7 @@ Message broker for the Publisher / Subscriber mechanism `None` - ### subscribe + #### subscribe Subscribes to an event, associating a callback function to that event, so when the event occurs, the callback will be called. @@ -89,7 +93,7 @@ Message broker for the Publisher / Subscriber mechanism `bool` - ### unsubscribe + #### unsubscribe Unsubscribe a pair event-callback, so the callback will not be called anymore when the event occurs. From dc08ca8440c1b54969256b3f18cb29acf6f21ffa Mon Sep 17 00:00:00 2001 From: Arnau Casau Date: Fri, 3 May 2024 11:50:33 +0200 Subject: [PATCH 31/31] Regenerate qiskit-ibm-provider 0.11.0 --- docs/api/qiskit-ibm-provider/ibm_utils.mdx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/api/qiskit-ibm-provider/ibm_utils.mdx b/docs/api/qiskit-ibm-provider/ibm_utils.mdx index 5b06f281e29..b6b4a7ee814 100644 --- a/docs/api/qiskit-ibm-provider/ibm_utils.mdx +++ b/docs/api/qiskit-ibm-provider/ibm_utils.mdx @@ -42,6 +42,8 @@ Utility functions related to the IBM Quantum Provider. Message broker for the Publisher / Subscriber mechanism +### Publisher + Represents a “publisher”. @@ -51,7 +53,7 @@ Message broker for the Publisher / Subscriber mechanism Publisher().publish("event", args, ... ) ``` - ### publish + #### publish Triggers an event, and associates some data to it, so if there are any subscribers, their callback will be called synchronously. @@ -62,12 +64,14 @@ Message broker for the Publisher / Subscriber mechanism +### Subscriber + Represents a “subscriber”. Every component (class) can become a [`Subscriber`](#qiskit_ibm_provider.utils.pubsub.Subscriber "qiskit_ibm_provider.utils.pubsub.Subscriber") and subscribe to events, that will call callback functions when they are emitted. - ### clear + #### clear Unsubscribe everything @@ -77,7 +81,7 @@ Message broker for the Publisher / Subscriber mechanism `None` - ### subscribe + #### subscribe Subscribes to an event, associating a callback function to that event, so when the event occurs, the callback will be called. @@ -89,7 +93,7 @@ Message broker for the Publisher / Subscriber mechanism `bool` - ### unsubscribe + #### unsubscribe Unsubscribe a pair event-callback, so the callback will not be called anymore when the event occurs.