qiskit icon indicating copy to clipboard operation
qiskit copied to clipboard

Added explanation and example of circuit with conditionals to qiskit.circuit module page

Open Guillermo-Mijares-Vilarino opened this issue 3 years ago • 7 comments

Summary

Added a new entry in the Supplementary Information section of the qiskit.circuit module page about adding conditionals to a quantum circuit.

I believe this is hard to find unless you already know about its existence beforehand, as it's not part of the Circuit Library or even a QuantumCircuit method but an InstructionSet one, so many users may never get to know about this functionality.

Details and comments

Gave a brief explanation about adding conditionals to circuits via the InstructionSet.c_if() method and a simple code example in which I show the difference it makes.

Thank you for opening a new pull request.

Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient.

While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone.

One or more of the the following people are requested to review this:

  • @Qiskit/terra-core

qiskit-bot avatar Aug 03 '22 10:08 qiskit-bot

Pull Request Test Coverage Report for Build 3130280709

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.003%) to 84.421%

Totals Coverage Status
Change from base Build 3128326070: 0.003%
Covered Lines: 59599
Relevant Lines: 70597

💛 - Coveralls

coveralls avatar Aug 03 '22 11:08 coveralls

I'm happy for us to document c_if for now - it's very cheap for us to change documentation, and it's not yet clear when exactly we'll be able to make a full switch.

jakelishman avatar Aug 18 '22 17:08 jakelishman

@Guillermo-Mijares-Vilarino Can you fix the linting errors?

HuangJunye avatar Aug 19 '22 07:08 HuangJunye

Just removed the trailing whitespaces

Is there anything else that should be changed or is it fine as is? @mtreinish @jakelishman

Can you please review the latest changes? @HuangJunye