Skip to content

Conversation

@rajibchakravorty
Copy link
Contributor

Behaviour of pre_post_gate_parameters updated.

Accepts a tuple of 3 numbers.

  1. Default is a tuple corresponding to a X-pi/2 rotation
  2. If None, it omits any pre-post gates from the circuit
  3. Otherwise it creates a U3(...) op as pre-post gate in the circuit

@michaelhush michaelhush requested a review from charmasaur May 23, 2019 00:53
quantum_circuit.barrier(quantum_registers[qubit]) #pylint: disable=no-member
if pre_post_gate_parameters is not None:
for qubit in target_qubits:
quantum_circuit.u3(pre_post_gate_parameters[0], #pylint: disable=no-member
Copy link
Contributor

Choose a reason for hiding this comment

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

For my education, why's the disable=no-member tag necessary? Is there something in quantum_circuit we need to fix?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@charmasaur - no it is a strange way how these are added to Qiskit library (the IBM One). This one might shed some light - https://quantumcomputing.stackexchange.com/questions/4962/how-to-fix-e1101instance-of-quantumcircuit-has-no-h-member-and-e1101in

Copy link
Contributor

Choose a reason for hiding this comment

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

Gotcha, thanks. Python is scary :S

@michaelhush michaelhush merged commit 2fb2fb8 into master May 23, 2019
@michaelhush michaelhush deleted the circuit-update branch June 4, 2019 05:44
rajibchakravorty pushed a commit that referenced this pull request Jun 12, 2019
# This is the 1st commit message:

starting pyquil support

# This is the commit message #1:

pyquil support added

# This is the commit message #2:

first version of pyquil notebook added

# This is the commit message #3:

pyquil dependency added to setup

# This is the commit message #4:

trying gcc install for pyquil

# This is the commit message #5:

replacing gcc install with build-essential

# This is the commit message #6:

forcing yes to install anything

# This is the commit message #7:

ignoring blocks in pyquil notebook for tests

# This is the commit message #8:

linted; unnecessary import removed from notebook

# This is the commit message #9:

removed all references of circuits and replaced those with programs; pyquil removed from method names

# This is the commit message #10:

notebook rerun after changes

# This is the commit message #11:

pyquil program conversion removes unnecessary method
rajibchakravorty pushed a commit that referenced this pull request Jun 12, 2019
# This is the 1st commit message:

starting pyquil support

# This is the commit message #1:

pyquil support added

# This is the commit message #2:

first version of pyquil notebook added

# This is the commit message #3:

pyquil dependency added to setup

# This is the commit message #4:

trying gcc install for pyquil

# This is the commit message #5:

replacing gcc install with build-essential

# This is the commit message #6:

forcing yes to install anything

# This is the commit message #7:

ignoring blocks in pyquil notebook for tests

# This is the commit message #8:

linted; unnecessary import removed from notebook

# This is the commit message #9:

removed all references of circuits and replaced those with programs; pyquil removed from method names

# This is the commit message #10:

notebook rerun after changes

# This is the commit message #11:

pyquil program conversion removes unnecessary method

# This is the commit message #12:

Public methods are bundled as __all__; changed ported over to notebooks; base object removed; repr method created

# This is the commit message #13:

additional error handling for new repr method

# This is the commit message #14:

repr method updated with class instance as input
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants